CrystalSpace

Public API Reference

Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

csPath Class Reference
[Geometry utilities]

A path in 3D. More...

#include <path.h>

Inheritance diagram for csPath:

csCatmullRomSpline iPath csBSpline iBase csSpline List of all members.

Public Methods

 csPath (int p)
 Create a path with p points. More...

virtual ~csPath ()
 Destroy the path. More...

int Length ()
 Get the number of vector points in this spline. More...

void CalculateAtTime (float time)
 Calculate. More...

int GetCurrentIndex ()
 Get the index of the current point we are in (valid after Calculate()). More...

float GetTime (int idx)
 Get one time value. More...

void SetTime (int idx, float t)
 Set one time value. More...

void SetPositionVectors (csVector3 *v)
 Set the position vectors (first three dimensions of the cubic spline). More...

void SetUpVectors (csVector3 *v)
 Set the up vectors (dimensions 3 to 5). More...

void SetForwardVectors (csVector3 *v)
 Set the forward vectors (dimensions 6 to 8). More...

void SetPositionVector (int idx, const csVector3 &v)
 Set one position vector. More...

void SetUpVector (int idx, const csVector3 &v)
 Set one up vector. More...

void SetForwardVector (int idx, const csVector3 &v)
 Set one forward vector. More...

void GetPositionVector (int idx, csVector3 &v)
 Get one position vector. More...

void GetUpVector (int idx, csVector3 &v)
 Get one up vector. More...

void GetForwardVector (int idx, csVector3 &v)
 Get one forward vector. More...

void GetInterpolatedPosition (csVector3 &pos)
 Get the interpolated position. More...

void GetInterpolatedUp (csVector3 &pos)
 Get the interpolated up vector. More...

void GetInterpolatedForward (csVector3 &pos)
 Get the interpolated forward vector. More...


Detailed Description

A path in 3D.

An object or camera can use this object to trace a path in 3D. This is particularly useful in combination with csReversibleTransform::LookAt().

Definition at line 40 of file csgeom/path.h.


Constructor & Destructor Documentation

csPath::csPath int    p [inline]
 

Create a path with p points.

Definition at line 68 of file csgeom/path.h.

virtual csPath::~csPath   [inline, virtual]
 

Destroy the path.

Definition at line 71 of file csgeom/path.h.


Member Function Documentation

void csPath::CalculateAtTime float    time [inline, virtual]
 

Calculate.

Implements iPath.

Definition at line 79 of file csgeom/path.h.

References csBSpline::Calculate.

int csPath::GetCurrentIndex   [inline, virtual]
 

Get the index of the current point we are in (valid after Calculate()).

Implements iPath.

Definition at line 83 of file csgeom/path.h.

References csSpline::GetCurrentIndex.

void csPath::GetForwardVector int    idx,
csVector3   v
[inline, virtual]
 

Get one forward vector.

Implements iPath.

Definition at line 147 of file csgeom/path.h.

References csSpline::GetDimensionValue, csVector3::x, csVector3::y, and csVector3::z.

void csPath::GetInterpolatedForward csVector3   pos [inline, virtual]
 

Get the interpolated forward vector.

Implements iPath.

Definition at line 169 of file csgeom/path.h.

References csBSpline::GetInterpolatedDimension, csVector3::x, csVector3::y, and csVector3::z.

void csPath::GetInterpolatedPosition csVector3   pos [inline, virtual]
 

Get the interpolated position.

Implements iPath.

Definition at line 155 of file csgeom/path.h.

References csBSpline::GetInterpolatedDimension, csVector3::x, csVector3::y, and csVector3::z.

void csPath::GetInterpolatedUp csVector3   pos [inline, virtual]
 

Get the interpolated up vector.

Implements iPath.

Definition at line 162 of file csgeom/path.h.

References csBSpline::GetInterpolatedDimension, csVector3::x, csVector3::y, and csVector3::z.

void csPath::GetPositionVector int    idx,
csVector3   v
[inline, virtual]
 

Get one position vector.

Implements iPath.

Definition at line 133 of file csgeom/path.h.

References csSpline::GetDimensionValue, csVector3::x, csVector3::y, and csVector3::z.

float csPath::GetTime int    idx [inline, virtual]
 

Get one time value.

Implements iPath.

Definition at line 87 of file csgeom/path.h.

References csSpline::GetTimeValue.

void csPath::GetUpVector int    idx,
csVector3   v
[inline, virtual]
 

Get one up vector.

Implements iPath.

Definition at line 140 of file csgeom/path.h.

References csSpline::GetDimensionValue, csVector3::x, csVector3::y, and csVector3::z.

int csPath::Length   [inline, virtual]
 

Get the number of vector points in this spline.

Implements iPath.

Definition at line 74 of file csgeom/path.h.

References csSpline::GetPointCount.

void csPath::SetForwardVector int    idx,
const csVector3   v
[inline, virtual]
 

Set one forward vector.

Implements iPath.

Definition at line 126 of file csgeom/path.h.

References csSpline::SetDimensionValue, csVector3::x, csVector3::y, and csVector3::z.

void csPath::SetForwardVectors csVector3   v [inline, virtual]
 

Set the forward vectors (dimensions 6 to 8).

Implements iPath.

Definition at line 107 of file csgeom/path.h.

void csPath::SetPositionVector int    idx,
const csVector3   v
[inline, virtual]
 

Set one position vector.

Implements iPath.

Definition at line 112 of file csgeom/path.h.

References csSpline::SetDimensionValue, csVector3::x, csVector3::y, and csVector3::z.

void csPath::SetPositionVectors csVector3   v [inline, virtual]
 

Set the position vectors (first three dimensions of the cubic spline).

Implements iPath.

Definition at line 97 of file csgeom/path.h.

void csPath::SetTime int    idx,
float    t
[inline, virtual]
 

Set one time value.

Implements iPath.

Definition at line 91 of file csgeom/path.h.

References csSpline::SetTimeValue.

void csPath::SetUpVector int    idx,
const csVector3   v
[inline, virtual]
 

Set one up vector.

Implements iPath.

Definition at line 119 of file csgeom/path.h.

References csSpline::SetDimensionValue, csVector3::x, csVector3::y, and csVector3::z.

void csPath::SetUpVectors csVector3   v [inline, virtual]
 

Set the up vectors (dimensions 3 to 5).

Implements iPath.

Definition at line 102 of file csgeom/path.h.


The documentation for this class was generated from the following file:
Generated for Crystal Space by doxygen 1.2.14