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

A class that applies a force to a point on an object. More...

#include <omPhysicsThruster.h>

Inheritance diagram for om::physics::forces::Thruster:
om::physics::forces::Force om::physics::context::PhysicsSceneObject om::physics::context::PhysicsContextObject

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...
 
RigidObjectgetObject () 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...
 
ObjectStategetObjectState () 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 ForceTypegetType () 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...
 
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 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
PhysicsContextcontext
 A pointer to the physics context this object is using. More...
 

Detailed Description

A class that applies a force to a point on an object.

Constructor & Destructor Documentation

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.

Member Function Documentation

RigidObject* om::physics::forces::Thruster::getObject ( ) const
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.

ObjectState* om::physics::forces::Thruster::getObjectState ( ) const
inline

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

void om::physics::forces::Thruster::setObjectState ( ObjectState newObjectState)
inline

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

const Vector3f& om::physics::forces::Thruster::getLocalPoint ( ) const
inline

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

void om::physics::forces::Thruster::setLocalPoint ( const Vector3f &  newLocalPoint)
inline

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

const Vector3f& om::physics::forces::Thruster::getLocalDirection ( ) const
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.

Float om::physics::forces::Thruster::getThrust ( ) const
inline

Return the current force applied by this thruster in newtons.

void om::physics::forces::Thruster::setThrust ( Float  newThrust)
inline

Set the current force applied by this thruster in newtons.

The thrust amount may be negative, indicating thrust in the opposite direction.

virtual void om::physics::forces::Thruster::applyForce ( Float  dt)
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 Bool om::physics::forces::Thruster::setContext ( PhysicsContext newContext)
virtual

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

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

virtual Bool om::physics::forces::Thruster::addSceneObjects ( PhysicsSceneID  sceneID)
virtual

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

Member Data Documentation

const ForceType om::physics::forces::Thruster::TYPE
static

A force type object that represents the type of a thruster.


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