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.

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


Constructor & Destructor Documentation

csPath::csPath int    p [inline]
 

Create a path with p points.

Definition at line 68 of file path.h.

References SCF_CONSTRUCT_IBASE.

virtual csPath::~csPath   [inline, virtual]
 

Destroy the path.

Definition at line 74 of file path.h.

References SCF_DESTRUCT_IBASE.


Member Function Documentation

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

Calculate.

Implements iPath.

Definition at line 82 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 86 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 150 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 172 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 158 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 165 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 136 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 90 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 143 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 77 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 129 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 110 of file path.h.

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

Set one position vector.

Implements iPath.

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

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

Set one time value.

Implements iPath.

Definition at line 94 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 122 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 105 of file path.h.


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