MeshKit
1.0
|
#include <AF2Polygon3D.hpp>
Public Member Functions | |
AF2Polygon3D (std::list< const AF2Point3D * > const &polygonVertices) | |
Constructor. | |
~AF2Polygon3D () | |
Destructor. | |
AF2Polygon3D (const AF2Polygon3D &toCopy) | |
Copy constructor. | |
AF2Polygon3D & | operator= (const AF2Polygon3D &rhs) |
Copy assignment. | |
unsigned int | getNumVertices () const |
Get the number of vertices that this polygon has. | |
const AF2Point3D * | getVertex (unsigned int vtxNum) const |
Get a vertex of this polygon. | |
Private Attributes | |
unsigned int | numVertices |
const AF2Point3D ** | vertices |
Definition at line 32 of file AF2Polygon3D.hpp.
AF2Polygon3D | ( | std::list< const AF2Point3D * > const & | polygonVertices | ) |
Constructor.
The vertices passed into the constructor are pointers to polygon vertices. The order of the polygon vertices within the list must be counterclockwise. In other words, the interior of the polygon must be to the left of the edge from each vertex to the next vertex in the list.
This class does not take ownership of the vertices that are passed into it (by pointer), and it is the reponsibility of the context that uses AF2Polygon3D to ensure that pointers to vertices remain valid as long as they are referenced by this object or a copy of it.
polygonVertices | a list of AF2Point3D* pointing to the vertices of the polygon traversed in counterclockwise order |
Definition at line 4 of file AF2Polygon3D.cpp.
~AF2Polygon3D | ( | ) |
Destructor.
Definition at line 34 of file AF2Polygon3D.cpp.
AF2Polygon3D | ( | const AF2Polygon3D & | toCopy | ) |
Copy constructor.
This is the standard copy constructor.
toCopy | an AF2Polygon3D that should be copied to construct a new AF2Polygon3D |
Definition at line 39 of file AF2Polygon3D.cpp.
unsigned int getNumVertices | ( | ) | const |
Get the number of vertices that this polygon has.
Definition at line 73 of file AF2Polygon3D.cpp.
const AF2Point3D * getVertex | ( | unsigned int | vtxNum | ) | const |
Get a vertex of this polygon.
The numbering of the vertices of the polygon begins with 0, so the valid arguments to this method are 0 through n - 1, where n is the value returned from getNumVertices().
vtxNum | the number of the vertex to return |
Definition at line 78 of file AF2Polygon3D.cpp.
AF2Polygon3D & operator= | ( | const AF2Polygon3D & | rhs | ) |
Copy assignment.
This is the standard copy assignment operator.
rhs | an AF2Polygon3D that should be assigned to this AF2Polygon3D, overwriting (and destructing) whatever may be in this AF2Polygon3D |
Definition at line 49 of file AF2Polygon3D.cpp.
unsigned int numVertices [private] |
Definition at line 36 of file AF2Polygon3D.hpp.
const AF2Point3D** vertices [private] |
Definition at line 37 of file AF2Polygon3D.hpp.