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

An interface for classes that iteratively solve velocity constraints for physical objects. More...

#include <omPhysicsConstraint.h>

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

Public Member Functions

virtual ~Constraint ()
 Destroy this constraint. More...
 
virtual void solverStart (const ConstraintRequest &request, UInt32 userID, Float dt)=0
 Initialize the constraint solving for the specified constraint ID and timestep. More...
 
virtual void solverIterate (const ConstraintRequest &request, UInt32 userID, Float dt)=0
 Iterate the solution the constraint solving for the specified constraint ID and timestep. 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...
 
virtual Bool setContext (PhysicsContext *newContext)
 Set a pointer to the physics context this context object should use to do simulation. More...
 
Bool clearContext ()
 Clear the previous context from this object. More...
 

Static Public Attributes

static const ResourceType RESOURCE_TYPE
 The resource type for a constraint. More...
 

Protected Member Functions

 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...
 

Additional Inherited Members

- Protected Attributes inherited from om::physics::context::PhysicsContextObject
PhysicsContextcontext
 A pointer to the physics context this object is using. More...
 

Detailed Description

An interface for classes that iteratively solve velocity constraints for physical objects.

Constructor & Destructor Documentation

virtual om::physics::constraints::Constraint::~Constraint ( )
virtual

Destroy this constraint.

om::physics::constraints::Constraint::Constraint ( const ConstraintType newType)
inlineprotected

Create a Constraint object that has the specified type.

Member Function Documentation

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

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

The constraint is given a user ID by the context that was previously created for this constraint in its context.

The constraint should use this function to setup the initial state for constraint solver for the constraints with those IDs.

Implemented in om::physics::constraints::SphericalJoint, and om::physics::constraints::ContactConstraint.

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

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

The constraint is given a user ID by the context that was previously created for this constraint in its context.

The constraint should use this function to iterate on the previous solution for the constraint solver so that it converges to a global solution.

Implemented in om::physics::constraints::SphericalJoint, and om::physics::constraints::ContactConstraint.

const ConstraintType& om::physics::constraints::Constraint::getType ( ) const
inline

Return an object representing the type of this Constraint.

Member Data Documentation

const ResourceType om::physics::constraints::Constraint::RESOURCE_TYPE
static

The resource type for a constraint.


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