Main Page | Modules | Namespace List | Class Hierarchy | Class List | Directories | Namespace Members | Class Members | Related Pages

Curve2 Class Reference
[XEngineMath Library]

Inheritance diagram for Curve2:

Inheritance graph
[legend]
List of all members.

Detailed Description

This class is the abstract base class for all 2-dimensional planar curves. It defines functions that are only applicable to 2-dimensional curves.

In addition to the tangent vector, a planar curve has two important properties at every point of the curve: curvature and a normal vector. The normal vector is defined as the counterclockwise rotation of the tangent vector. The interface defined by this abstract base class gives access to these parameters.


Public Member Functions

Vector2 GetNormal (real time) const
 Returns the normalized normal vector at the given time.
real GetCurvature (real time) const
 Returns the curvature of the curve at the given time.
Matrix3x3 GetFrame (real time) const
 Returns the curve's coordinate frame (as 3x3 TNP row-major matrix) at the given time.
void GetFrame (real time, Vector2 &position, Vector2 &tangent, Vector2 &normal) const
 Returns the curve's coordinate frame at the given time in the given vectors.


Member Function Documentation

real GetCurvature real  time  )  const
 

Returns the curvature of the curve at the given time. If the curvature is indeterminate (which happens when the speed of the curve at the given time is 0) std::numeric_limits<real>::quiet_NaN() is returned.

void GetFrame real  time,
Vector2 position,
Vector2 tangent,
Vector2 normal
const
 

Returns the curve's coordinate frame at the given time in the given vectors. The normal vector is computed as the counterclockwise rotation of the tangent vector.

Matrix3x3 GetFrame real  time  )  const
 

Returns the curve's coordinate frame at the given time. The returned matrix is a row-major TNP matrix that contains the tangent vector in the first row, the normal vector in the second row, and the position in the third row. The normal vector is computed as the counterclockwise rotation of the tangent vector.

Vector2 GetNormal real  time  )  const
 

Returns the normalized normal vector at the given time. The normal vector is computed as the counterclockwise rotation of the tangent vector.


The documentation for this class was generated from the following files: