Version: 5.1.6

INTERP_KERNEL.ProjectedCentralCircularSortOrder Class Reference

Class representing a circular order of a set of points around their barycenter. More...

Public Types

enum  CoordType { XY, XZ, YZ }
 

Enumeration of different planes to project on when calculating order.

More...

Public Member Functions

 ProjectedCentralCircularSortOrder (const double *barycenter, const CoordType type)
 Constructor.
bool operator() (const double *pt1, const double *pt2)
 Comparison operator.

Private Attributes

const int _aIdx
 index corresponding to first coordinate of plane on which points are projected
const int _bIdx
 index corresponding to second coordinate of plane on which points are projected
const double _a
 value of first projected coordinate of the barycenter
const double _b
 value of second projected coordinate of the barycenter

Detailed Description

Class representing a circular order of a set of points around their barycenter.

It is used with the STL sort() algorithm to sort the point of the two polygons


Member Enumeration Documentation

Enumeration of different planes to project on when calculating order.

Enumerator:
XY 
XZ 
YZ 

Constructor & Destructor Documentation

INTERP_KERNEL.ProjectedCentralCircularSortOrder.ProjectedCentralCircularSortOrder ( const double barycenter,
const CoordType  type 
)

Constructor.

Parameters:
barycenter double[3] containing the barycenter of the points to be compared
type plane to project on when comparing. The comparison will not work if all the points are in a plane perpendicular to the plane being projected on

Member Function Documentation

bool INTERP_KERNEL.ProjectedCentralCircularSortOrder.operator() ( const double pt1,
const double pt2 
)

Comparison operator.

Compares the relative position between two points in their ordering around the barycenter.

Parameters:
pt1 a double[3] representing a point
pt2 a double[3] representing a point
Returns:
true if the angle of the difference vector between pt1 and the barycenter is greater than that of the difference vector between pt2 and the barycenter.

References INTERP_KERNEL.ProjectedCentralCircularSortOrder._a, INTERP_KERNEL.ProjectedCentralCircularSortOrder._aIdx, INTERP_KERNEL.ProjectedCentralCircularSortOrder._b, and INTERP_KERNEL.ProjectedCentralCircularSortOrder._bIdx.


Field Documentation

index corresponding to first coordinate of plane on which points are projected

index corresponding to second coordinate of plane on which points are projected

value of first projected coordinate of the barycenter

value of second projected coordinate of the barycenter