Public Types | |
typedef T | Number |
The number type. | |
typedef ads::FixedArray< 2, T > | Point |
A Cartesian point. | |
typedef geom::ScanConversionPolygon< Number > | Polygon |
A polygon. | |
Public Member Functions | |
Constructors, etc. | |
Face () | |
Default constructor. Uninitialized data. | |
Face (const Point &source, const Point &target, const Point &normal, int index) | |
Construct from points, normal, and indices. | |
Face (const Face &other) | |
Copy constructor. | |
Face & | operator= (const Face &other) |
Assignment operator. | |
void | make (const Point &source, const Point &target, const Point &normal, int index) |
Make from points, the tangent and the normal. | |
~Face () | |
Trivial destructor. | |
Accessors. | |
const Point & | getSource () const |
const Point & | getTarget () const |
Number | getLength () const |
const Point & | getTangent () const |
const Point & | getNormal () const |
int | getFaceIndex () const |
Mathematical operations. | |
Number | computeDistance (const Point &p) const |
Find the signed distance. | |
Number | computeDistanceChecked (const Point &p) const |
Compute distance with checking. | |
Number | computeDistanceUnsigned (const Point &p) const |
Return the unsigned distance to the face. | |
Number | computeDistanceUnsignedChecked (const Point &p) const |
Return the unsigned distance to the face. | |
Number | computeClosestPoint (const Point &p, Point *cp) const |
Find the signed distance and closest point. | |
Number | computeClosestPointChecked (const Point &p, Point *cp) const |
Find the signed distance and closest point. | |
Number | computeClosestPointUnsigned (const Point &p, Point *cp) const |
Find the unsigned distance and closest point. | |
Number | computeClosestPointUnsignedChecked (const Point &p, Point *cp) const |
Find the unsigned distance and closest point. | |
Number | computeGradient (const Point &p, Point *grad) const |
Find the signed distance and the gradient of the distance. | |
Number | computeGradientChecked (const Point &p, Point *grad) const |
Find the signed distance and the gradient of the distance. | |
Number | computeGradientUnsigned (const Point &p, Point *grad) const |
Find the unsigned distance and the gradient of this distance. | |
Number | computeGradientUnsignedChecked (const Point &p, Point *grad) const |
Find the unsigned distance and the gradient of this distance. | |
Number | computeClosestPointAndGradient (const Point &p, Point *cp, Point *grad) const |
Find the signed distance, closest point and gradient of the distance. | |
Number | computeClosestPointAndGradientChecked (const Point &p, Point *cp, Point *grad) const |
Find the signed distance, closest point and gradient of the distance. | |
Number | computeClosestPointAndGradientUnsigned (const Point &p, Point *cp, Point *grad) const |
Find the unsigned distance, closest point and gradient of this distance. | |
Number | computeClosestPointAndGradientUnsignedChecked (const Point &p, Point *cp, Point *grad) const |
Find the unsigned distance, closest point and gradient of this distance. | |
void | buildCharacteristicPolygon (Polygon *polygon, const Number height) const |
Make a polygon that contains the closest points with positive and negative distance. | |
void | buildCharacteristicPolygon (Polygon *polygon, const Face &prev, const Face &next, const Number height) const |
Make a clipped polygon that contains the closest points with either positive or negative distance. |
void Face< 2, T >::buildCharacteristicPolygon | ( | Polygon * | polygon, | |
const Face< 2, T > & | prev, | |||
const Face< 2, T > & | next, | |||
const Number | height | |||
) | const [inline] |
Make a clipped polygon that contains the closest points with either positive or negative distance.
Use the neighboring faces to clip the polygon. This routine enlarges the polygon in the tangential direction but not in the normal direction.
void Face< 2, T >::buildCharacteristicPolygon | ( | Polygon * | polygon, | |
const Number | height | |||
) | const [inline] |
Make a polygon that contains the closest points with positive and negative distance.
This routine enlarges the polygon in the tangential direction but not in the normal direction.
Face< 2, T >::Number Face< 2, T >::computeDistanceChecked | ( | const Point & | p | ) | const [inline] |
Compute distance with checking.
The points that are closest to the face lie in a strip. If the point, p, is within a distance, delta, of being inside the strip then return the distance. Otherwise return infinity.
Number Face< 2, T >::computeDistanceUnsignedChecked | ( | const Point & | p | ) | const [inline] |
Return the unsigned distance to the face.
The points that are closest to the face lie in a strip. If the point, p, is within a distance, delta, of being inside the strip then return the distance. Otherwise return infinity.
void Face< 2, T >::make | ( | const Point & | source, | |
const Point & | target, | |||
const Point & | normal, | |||
int | index | |||
) | [inline] |
Make from points, the tangent and the normal.
If you alread have a Face, this is more efficient than calling the constructor.