#include <VelocityMotor.h>
Inheritance diagram for opal::VelocityMotor:
Public Member Functions | |
VelocityMotor (Simulator *sim) | |
virtual | ~VelocityMotor () |
virtual void OPAL_CALL | init (const VelocityMotorData &data) |
virtual void OPAL_CALL | setEnabled (bool e) |
virtual bool OPAL_CALL | isEnabled () 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 void OPAL_CALL | setVelocity (const Vec3r &velocity) |
virtual const Vec3r &OPAL_CALL | getVelocity () const |
virtual void OPAL_CALL | internal_update () |
virtual bool OPAL_CALL | internal_dependsOnSolid (Solid *s) const |
virtual void OPAL_CALL | letGravityAffectSolid (bool affect) |
virtual bool OPAL_CALL | doesGravityAffectSolid () const |
virtual void OPAL_CALL | setMaximumForce (real maxForce) |
virtual real OPAL_CALL | getMaximumForce () const |
Protected Attributes | |
VelocityMotorData | mData |
Private Attributes | |
Simulator * | mSimulator |
Definition at line 49 of file VelocityMotor.h.
|
constructor
Definition at line 37 of file VelocityMotor.cpp. References mSimulator. |
|
destructor
Definition at line 42 of file VelocityMotor.cpp. |
|
Returns true if gravity is being ignored by the motor.
Definition at line 103 of file VelocityMotor.cpp. References opal::VelocityMotorData::letGravityAffectSolid, and mData. Referenced by internal_update(). |
|
What is the maximum allowed force for this motor?
Definition at line 154 of file VelocityMotor.cpp. References opal::VelocityMotorData::maxForce, and mData. |
|
Returns the Motor's name.
Implements opal::Motor. Definition at line 85 of file VelocityMotor.cpp. References mData, and opal::MotorData::name. |
|
Returns the Motor type.
Implements opal::Motor. Definition at line 75 of file VelocityMotor.cpp. References opal::VELOCITY_MOTOR. |
|
Return target velocity.
Definition at line 50 of file VelocityMotor.cpp. References mData, and opal::VelocityMotorData::velocity. |
|
Initializes the Motor with the given data structure.
Definition at line 55 of file VelocityMotor.cpp. References opal::Motor::init(), mData, opal::Solid::setLinearDamping(), and opal::VelocityMotorData::solid. |
|
Returns true if motors controls this solid.
Definition at line 90 of file VelocityMotor.cpp. References mData, and opal::VelocityMotorData::solid. |
|
Called regularly to update the Motor. This does nothing if the Motor is disabled. Implements opal::Motor. Definition at line 108 of file VelocityMotor.cpp. References doesGravityAffectSolid(), opal::Solid::getGlobalLinearVel(), opal::Simulator::getGravity(), opal::defaults::gravity, isEnabled(), opal::Vec3r::length(), mData, mSimulator, opal::project(), opal::VelocityMotorData::solid, and opal::VelocityMotorData::velocity. |
|
Returns true if the Motor is enabled.
Implements opal::Motor. Definition at line 70 of file VelocityMotor.cpp. References opal::MotorData::enabled, and mData. Referenced by internal_update(). |
|
against gravity or not?
Definition at line 98 of file VelocityMotor.cpp. References opal::VelocityMotorData::letGravityAffectSolid, and mData. |
|
Sets whether the Motor has any effect.
Implements opal::Motor. Definition at line 65 of file VelocityMotor.cpp. References opal::MotorData::enabled, and mData. |
|
Maximum allowed force for the motor to use.
Definition at line 149 of file VelocityMotor.cpp. References opal::VelocityMotorData::maxForce, and mData. |
|
Sets the Motor's name.
Implements opal::Motor. Definition at line 80 of file VelocityMotor.cpp. References mData, and opal::MotorData::name. |
|
Set target velocity.
Definition at line 45 of file VelocityMotor.cpp. References mData, and opal::VelocityMotorData::velocity. |
|
Stores data describing the Motor.
Definition at line 110 of file VelocityMotor.h. Referenced by doesGravityAffectSolid(), getMaximumForce(), getName(), getVelocity(), init(), internal_dependsOnSolid(), internal_update(), isEnabled(), letGravityAffectSolid(), setEnabled(), setMaximumForce(), setName(), and setVelocity(). |
|
Definition at line 113 of file VelocityMotor.h. Referenced by internal_update(), and VelocityMotor(). |