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

OpenCAL::RigidBody Class Reference

#include <RigidBody.h>

Inheritance diagram for OpenCAL::RigidBody:

Inheritance graph
[legend]
Collaboration diagram for OpenCAL::RigidBody:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 RigidBody (System *parent, float mass=1.0)
const Vector3 & getAngularMomentum () const
Vector3 * getAngularMomentumP ()
const Vector3 & getTorque () const
Vector3 * getTorqueP ()
const Matrix33 & getInvInertia () const
Matrix33 * getInvInertiaP ()
void setTorque (const Vector3 &torque)
void addTorque (const Vector3 &torque)
Vector3 getAngularVelocity () const
void setAngularVelocity (const Vector3 &velocity)
virtual void addForce (const Vector3 &force, const Vector3 &position)
virtual void initialize ()
virtual void calculateVolume ()=0
virtual void calculateInversedInertia ()=0
virtual void addToState (PhaseSpace *state)
virtual void addToDerivative (PhaseSpace *deriv)
virtual void fromState (PhaseSpace *state)
virtual void disable ()

Protected Attributes

Vector3 m_angularMomentum
Vector3 m_torque
Matrix33 m_inertia
Matrix33 m_invInertia
 (inverse) Inertia tensor in body coördinates
float m_volume

Detailed Description

This class represents a rigid body, so a physical object with a position and an orientation.

Definition at line 31 of file RigidBody.h.


Member Function Documentation

void RigidBody::addToDerivative PhaseSpace deriv  )  [virtual]
 

Implements OpenCAL::PhysicalObject.

Definition at line 109 of file RigidBody.cpp.

References OpenCAL::PhaseSpace::concat(), OpenCAL::PhaseSpace::concatZeros(), m_invInertia, and OpenCAL::Utils::Quaternion::toMatrix33().

Here is the call graph for this function:

void RigidBody::fromState PhaseSpace state  )  [virtual]
 

Should this be done here?

Implements OpenCAL::PhysicalObject.

Definition at line 148 of file RigidBody.cpp.

References OpenCAL::PhaseSpace::getNext(), OpenCAL::Utils::Quaternion::setScalar(), OpenCAL::Utils::Quaternion::setVector(), and OpenCAL::PhaseSpace::skip().

Here is the call graph for this function:

void RigidBody::setAngularVelocity const Vector3 &  velocity  ) 
 

Definition at line 63 of file RigidBody.cpp.

References m_invInertia, and OpenCAL::Utils::Quaternion::toMatrix33().

Here is the call graph for this function:


The documentation for this class was generated from the following files:
Generated on Sun Aug 15 19:19:34 2004 for OpenCAL: Open Computer Animation Library by doxygen 1.3.8