MeshKit  1.0
AF2Polygon2D Class Reference

#include <AF2Polygon2D.hpp>

List of all members.

Public Member Functions

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

Private Attributes

unsigned int numVertices
const AF2Point2D ** vertices

Detailed Description

Definition at line 25 of file AF2Polygon2D.hpp.


Constructor & Destructor Documentation

AF2Polygon2D ( std::list< const AF2Point2D * > 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.

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

Definition at line 4 of file AF2Polygon2D.cpp.

Destructor.

Definition at line 34 of file AF2Polygon2D.cpp.

AF2Polygon2D ( const AF2Polygon2D toCopy)

Copy constructor.

This is the standard copy constructor.

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

Definition at line 39 of file AF2Polygon2D.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 AF2Polygon2D.cpp.

const AF2Point2D * 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().

When pointers returned from this method point to vertices that belong to an AF2RuleApplication, i.e., new vertices that are created as part of applying a rule, the user should be aware that copying the AF2RuleApplication creates new instances of the vertices, and the pointers will not reference the instances in the copy.

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

Definition at line 78 of file AF2Polygon2D.cpp.

AF2Polygon2D & operator= ( const AF2Polygon2D rhs)

Copy assignment.

This is the standard copy assignment operator.

Parameters:
rhsan AF2Polygon2D that should be assigned to this AF2Polygon2D, overwriting (and destructing) whatever may be in this AF2Polygon2D

Definition at line 49 of file AF2Polygon2D.cpp.


Member Data Documentation

unsigned int numVertices [private]

Definition at line 29 of file AF2Polygon2D.hpp.

const AF2Point2D** vertices [private]

Definition at line 30 of file AF2Polygon2D.hpp.


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