#include <Motor.h>
Inheritance diagram for opal::Motor:
Public Member Functions | |
Motor () | |
virtual void OPAL_CALL | setEnabled (bool e)=0 |
virtual bool OPAL_CALL | isEnabled () const =0 |
virtual void OPAL_CALL | setUserData (void *data) |
virtual void *OPAL_CALL | getUserData () |
virtual MotorType OPAL_CALL | getType () const =0 |
virtual void OPAL_CALL | setName (const std::string &name)=0 |
virtual const std::string &OPAL_CALL | getName () const =0 |
virtual void OPAL_CALL | internal_update ()=0 |
virtual bool OPAL_CALL | internal_dependsOnSolid (Solid *s) |
virtual bool OPAL_CALL | internal_dependsOnJoint (Joint *j) |
virtual void OPAL_CALL | internal_destroy () |
Protected Member Functions | |
virtual | ~Motor () |
void | init () |
Protected Attributes | |
void * | mUserData |
bool | mInitCalled |
Definition at line 47 of file Motor.h.
|
Definition at line 32 of file Motor.cpp. References mInitCalled, and setUserData(). |
|
|
|
Returns the Motor's name.
Implemented in opal::AttractorMotor, opal::GearedMotor, opal::ServoMotor, opal::SpringMotor, opal::ThrusterMotor, and opal::VelocityMotor. Referenced by opal::BlueprintInstance::internal_addMotor(). |
|
Returns the Motor type.
Implemented in opal::AttractorMotor, opal::GearedMotor, opal::ServoMotor, opal::SpringMotor, opal::ThrusterMotor, and opal::VelocityMotor. |
|
Returns the user data pointer (NULL if it has not been set).
Definition at line 58 of file Motor.cpp. References mUserData. |
|
Called by subclasses when they are initialized.
Definition at line 48 of file Motor.cpp. References mInitCalled. Referenced by opal::VelocityMotor::init(), opal::ThrusterMotor::init(), opal::SpringMotor::init(), opal::ServoMotor::init(), opal::GearedMotor::init(), and opal::AttractorMotor::init(). |
|
Returns true if this Motor depends on the given Joint.
Reimplemented in opal::GearedMotor, and opal::ServoMotor. |
|
Returns true if this Motor depends on the given Solid.
Reimplemented in opal::AttractorMotor, opal::SpringMotor, and opal::ThrusterMotor. |
|
Internal function used to destroy this object. Sets whether this is a custom Motor. Used internally to track custom Motors which must not be destroyed by OPAL. Definition at line 43 of file Motor.cpp. Referenced by opal::Simulator::removeMotor(). |
|
Called regularly to update the Motor. This does nothing if the Motor is disabled. Implemented in opal::AttractorMotor, opal::GearedMotor, opal::ServoMotor, opal::SpringMotor, opal::ThrusterMotor, and opal::VelocityMotor. |
|
Returns true if the Motor is enabled.
Implemented in opal::AttractorMotor, opal::GearedMotor, opal::ServoMotor, opal::SpringMotor, opal::ThrusterMotor, and opal::VelocityMotor. |
|
Sets whether the Motor has any effect.
Implemented in opal::AttractorMotor, opal::GearedMotor, opal::ServoMotor, opal::SpringMotor, opal::ThrusterMotor, and opal::VelocityMotor. |
|
Sets the Motor's name.
Implemented in opal::AttractorMotor, opal::GearedMotor, opal::ServoMotor, opal::SpringMotor, opal::ThrusterMotor, and opal::VelocityMotor. |
|
Set the user data pointer to some external data. The user data is totally user-managed (i.e. it is not destroyed when the Motor is destroyed). Definition at line 53 of file Motor.cpp. References mUserData. Referenced by Motor(). |
|
True if the Motor has been initialized. Some Motors use this to take special actions when a Motor is reinitialized. Definition at line 111 of file Motor.h. Referenced by opal::ServoMotor::init(), init(), and Motor(). |
|
Pointer to user data. This is totally user-managed (i.e. OPAL will never delete it). Definition at line 103 of file Motor.h. Referenced by getUserData(), and setUserData(). |