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

sheep::FixedPathJoint Class Reference

#include <joints.h>

Inheritance diagram for sheep::FixedPathJoint:

sheep::Joint List of all members.

Public Member Functions

 FixedPathJoint (RigidBody *body, const Vector3 &anchor, const Vector3 *ccp, int nccp)
virtual ~FixedPathJoint ()
virtual void Update ()
virtual Real GetError ()
virtual void CorrectError ()

Private Member Functions

void project_on_curve (const Vector3 &p, int *seg, Real *t) const

Private Attributes

Vector3 m_anchor
Vector3m_ccp
int m_nccp

Detailed Description

Todo:
Modify to allow use of any piecewise curve.

Definition at line 85 of file joints.h.


Constructor & Destructor Documentation

FixedPathJoint::FixedPathJoint RigidBody body,
const Vector3 anchor,
const Vector3 ccp,
int  nccp
 

Definition at line 172 of file joints.cpp.

References m_anchor, m_ccp, and m_nccp.

FixedPathJoint::~FixedPathJoint  )  [inline, virtual]
 

Definition at line 211 of file joints.h.


Member Function Documentation

void FixedPathJoint::CorrectError  )  [virtual]
 

Implements sheep::Joint.

Definition at line 247 of file joints.cpp.

References sheep::CatmullRomCurve3::GetPointAt(), m_anchor, m_ccp, project_on_curve(), sheep::Real, and sheep::RigidBody::TransformPointToWorld().

Real FixedPathJoint::GetError  )  [virtual]
 

Implements sheep::Joint.

Definition at line 242 of file joints.cpp.

References sheep::Real.

void FixedPathJoint::project_on_curve const Vector3 p,
int *  seg,
Real t
const [private]
 

Definition at line 278 of file joints.cpp.

References sheep::EPS, sheep::FixedPathJoint::DistanceFunction::EvaluateAt(), sheep::FindRoot(), sheep::CatmullRomCurve3::GetPointAt(), m_ccp, m_nccp, and sheep::Real.

Referenced by CorrectError(), and Update().

void FixedPathJoint::Update  )  [virtual]
 

Implements sheep::Joint.

Definition at line 194 of file joints.cpp.

References sheep::build_basis(), sheep::CatmullRomCurve3::GetTangentAt(), m_anchor, m_ccp, sheep::Vector3::m_x, sheep::Vector3::m_y, sheep::Vector3::m_z, project_on_curve(), sheep::Real, and sheep::RigidBody::TransformVectorToWorld().


Member Data Documentation

Vector3 sheep::FixedPathJoint::m_anchor [private]
 

Definition at line 100 of file joints.h.

Referenced by CorrectError(), FixedPathJoint(), and Update().

Vector3* sheep::FixedPathJoint::m_ccp [private]
 

Definition at line 102 of file joints.h.

Referenced by CorrectError(), FixedPathJoint(), project_on_curve(), and Update().

int sheep::FixedPathJoint::m_nccp [private]
 

Definition at line 103 of file joints.h.

Referenced by FixedPathJoint(), and project_on_curve().


The documentation for this class was generated from the following files:
Generated on Tue May 11 01:31:56 2004 for toxic by doxygen 1.3.6