opal::ThrusterMotor Class Reference

#include <ThrusterMotor.h>

Inheritance diagram for opal::ThrusterMotor:

opal::Motor List of all members.

Public Member Functions

 ThrusterMotor ()
virtual ~ThrusterMotor ()
virtual void OPAL_CALL init (const ThrusterMotorData &data)
virtual const ThrusterMotorData
&OPAL_CALL 
getData () const
virtual MotorType OPAL_CALL getType () const
virtual void OPAL_CALL setName (const std::string &name)
virtual const std::string
&OPAL_CALL 
getName () const
virtual bool OPAL_CALL isEnabled () const
virtual void OPAL_CALL setEnabled (bool e)
virtual void OPAL_CALL setForce (const Force &f)
virtual const Force &OPAL_CALL getForce () const
virtual bool OPAL_CALL internal_dependsOnSolid (Solid *s)
virtual void OPAL_CALL internal_update ()

Protected Attributes

ThrusterMotorData mData

Detailed Description

This Motor provides a constant force/torque on a Solid. Its purpose is to simulate physical phenomena where a constant force is applied to an object, usually found in a rocket thruster.

Definition at line 41 of file ThrusterMotor.h.


Constructor & Destructor Documentation

opal::ThrusterMotor::ThrusterMotor  ) 
 

Definition at line 34 of file ThrusterMotor.cpp.

opal::ThrusterMotor::~ThrusterMotor  )  [virtual]
 

Definition at line 40 of file ThrusterMotor.cpp.


Member Function Documentation

const ThrusterMotorData & opal::ThrusterMotor::getData  )  const [virtual]
 

Returns all data describing the Motor.

Definition at line 57 of file ThrusterMotor.cpp.

References mData.

const Force & opal::ThrusterMotor::getForce  )  const [virtual]
 

Gets the Force applied by this Motor every time step.

Definition at line 106 of file ThrusterMotor.cpp.

References opal::ThrusterMotorData::force, and mData.

const std::string & opal::ThrusterMotor::getName  )  const [virtual]
 

Returns the Motor's name.

Implements opal::Motor.

Definition at line 72 of file ThrusterMotor.cpp.

References mData, and opal::MotorData::name.

MotorType opal::ThrusterMotor::getType  )  const [virtual]
 

Returns the Motor type.

Implements opal::Motor.

Definition at line 62 of file ThrusterMotor.cpp.

References opal::MotorData::getType(), and mData.

void opal::ThrusterMotor::init const ThrusterMotorData data  )  [virtual]
 

Initializes the Motor with the given data structure. If the Solid pointer in the data are NULL, the Motor will do nothing. The Force in this data structure will automatically be set to a "single step" Force.

Definition at line 50 of file ThrusterMotor.cpp.

References opal::ThrusterMotorData::force, opal::Motor::init(), mData, and opal::Force::singleStep.

bool opal::ThrusterMotor::internal_dependsOnSolid Solid s  )  [virtual]
 

Returns true if this Motor depends on the given Solid.

Reimplemented from opal::Motor.

Definition at line 111 of file ThrusterMotor.cpp.

References mData, and opal::ThrusterMotorData::solid.

void opal::ThrusterMotor::internal_update  )  [virtual]
 

Called regularly to update the Motor. This does nothing if the Motor is disabled.

Implements opal::Motor.

Definition at line 92 of file ThrusterMotor.cpp.

References opal::Solid::addForce(), opal::MotorData::enabled, opal::ThrusterMotorData::force, mData, and opal::ThrusterMotorData::solid.

bool opal::ThrusterMotor::isEnabled  )  const [virtual]
 

Returns true if the Motor is enabled.

Implements opal::Motor.

Definition at line 77 of file ThrusterMotor.cpp.

References opal::MotorData::enabled, and mData.

void opal::ThrusterMotor::setEnabled bool  e  )  [virtual]
 

Sets whether the Motor has any effect.

Implements opal::Motor.

Definition at line 82 of file ThrusterMotor.cpp.

References opal::MotorData::enabled, and mData.

void opal::ThrusterMotor::setForce const Force f  )  [virtual]
 

Sets the Force applied by this Motor every time step. The Force in this data structure will automatically be set to a "single step" Force.

Definition at line 100 of file ThrusterMotor.cpp.

References opal::ThrusterMotorData::force, mData, and opal::Force::singleStep.

void opal::ThrusterMotor::setName const std::string &  name  )  [virtual]
 

Sets the Motor's name.

Implements opal::Motor.

Definition at line 67 of file ThrusterMotor.cpp.

References mData, and opal::MotorData::name.


Member Data Documentation

ThrusterMotorData opal::ThrusterMotor::mData [protected]
 

Stores data describing the Motor.

Definition at line 86 of file ThrusterMotor.h.

Referenced by getData(), getForce(), getName(), getType(), init(), internal_dependsOnSolid(), internal_update(), isEnabled(), setEnabled(), setForce(), and setName().


The documentation for this class was generated from the following files:
Generated on Tue May 16 17:49:58 2006 for OPAL by  doxygen 1.4.6-NO