Om
1.0.0
A universal framework for multimedia simulation
|
A class that implements a joint with 3 rotational degrees of freedom. More...
#include <omPhysicsSphericalJoint.h>
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... | |
RigidObject * | getObject1 () const |
Return a pointer to first object that is affected by the joint. More... | |
RigidObject * | getObject2 () 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... | |
ObjectState * | getObjectState1 () const |
Return a pointer to first object state that is affected by the joint. More... | |
ObjectState * | getObjectState2 () 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 ConstraintType & | getType () 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... | |
PhysicsContext * | getContext () 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 | |
PhysicsContext * | context |
A pointer to the physics context this object is using. More... | |
A class that implements a joint with 3 rotational degrees of freedom.
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.
|
inline |
Return a pointer to first object that is affected by the joint.
|
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.
|
inline |
Return a pointer to first object state that is affected by the joint.
|
inline |
Return a pointer to second object state that is affected by the joint.
|
inline |
Set a pointer to first object state that is affected by the joint.
|
inline |
Set a pointer to second object state that is affected by the joint.
|
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.
|
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.
|
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.
|
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 |
Initialize the constraint solving for the specified constraint ID and timestep.
Implements om::physics::constraints::Constraint.
|
virtual |
Iterate the solution the constraint solving for the specified constraint ID and timestep.
Implements om::physics::constraints::Constraint.
|
virtual |
Set a pointer to the physics context this constraint should use to do simulation.
Reimplemented from om::physics::context::PhysicsContextObject.
|
virtual |
Add internal context objects to the scene with the specified ID.
|
static |
A constraint type object that represents the type of a spherical joint.