MeshKit  1.0
AF2Polygon3D Class Reference

#include <AF2Polygon3D.hpp>

List of all members.

Public Member Functions

 AF2Polygon3D (std::list< const AF2Point3D * > const &polygonVertices)
 Constructor.
 ~AF2Polygon3D ()
 Destructor.
 AF2Polygon3D (const AF2Polygon3D &toCopy)
 Copy constructor.
AF2Polygon3Doperator= (const AF2Polygon3D &rhs)
 Copy assignment.
unsigned int getNumVertices () const
 Get the number of vertices that this polygon has.
const AF2Point3DgetVertex (unsigned int vtxNum) const
 Get a vertex of this polygon.

Private Attributes

unsigned int numVertices
const AF2Point3D ** vertices

Detailed Description

Definition at line 32 of file AF2Polygon3D.hpp.


Constructor & Destructor Documentation

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.

Parameters:
polygonVerticesa list of AF2Point3D* pointing to the vertices of the polygon traversed in counterclockwise order

Definition at line 4 of file AF2Polygon3D.cpp.

Destructor.

Definition at line 34 of file AF2Polygon3D.cpp.

AF2Polygon3D ( const AF2Polygon3D toCopy)

Copy constructor.

This is the standard copy constructor.

Parameters:
toCopyan AF2Polygon3D that should be copied to construct a new AF2Polygon3D

Definition at line 39 of file AF2Polygon3D.cpp.


Member Function Documentation

unsigned int getNumVertices ( ) const

Get the number of vertices that this polygon has.

Returns:
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().

Parameters:
vtxNumthe number of the vertex to return
Returns:
a pointer to a vertex of the polygon

Definition at line 78 of file AF2Polygon3D.cpp.

AF2Polygon3D & operator= ( const AF2Polygon3D rhs)

Copy assignment.

This is the standard copy assignment operator.

Parameters:
rhsan 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.


Member Data Documentation

unsigned int numVertices [private]

Definition at line 36 of file AF2Polygon3D.hpp.

const AF2Point3D** vertices [private]

Definition at line 37 of file AF2Polygon3D.hpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines