CAMpolygonEntity

Include file: campoly.h


A CAMpolygonEntity instance is a closed polygon whose boundary is parameterized by arc-length. The indexing for the vertices starts at 1 and the indexing of the sides starts at 1.
double getVertexCoordinate ( long vertexIndex )
long getSegmentIndex ( double s )
double getGlobalParametricCoord (double s, long segIndex )

 

Chris Anderson © UCLA 6/27/97


Constructors

CAMpolygonEntity(double* xVertex, double* yVertex, long Nsides)

Creates a CAMpolygonEntity instance of Nsides whose vertices are the points (xVertex[i], yVertex[i]) for i = 1 to Nsides.


Entity Specific Member Functions

double getVertexCoordinate(long vertexIndex)

This routine returns the parametric coordinate of the vertex with index vertexIndex. The indexing of the vertices starts at 1.

 

long getSegmentIndex(double s)

This routine Computes the index of the segment (or side) containing the point whose parametric coordinate is s.

 

double getGlobalParametricCoord (double s, long segIndex)

This routine transforms the local parametric s coordinate (a value in [0,1]) for the side segment with index segIndex into the parametric coordinate for the complete polygon.