Om  1.0.0
A universal framework for multimedia simulation
Public Member Functions | Static Public Attributes | List of all members
om::physics::constraints::SphericalJoint Class Reference

A class that implements a joint with 3 rotational degrees of freedom. More...

#include <omPhysicsSphericalJoint.h>

Inheritance diagram for om::physics::constraints::SphericalJoint:
om::physics::constraints::Constraint om::physics::context::PhysicsSceneObject om::physics::context::PhysicsContextObject

Public Member Functions

 SphericalJoint ()
 Create a new joint with no objects attached. More...
 
 SphericalJoint (ObjectState *newObject1, ObjectState *newObject2, const Vector3f &newLocalR1, const Vector3f &newLocalR2)
 Create a new joint attachment between the specified objects at the given local points. More...
 
 SphericalJoint (RigidObject *newObject1, RigidObject *newObject2, const Vector3f &newLocalR1, const Vector3f &newLocalR2)
 Create a new joint attachment between the specified objects at the given local points. More...
 
RigidObjectgetObject1 () const
 Return a pointer to first object that is affected by the joint. More...
 
RigidObjectgetObject2 () const
 Return a pointer to second object that is affected by the joint. More...
 
void setObject1 (RigidObject *newObject1)
 Set a pointer to first object that is affected by the joint. More...
 
void setObject2 (RigidObject *newObject2)
 Set a pointer to second object that is affected by the joint. More...
 
ObjectStategetObjectState1 () const
 Return a pointer to first object state that is affected by the joint. More...
 
ObjectStategetObjectState2 () const
 Return a pointer to second object state that is affected by the joint. More...
 
void setObjectState1 (ObjectState *newObjectState1)
 Set a pointer to first object state that is affected by the joint. More...
 
void setObjectState2 (ObjectState *newObjectState2)
 Set a pointer to second object state that is affected by the joint. More...
 
const Vector3f & getLocalPoint1 () const
 Return the joint's attachment point on the first object in its local space. More...
 
const Vector3f & getLocalPoint2 () const
 Return the joint's attachment point on the second object in its local space. More...
 
void setLocalPoint1 (const Vector3f &newLocalPoint1)
 Set the joint's attachment point on the first object in its local space. More...
 
void setLocalPoint2 (const Vector3f &newLocalPoint2)
 Set the joint's attachment point on the second object in its local space. More...
 
virtual void solverStart (const ConstraintRequest &request, UInt32 userID, Float dt)
 Initialize the constraint solving for the specified constraint ID and timestep. More...
 
virtual void solverIterate (const ConstraintRequest &request, UInt32 userID, Float dt)
 Iterate the solution the constraint solving for the specified constraint ID and timestep. More...
 
virtual Bool setContext (PhysicsContext *newContext)
 Set a pointer to the physics context this constraint should use to do simulation. More...
 
virtual Bool addSceneObjects (PhysicsSceneID sceneID)
 Add internal context objects to the scene with the specified ID. More...
 
- Public Member Functions inherited from om::physics::constraints::Constraint
virtual ~Constraint ()
 Destroy this constraint. More...
 
const ConstraintTypegetType () const
 Return an object representing the type of this Constraint. More...
 
- Public Member Functions inherited from om::physics::context::PhysicsSceneObject
virtual Bool addSceneObjects (PhysicsSceneID sceneID)
 Add internal context objects to the scene with the specified ID. More...
 
virtual Bool removeSceneObjects (PhysicsSceneID sceneID)
 Remove internal context objects from the scene with the specified ID. More...
 
- Public Member Functions inherited from om::physics::context::PhysicsContextObject
virtual ~PhysicsContextObject ()
 Destory this physics context object. More...
 
PhysicsContextgetContext () const
 Return a pointer to the physics context this context object is using to do simulation. More...
 
Bool clearContext ()
 Clear the previous context from this object. More...
 

Static Public Attributes

static const ConstraintType TYPE
 A constraint type object that represents the type of a spherical joint. More...
 
- Static Public Attributes inherited from om::physics::constraints::Constraint
static const ResourceType RESOURCE_TYPE
 The resource type for a constraint. More...
 

Additional Inherited Members

- Protected Member Functions inherited from om::physics::constraints::Constraint
 Constraint (const ConstraintType *newType)
 Create a Constraint object that has the specified type. More...
 
- Protected Member Functions inherited from om::physics::context::PhysicsContextObject
 PhysicsContextObject ()
 Create a new physics context object that doesn't have an associated physics context. More...
 
 PhysicsContextObject (PhysicsContext *newContext)
 Create a new physics context object that uses the specified context for simulation. More...
 
- Protected Attributes inherited from om::physics::context::PhysicsContextObject
PhysicsContextcontext
 A pointer to the physics context this object is using. More...
 

Detailed Description

A class that implements a joint with 3 rotational degrees of freedom.

Constructor & Destructor Documentation

om::physics::constraints::SphericalJoint::SphericalJoint ( )

Create a new joint with no objects attached.

om::physics::constraints::SphericalJoint::SphericalJoint ( ObjectState newObject1,
ObjectState newObject2,
const Vector3f &  newLocalR1,
const Vector3f &  newLocalR2 
)

Create a new joint attachment between the specified objects at the given local points.

om::physics::constraints::SphericalJoint::SphericalJoint ( RigidObject newObject1,
RigidObject newObject2,
const Vector3f &  newLocalR1,
const Vector3f &  newLocalR2 
)

Create a new joint attachment between the specified objects at the given local points.

Member Function Documentation

RigidObject* om::physics::constraints::SphericalJoint::getObject1 ( ) const
inline

Return a pointer to first object that is affected by the joint.

RigidObject* om::physics::constraints::SphericalJoint::getObject2 ( ) const
inline

Return a pointer to second object that is affected by the joint.

void om::physics::constraints::SphericalJoint::setObject1 ( RigidObject newObject1)

Set a pointer to first object that is affected by the joint.

void om::physics::constraints::SphericalJoint::setObject2 ( RigidObject newObject2)

Set a pointer to second object that is affected by the joint.

ObjectState* om::physics::constraints::SphericalJoint::getObjectState1 ( ) const
inline

Return a pointer to first object state that is affected by the joint.

ObjectState* om::physics::constraints::SphericalJoint::getObjectState2 ( ) const
inline

Return a pointer to second object state that is affected by the joint.

void om::physics::constraints::SphericalJoint::setObjectState1 ( ObjectState newObjectState1)
inline

Set a pointer to first object state that is affected by the joint.

void om::physics::constraints::SphericalJoint::setObjectState2 ( ObjectState newObjectState2)
inline

Set a pointer to second object state that is affected by the joint.

const Vector3f& om::physics::constraints::SphericalJoint::getLocalPoint1 ( ) const
inline

Return the joint's attachment point on the first object in its local space.

If the object is invalid (e.g. NULL), the point is assumed to be in world space.

const Vector3f& om::physics::constraints::SphericalJoint::getLocalPoint2 ( ) const
inline

Return the joint's attachment point on the second object in its local space.

If the object is invalid (e.g. NULL), the point is assumed to be in world space.

void om::physics::constraints::SphericalJoint::setLocalPoint1 ( const Vector3f &  newLocalPoint1)
inline

Set the joint's attachment point on the first object in its local space.

If the object is invalid (e.g. NULL), the point is assumed to be in world space.

void om::physics::constraints::SphericalJoint::setLocalPoint2 ( const Vector3f &  newLocalPoint2)
inline

Set the joint's attachment point on the second object in its local space.

If the object is invalid (e.g. NULL), the point is assumed to be in world space.

virtual void om::physics::constraints::SphericalJoint::solverStart ( const ConstraintRequest request,
UInt32  userID,
Float  dt 
)
virtual

Initialize the constraint solving for the specified constraint ID and timestep.

Implements om::physics::constraints::Constraint.

virtual void om::physics::constraints::SphericalJoint::solverIterate ( const ConstraintRequest request,
UInt32  userID,
Float  dt 
)
virtual

Iterate the solution the constraint solving for the specified constraint ID and timestep.

Implements om::physics::constraints::Constraint.

virtual Bool om::physics::constraints::SphericalJoint::setContext ( PhysicsContext newContext)
virtual

Set a pointer to the physics context this constraint should use to do simulation.

Reimplemented from om::physics::context::PhysicsContextObject.

virtual Bool om::physics::constraints::SphericalJoint::addSceneObjects ( PhysicsSceneID  sceneID)
virtual

Add internal context objects to the scene with the specified ID.

Member Data Documentation

const ConstraintType om::physics::constraints::SphericalJoint::TYPE
static

A constraint type object that represents the type of a spherical joint.


The documentation for this class was generated from the following file: