CrystalSpace

Public API Reference

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

csPath Class Reference
[Geometry utilities]

A path in 3D. More...

#include <csgeom/path.h>

Inheritance diagram for csPath:

csCatmullRomSpline iPath csBSpline iBase csSpline List of all members.

Public Member Functions

 csPath (int p)
 Create a path with p points.
virtual ~csPath ()
 Destroy the path.
int Length ()
 Get the number of vector points in this spline.
void CalculateAtTime (float time)
 Calculate.
int GetCurrentIndex ()
 Get the index of the current point we are in (valid after Calculate()).
float GetTime (int idx)
 Get one time value.
void SetTime (int idx, float t)
 Set one time value.
void SetPositionVectors (csVector3 *v)
 Set the position vectors (first three dimensions of the cubic spline).
void SetUpVectors (csVector3 *v)
 Set the up vectors (dimensions 3 to 5).
void SetForwardVectors (csVector3 *v)
 Set the forward vectors (dimensions 6 to 8).
void SetPositionVector (int idx, const csVector3 &v)
 Set one position vector.
void SetUpVector (int idx, const csVector3 &v)
 Set one up vector.
void SetForwardVector (int idx, const csVector3 &v)
 Set one forward vector.
void GetPositionVector (int idx, csVector3 &v)
 Get one position vector.
void GetUpVector (int idx, csVector3 &v)
 Get one up vector.
void GetForwardVector (int idx, csVector3 &v)
 Get one forward vector.
void GetInterpolatedPosition (csVector3 &pos)
 Get the interpolated position.
void GetInterpolatedUp (csVector3 &pos)
 Get the interpolated up vector.
void GetInterpolatedForward (csVector3 &pos)
 Get the interpolated forward vector.

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 42 of file path.h.


Constructor & Destructor Documentation

csPath::csPath int  p  )  [inline]
 

Create a path with p points.

Definition at line 70 of file path.h.

References SCF_CONSTRUCT_IBASE.

virtual csPath::~csPath  )  [inline, virtual]
 

Destroy the path.

Definition at line 76 of file path.h.

References SCF_DESTRUCT_IBASE.


Member Function Documentation

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

Calculate.

Implements iPath.

Definition at line 84 of file 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 88 of file path.h.

References csSpline::GetCurrentIndex().

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

Get one forward vector.

Implements iPath.

Definition at line 152 of file 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 174 of file 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 160 of file 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 167 of file 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 138 of file 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 92 of file path.h.

References csSpline::GetTimeValue().

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

Get one up vector.

Implements iPath.

Definition at line 145 of file 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 79 of file path.h.

References csSpline::GetPointCount().

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

Set one forward vector.

Implements iPath.

Definition at line 131 of file 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 112 of file path.h.

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

Set one position vector.

Implements iPath.

Definition at line 117 of file 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 102 of file path.h.

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

Set one time value.

Implements iPath.

Definition at line 96 of file path.h.

References csSpline::SetTimeValue().

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

Set one up vector.

Implements iPath.

Definition at line 124 of file 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 107 of file path.h.


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