vtf-logo

Vertex< 2, T > Class Template Reference

A vertex in 2-D. More...

List of all members.

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.
 Vertex ()
 Default constructor. Uninitialized data.
 Vertex (const Point &location, const Point &rightNormal, const Point &leftNormal, const int faceIndex)
 Construct from a point and edge information.
 Vertex (const Vertex &other)
 Copy constructor.
Vertex & operator= (const Vertex &other)
 Assignment operator.
void make (const Point &location, const Point &rightNormal, const Point &leftNormal, const int faceIndex)
 Make from a point and edge information.
 ~Vertex ()
 Trivial destructor.
Accessors.
const PointgetLocation () const
 The location of the vertex.
const PointgetRightNormal () const
 The normal of the right adjacent edge.
const PointgetLeftNormal () const
 The normal of the left adjacent edge.
int getFaceIndex () const
 The index of an adjacent face.
int getSignOfDistance () const
 The sign of the distance to this vertex.
bool isConvexOrConcave () const
 Return true if the curve is convex or concave.
Mathematical operations.
Number computeDistance (const Point &p) const
 Return the signed distance to the vertex.
Number computeDistanceChecked (const Point &p) const
 Return the signed distance to the vertex.
Number computeDistanceUnsigned (const Point &p) const
 Return the unsigned distance to the vertex.
Number computeDistanceUnsignedChecked (const Point &p) const
 Return the unsigned distance to the vertex.
Number computeClosestPoint (const Point &p, Point *cp) const
 Return distance. Compute closest point.
Number computeClosestPointChecked (const Point &p, Point *cp) const
 Return distance. Compute closest point.
Number computeClosestPointUnsigned (const Point &p, Point *cp) const
 Return unsigned distance. Compute closest point.
Number computeClosestPointUnsignedChecked (const Point &p, Point *cp) const
 Return unsigned distance. Compute closest point.
Number computeGradient (const Point &p, Point *grad) const
 Return the distance. Compute gradient of the distance.
Number computeGradientChecked (const Point &p, Point *grad) const
 Return the distance. Compute gradient of the distance.
Number computeGradientUnsigned (const Point &p, Point *grad) const
 Return the unsigned distance. Compute the gradient of this distance.
Number computeGradientUnsignedChecked (const Point &p, Point *grad) const
 Return the unsigned distance. Compute the gradient of this distance.
Number computeClosestPointAndGradient (const Point &p, Point *cp, Point *grad) const
 Return the distance. Compute the closest point and the gradient of the distance.
Number computeClosestPointAndGradientChecked (const Point &p, Point *cp, Point *grad) const
 Return the distance. Compute the closest point and the gradient of the distance.
Number computeClosestPointAndGradientUnsigned (const Point &p, Point *cp, Point *grad) const
 Return the unsigned distance. Compute the closest point and the gradient of this distance.
Number computeClosestPointAndGradientUnsignedChecked (const Point &p, Point *cp, Point *grad) const
 Return the unsigned distance. Compute the closest point and the gradient of this distance.
void buildCharacteristicPolygon (Polygon *polygon, Number height) const
 Make a polygon that contains the closest points for signed distance.
void buildCharacteristicPolygonUnsigned (Polygon *polygon, Number height) const
 Make a polygon that contains the closest points for unsigned distance.


Detailed Description

template<typename T>
class Vertex< 2, T >

A vertex in 2-D.


Constructor & Destructor Documentation

template<typename T>
Vertex< 2, T >::Vertex ( const Point location,
const Point rightNormal,
const Point leftNormal,
const int  faceIndex 
) [inline]

Construct from a point and edge information.

Construct from a point, its neighboring face normals and the index of an adjacent face. The neighbors are given in positive order.


Member Function Documentation

template<typename T>
Vertex< 2, T >::Number Vertex< 2, T >::computeClosestPointAndGradientChecked ( const Point p,
Point cp,
Point grad 
) const [inline]

Return the distance. Compute the closest point and the gradient of the distance.

Use the vertex normal to determine the sign.

template<typename T>
Vertex< 2, T >::Number Vertex< 2, T >::computeClosestPointChecked ( const Point p,
Point cp 
) const [inline]

Return distance. Compute closest point.

Use the vertex normal to determine the sign.

template<typename T>
Number Vertex< 2, T >::computeDistanceChecked ( const Point p  )  const [inline]

Return the signed distance to the vertex.

Use the vertex normal to determine the sign.

template<typename T>
Vertex< 2, T >::Number Vertex< 2, T >::computeGradientChecked ( const Point p,
Point grad 
) const [inline]

Return the distance. Compute gradient of the distance.

Use the vertex normal to determine the sign.

template<typename T>
void Vertex< 2, T >::make ( const Point location,
const Point rightNormal,
const Point leftNormal,
const int  faceIndex 
) [inline]

Make from a point and edge information.

If you already have a Vertex, this is more efficient than calling the constructor.


The documentation for this class was generated from the following file:
Generated on Fri Aug 24 12:55:44 2007 for Closest Point Transform by  doxygen 1.4.7