VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
vertexList.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 2020 MaK Technologies, Inc.
3 ** All rights reserved.
4 *********************************************************************/
5 
8 
9 #pragma once
10 
11 #include "vrfutil/vrfutilDefines.h"
12 #include <readerWriter/rwList.h>
13 #include <matrix/vlVector.h>
14 
15 class DtRwVector;
16 class DtRwVectorIterator;
17 
21 
23 {
24 public:
25 
27  DtVertexList();
28 
31  parentRegistry = 0);
32 
35  parentRegistry = 0);
36 
38  virtual ~DtVertexList();
39 
40  virtual DtRwVector& operator[](unsigned index) const;
41 
42  virtual int index(const DtListItem* entry) const;
43 
47  virtual double distSquaredTo(const DtVector& point) const;
48 
50  virtual bool getClosestVertex(const DtVector& point, DtVector& vertex) const;
51 
53  virtual DtListItem* getClosestVertex(const DtVector& point) const;
54 
57  virtual bool getClosestLine(const DtVector& point, DtVector& linePt1,
58  DtVector& linePt2) const;
59 
61  virtual void translate(const DtVector& offset);
62 
64  virtual void copyList(const DtVertexList&);
65 
67  virtual void copyList(const DtList&);
68 
69  DtVertexList& operator=(const std::vector<DtVector>&);
71 
72  virtual void emptyList();
73 
77  virtual void resetVerticesVector();
78 
79  const std::vector<DtVector>& asVector() const
80  {
81  return myVertexList;
82  }
83 
85  static DtRwVector& zero();
86 
87 public:
88 
90  static double distanceSquaredPointToLine(const DtVector& point,
91  const DtVector& linePt1, const DtVector& linePt2);
92 
94  static double distanceSquaredPointToPoint(const DtVector& point1,
95  const DtVector& point2);
96 
97  void removeVertex(int);
98 
99 protected:
100 
103  virtual DtlObjPtr getData(DtlObjPtr args, const DtReaderWriter::SearchPaths& searchPaths,
104  const DtVariableBindingsList& variableBindings);
105 
106 protected:
107  std::vector<DtVector> myVertexList;
108 };
109 
std::vector< DtVector > myVertexList
Definition: vertexList.h:107
A Readable, Writable version of DtList. This class cannot be used directly, but must be inherited to ...
Definition: rwList.h:26
virtual DtlObjPtr getData(DtlObjPtr args, const DtReaderWriter::SearchPaths &searchPaths, const DtVariableBindingsList &variableBindings)=0
This method must be overridden by a subclass. Within this method, new instances of the DtReaderWriter...
Definition: readerWriterRegistry.h:39
const std::vector< DtVector > & asVector() const
Definition: vertexList.h:79
Definition: rwVector.h:23
std::list< const DtRwVariableBindings * > DtVariableBindingsList
Definition: readerWriterRegistry.h:29
class DtVertexList:
Definition: vertexList.h:22
std::vector< DtFilename > SearchPaths
Definition: readerWriter.h:92
const DtRwList & operator=(const DtRwList &orig)
Calls down to DtReaderWriter::operator=(). List elements are not copied.
#define DT_DLL_vrfutil
This file is used to determine how to build Disable inconsistent dll linkage warning Visual Studio 6...
Definition: vrfutilDefines.h:34
voidpf uLong offset
Definition: ioapi.h:42
File: rwVecIterator.h.
Definition: rwVectorIterator.h:29

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)