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

sheep::RigidBody Class Reference

#include <rigidbody.h>

List of all members.

Public Types

typedef IDE1Solver< StateVectorStateDESolver

Public Member Functions

 RigidBody (Real mass, const Matrix3 &inertia)
 ~RigidBody ()
Real GetMass () const
const Matrix3GetInertiaTensor () const
Matrix3 GetWorldInertiaTensor () const
void Freeze ()
void Unfreeze ()
bool IsFrozen () const
void SetPosition (const Vector3 &x)
const Vector3GetPosition () const
void SetOrientation (const Quaternion &q)
const QuaternionGetOrientation () const
void SetLinearVelocity (const Vector3 &v)
Vector3 GetLinearVelocity () const
void SetAngularVelocity (const Vector3 &omega)
Vector3 GetAngularVelocity () const
Real GetKineticEnergy () const
Vector3 TransformVectorToWorld (const Vector3 &v) const
Vector3 TransformVectorToBody (const Vector3 &v) const
Vector3 TransformPointToWorld (const Vector3 &p) const
Vector3 TransformPointToBody (const Vector3 &p) const
Vector3 GetPointVelocity (const Vector3 &p) const
void ApplyForce (const Vector3 &f)
void ApplyForce (const Vector3 &f, const Vector3 &p)
void ApplyTorque (const Vector3 &t)
void ZeroForce ()
void ZeroTorque ()
Vector3 GetTotalForce () const
Vector3 GetTotalTorque () const
void ApplyLinearImpulse (const Vector3 &j)
void ApplyAngularImpulse (const Vector3 &j)
void SetState (const StateVector &s)
StateVector GetState () const
void EvolveOneStep (const StateDESolver &solver, Real t, Real h)

Private Attributes

Real m_mass
Matrix3 m_inertia
bool m_is_frozen
StateVector m_state
StateVectorDEm_state_de
Vector3 m_total_force
Vector3 m_total_torque

Friends

class StateVectorDE


Member Typedef Documentation

typedef IDE1Solver<StateVector> sheep::RigidBody::StateDESolver
 

Definition at line 61 of file rigidbody.h.

Referenced by EvolveOneStep().


Constructor & Destructor Documentation

RigidBody::RigidBody Real  mass,
const Matrix3 inertia
 

Definition at line 60 of file rigidbody.cpp.

References sheep::Matrix3::Determinant(), EPSILON, sheep::fnz(), m_inertia, m_is_frozen, sheep::RigidBody::StateVector::m_L, m_mass, sheep::RigidBody::StateVector::m_P, sheep::RigidBody::StateVector::m_q, m_state, m_state_de, m_total_force, m_total_torque, sheep::RigidBody::StateVector::m_x, sheep::Real, and StateVectorDE.

RigidBody::~RigidBody  ) 
 

Definition at line 85 of file rigidbody.cpp.

References m_state_de.


Member Function Documentation

void RigidBody::ApplyAngularImpulse const Vector3 j  )  [inline]
 

Definition at line 399 of file rigidbody.h.

Referenced by sheep::Contact::CancelNormalVelocity(), and sheep::ContactHandler::resolve_col_contact().

void RigidBody::ApplyForce const Vector3 f,
const Vector3 p
[inline]
 

Definition at line 358 of file rigidbody.h.

void RigidBody::ApplyForce const Vector3 f  )  [inline]
 

Definition at line 352 of file rigidbody.h.

Referenced by sheep::RCTracker::ResolveAll(), and sheep::Subspace::Step().

void RigidBody::ApplyLinearImpulse const Vector3 j  )  [inline]
 

Definition at line 393 of file rigidbody.h.

Referenced by sheep::Contact::CancelNormalVelocity(), and sheep::ContactHandler::resolve_col_contact().

void RigidBody::ApplyTorque const Vector3 t  )  [inline]
 

Definition at line 366 of file rigidbody.h.

Referenced by sheep::Subspace::Step().

void RigidBody::EvolveOneStep const StateDESolver solver,
Real  t,
Real  h
 

Definition at line 89 of file rigidbody.cpp.

References EPSILON, sheep::IDE1Solver< T >::Integrate(), sheep::RigidBody::StateVector::m_q, m_state, m_state_de, sheep::Quaternion::Normalized(), sheep::Real, and StateDESolver.

Referenced by sheep::Subspace::step_bodies().

void RigidBody::Freeze  )  [inline]
 

Definition at line 246 of file rigidbody.h.

Vector3 RigidBody::GetAngularVelocity  )  const [inline]
 

Definition at line 307 of file rigidbody.h.

Referenced by sheep::RCTracker::compute_b_vector(), sheep::Contact::GetNormalDerivative(), and sheep::Subspace::Step().

const Matrix3 & RigidBody::GetInertiaTensor  )  const [inline]
 

Definition at line 226 of file rigidbody.h.

Real RigidBody::GetKineticEnergy  )  const [inline]
 

Definition at line 312 of file rigidbody.h.

Vector3 RigidBody::GetLinearVelocity  )  const [inline]
 

Definition at line 294 of file rigidbody.h.

Referenced by sheep::Subspace::Step().

Real RigidBody::GetMass  )  const [inline]
 

Definition at line 219 of file rigidbody.h.

Referenced by sheep::JointManager::ApplyContraints(), sheep::Contact::CancelNormalVelocity(), sheep::RCTracker::compute_A_matrix(), sheep::RCTracker::compute_b_vector(), and sheep::ContactHandler::resolve_col_contact().

const Quaternion & RigidBody::GetOrientation  )  const [inline]
 

Definition at line 281 of file rigidbody.h.

Referenced by sheep::SWIFTCollisionDetector::RefreshTransformations(), and sheep::IFrameworkApp::TransformTo().

Vector3 RigidBody::GetPointVelocity const Vector3 p  )  const [inline]
 

Definition at line 347 of file rigidbody.h.

Referenced by sheep::Contact::Update().

const Vector3 & RigidBody::GetPosition  )  const [inline]
 

Definition at line 271 of file rigidbody.h.

Referenced by sheep::SWIFTCollisionDetector::RefreshTransformations(), sheep::IFrameworkApp::TransformTo(), and sheep::Contact::Update().

STATEVECTOR RigidBody::GetState  )  const [inline]
 

Definition at line 411 of file rigidbody.h.

Vector3 RigidBody::GetTotalForce  )  const [inline]
 

Definition at line 383 of file rigidbody.h.

Referenced by sheep::RCTracker::compute_b_vector().

Vector3 RigidBody::GetTotalTorque  )  const [inline]
 

Definition at line 388 of file rigidbody.h.

Referenced by sheep::RCTracker::compute_b_vector().

Matrix3 RigidBody::GetWorldInertiaTensor  )  const [inline]
 

Definition at line 233 of file rigidbody.h.

Referenced by sheep::JointManager::ApplyContraints(), sheep::Contact::CancelNormalVelocity(), sheep::RCTracker::compute_A_matrix(), sheep::RCTracker::compute_b_vector(), and sheep::ContactHandler::resolve_col_contact().

bool RigidBody::IsFrozen  )  const [inline]
 

Definition at line 261 of file rigidbody.h.

Referenced by sheep::JointManager::ApplyContraints(), sheep::Contact::CancelNormalVelocity(), sheep::RCTracker::compute_A_matrix(), sheep::RCTracker::compute_b_vector(), sheep::ContactHandler::resolve_col_contact(), and sheep::Subspace::step_bodies().

void RigidBody::SetAngularVelocity const Vector3 omega  )  [inline]
 

Definition at line 299 of file rigidbody.h.

void RigidBody::SetLinearVelocity const Vector3 v  )  [inline]
 

Definition at line 286 of file rigidbody.h.

void RigidBody::SetOrientation const Quaternion q  )  [inline]
 

Definition at line 276 of file rigidbody.h.

void RigidBody::SetPosition const Vector3 x  )  [inline]
 

Definition at line 266 of file rigidbody.h.

void sheep::RigidBody::SetState const StateVector s  )  [inline]
 

Vector3 RigidBody::TransformPointToBody const Vector3 p  )  const [inline]
 

Definition at line 342 of file rigidbody.h.

Referenced by sheep::Contact::Update().

Vector3 RigidBody::TransformPointToWorld const Vector3 p  )  const [inline]
 

Definition at line 337 of file rigidbody.h.

Referenced by sheep::FixedPathJoint::CorrectError(), sheep::SphericalJoint::GetError(), sheep::Contact::GetNormalDerivative(), and sheep::Contact::Update().

Vector3 RigidBody::TransformVectorToBody const Vector3 v  )  const [inline]
 

Definition at line 330 of file rigidbody.h.

Vector3 RigidBody::TransformVectorToWorld const Vector3 v  )  const [inline]
 

Definition at line 323 of file rigidbody.h.

Referenced by sheep::Contact::CancelNormalVelocity(), sheep::RCTracker::compute_A_matrix(), sheep::RCTracker::compute_b_vector(), sheep::ContactHandler::resolve_col_contact(), sheep::FixedPathJoint::Update(), and sheep::SphericalJoint::Update().

void RigidBody::Unfreeze  )  [inline]
 

Definition at line 256 of file rigidbody.h.

void RigidBody::ZeroForce  )  [inline]
 

Definition at line 373 of file rigidbody.h.

Referenced by sheep::Subspace::Step().

void RigidBody::ZeroTorque  )  [inline]
 

Definition at line 378 of file rigidbody.h.

Referenced by sheep::Subspace::Step().


Friends And Related Function Documentation

friend class StateVectorDE [friend]
 

Definition at line 150 of file rigidbody.h.

Referenced by RigidBody().


Member Data Documentation

Matrix3 sheep::RigidBody::m_inertia [private]
 

Definition at line 136 of file rigidbody.h.

Referenced by RigidBody().

bool sheep::RigidBody::m_is_frozen [private]
 

Definition at line 138 of file rigidbody.h.

Referenced by RigidBody().

Real sheep::RigidBody::m_mass [private]
 

Definition at line 133 of file rigidbody.h.

Referenced by RigidBody().

StateVector sheep::RigidBody::m_state [private]
 

Definition at line 140 of file rigidbody.h.

Referenced by EvolveOneStep(), and RigidBody().

StateVectorDE* sheep::RigidBody::m_state_de [private]
 

Definition at line 153 of file rigidbody.h.

Referenced by EvolveOneStep(), RigidBody(), and ~RigidBody().

Vector3 sheep::RigidBody::m_total_force [private]
 

Definition at line 156 of file rigidbody.h.

Referenced by RigidBody().

Vector3 sheep::RigidBody::m_total_torque [private]
 

Definition at line 159 of file rigidbody.h.

Referenced by RigidBody().


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