Om
1.0.0
A universal framework for multimedia simulation
|
A class that applies a force to a point on an object. More...
#include <omPhysicsThruster.h>
Public Member Functions | |
Thruster () | |
Create a new thruster with no object attached and with zero thrust. More... | |
Thruster (ObjectState *newObject, const Vector3f &newLocalPoint, const Vector3f &newLocalDirection, Float newThrust=Float(0)) | |
Create a new thruster for the specified object with the given local point and direction. More... | |
Thruster (RigidObject *newObject, const Vector3f &newLocalPoint, const Vector3f &newLocalDirection, Float newThrust=Float(0)) | |
Create a new thruster for the specified object with the given local point and direction. More... | |
RigidObject * | getObject () const |
Return a pointer to object that is affected by the thruster. More... | |
void | setObject (RigidObject *newObject) |
Set a pointer to object that is affected by the thruster. More... | |
ObjectState * | getObjectState () const |
Return a pointer to object state that is affected by the thruster. More... | |
void | setObjectState (ObjectState *newObjectState) |
Set a pointer to object state that is affected by the thruster. More... | |
const Vector3f & | getLocalPoint () const |
Return the thruster's attachment point on the object in its local space. More... | |
void | setLocalPoint (const Vector3f &newLocalPoint) |
Set the thruster's attachment point on the object in its local space. More... | |
const Vector3f & | getLocalDirection () const |
Return the thruster's attachment point on the object in its local space. More... | |
void | setLocalDirection (const Vector3f &newLocalDirection) |
Set the thruster's force vector direction in the object's local space. More... | |
Float | getThrust () const |
Return the current force applied by this thruster in newtons. More... | |
void | setThrust (Float newThrust) |
Set the current force applied by this thruster in newtons. More... | |
virtual void | applyForce (Float dt) |
Apply force vectors to all objects that this Force effects. More... | |
virtual Bool | setContext (PhysicsContext *newContext) |
Set a pointer to the physics context this force field 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::forces::Force | |
virtual | ~Force () |
Destory this force object. More... | |
const ForceType & | getType () const |
Return an object representing the type of this Force. 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 ForceType | TYPE |
A force type object that represents the type of a thruster. More... | |
Static Public Attributes inherited from om::physics::forces::Force | |
static const ResourceType | RESOURCE_TYPE |
The resource type for a force. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from om::physics::forces::Force | |
Force (const ForceType *newType) | |
Create a Force 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 applies a force to a point on an object.
om::physics::forces::Thruster::Thruster | ( | ) |
Create a new thruster with no object attached and with zero thrust.
om::physics::forces::Thruster::Thruster | ( | ObjectState * | newObject, |
const Vector3f & | newLocalPoint, | ||
const Vector3f & | newLocalDirection, | ||
Float | newThrust = Float(0) |
||
) |
Create a new thruster for the specified object with the given local point and direction.
om::physics::forces::Thruster::Thruster | ( | RigidObject * | newObject, |
const Vector3f & | newLocalPoint, | ||
const Vector3f & | newLocalDirection, | ||
Float | newThrust = Float(0) |
||
) |
Create a new thruster for the specified object with the given local point and direction.
|
inline |
Return a pointer to object that is affected by the thruster.
void om::physics::forces::Thruster::setObject | ( | RigidObject * | newObject | ) |
Set a pointer to object that is affected by the thruster.
|
inline |
Return a pointer to object state that is affected by the thruster.
|
inline |
Set a pointer to object state that is affected by the thruster.
|
inline |
Return the thruster's attachment point on the object in its local space.
|
inline |
Set the thruster's attachment point on the object in its local space.
|
inline |
Return the thruster's attachment point on the object in its local space.
void om::physics::forces::Thruster::setLocalDirection | ( | const Vector3f & | newLocalDirection | ) |
Set the thruster's force vector direction in the object's local space.
|
inline |
Return the current force applied by this thruster in newtons.
|
inline |
Set the current force applied by this thruster in newtons.
The thrust amount may be negative, indicating thrust in the opposite direction.
|
virtual |
Apply force vectors to all objects that this Force effects.
These force vectors should be based on the internal configuration of the force system.
Implements om::physics::forces::Force.
|
virtual |
Set a pointer to the physics context this force field 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 force type object that represents the type of a thruster.