#include <SpringMotor.h>
Inheritance diagram for opal::SpringMotor:
Public Member Functions | |
SpringMotor () | |
virtual | ~SpringMotor () |
virtual void OPAL_CALL | init (const SpringMotorData &data) |
virtual const SpringMotorData &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 | setLocalAttachOffset (const Point3r &offset) |
virtual const Point3r &OPAL_CALL | getLocalAttachOffset () const |
virtual void OPAL_CALL | setGlobalAttachPoint (const Point3r &p) |
virtual Point3r OPAL_CALL | getGlobalAttachPoint () const |
virtual void OPAL_CALL | setDesiredTransform (const Matrix44r &transform) |
virtual void OPAL_CALL | setDesiredPosition (const Point3r &pos) |
virtual void OPAL_CALL | setDesiredOrientation (const Vec3r &forward, const Vec3r &up, const Vec3r &right) |
virtual void OPAL_CALL | setLinearKd (real kd) |
virtual void OPAL_CALL | setLinearKs (real ks) |
virtual real OPAL_CALL | getLinearKd () const |
virtual real OPAL_CALL | getLinearKs () const |
virtual void OPAL_CALL | setAngularKd (real kd) |
virtual void OPAL_CALL | setAngularKs (real ks) |
virtual real OPAL_CALL | getAngularKd () const |
virtual real OPAL_CALL | getAngularKs () const |
virtual void OPAL_CALL | internal_update () |
virtual bool OPAL_CALL | internal_dependsOnSolid (Solid *s) |
Protected Attributes | |
SpringMotorData | mData |
Definition at line 42 of file SpringMotor.h.
|
Definition at line 33 of file SpringMotor.cpp. |
|
Definition at line 39 of file SpringMotor.cpp. |
|
Returns the damping constant for angular mode.
Definition at line 305 of file SpringMotor.cpp. References opal::SpringMotorData::angularKd, and mData. |
|
Returns the spring constant for angular mode.
Definition at line 310 of file SpringMotor.cpp. References opal::SpringMotorData::angularKs, and mData. |
|
Returns all data describing the Motor.
Definition at line 49 of file SpringMotor.cpp. References mData. |
|
Returns the spring's attach point on the Solid in global coordinates. Definition at line 204 of file SpringMotor.cpp. References opal::SpringMotorData::attachOffset, opal::Solid::getPosition(), opal::Solid::getTransform(), mData, OPAL_LOGGER, and opal::SpringMotorData::solid. Referenced by internal_update(). |
|
Returns the damping constant for linear mode.
Definition at line 285 of file SpringMotor.cpp. References opal::SpringMotorData::linearKd, and mData. |
|
Returns the spring constant for linear mode.
Definition at line 290 of file SpringMotor.cpp. References opal::SpringMotorData::linearKs, and mData. |
|
Returns the spring's attach point on the Solid. This is a local offset point from the Solid's position. Definition at line 182 of file SpringMotor.cpp. References opal::SpringMotorData::attachOffset, and mData. |
|
Returns the Motor's name.
Implements opal::Motor. Definition at line 64 of file SpringMotor.cpp. References mData, and opal::MotorData::name. |
|
Returns the Motor type.
Implements opal::Motor. Definition at line 54 of file SpringMotor.cpp. References opal::MotorData::getType(), and mData. |
|
Initializes the Motor with the given data structure. If the Solid pointer in the data are NULL, the Motor will do nothing. Definition at line 43 of file SpringMotor.cpp. References opal::Motor::init(), and mData. |
|
Returns true if this Motor depends on the given Solid.
Reimplemented from opal::Motor. Definition at line 315 of file SpringMotor.cpp. References mData, and opal::SpringMotorData::solid. |
|
Called regularly to update the Motor. This does nothing if the Motor is disabled. Implements opal::Motor. Definition at line 84 of file SpringMotor.cpp. References opal::Solid::addForce(), opal::ANGULAR_MODE, opal::SpringMotorData::attachOffset, opal::SpringMotorData::desiredPos, opal::MotorData::enabled, opal::Matrix44r::getForward(), getGlobalAttachPoint(), opal::Solid::getGlobalLinearVel(), opal::Solid::getMass(), opal::Matrix44r::getRight(), opal::Solid::getTransform(), opal::Matrix44r::getUp(), opal::GLOBAL_FORCE_AT_LOCAL_POS, opal::Vec3r::lengthSquared(), opal::LINEAR_AND_ANGULAR_MODE, opal::LINEAR_MODE, opal::SpringMotorData::linearKd, opal::SpringMotorData::linearKs, mData, opal::SpringMotorData::mode, opal::Vec3r::normalize(), opal::Force::pos, opal::Force::singleStep, opal::SpringMotorData::solid, opal::Force::type, and opal::Force::vec. |
|
Returns true if the Motor is enabled.
Implements opal::Motor. Definition at line 69 of file SpringMotor.cpp. References opal::MotorData::enabled, and mData. |
|
Sets the damping constant for angular mode.
Definition at line 295 of file SpringMotor.cpp. References opal::SpringMotorData::angularKd, and mData. |
|
Sets the spring constant for angular mode.
Definition at line 300 of file SpringMotor.cpp. References opal::SpringMotorData::angularKs, and mData. |
|
Sets the desired orientation.
Definition at line 253 of file SpringMotor.cpp. References opal::SpringMotorData::desiredForward, opal::Vec3r::lengthSquared(), mData, and opal::Vec3r::normalize(). |
|
Sets the desired position.
Definition at line 248 of file SpringMotor.cpp. References opal::SpringMotorData::desiredPos, and mData. |
|
Sets the desired position and orientation.
Definition at line 225 of file SpringMotor.cpp. References opal::SpringMotorData::desiredForward, opal::SpringMotorData::desiredPos, opal::Matrix44r::getForward(), opal::Matrix44r::getPosition(), opal::Vec3r::lengthSquared(), mData, and opal::Vec3r::normalize(). |
|
Sets whether the Motor has any effect.
Implements opal::Motor. Definition at line 74 of file SpringMotor.cpp. References opal::MotorData::enabled, and mData. |
|
Sets the spring's attach point on the Solid in global coordinates. Definition at line 187 of file SpringMotor.cpp. References opal::SpringMotorData::attachOffset, opal::Matrix44r::fastInvert(), opal::Solid::getTransform(), mData, OPAL_LOGGER, and opal::SpringMotorData::solid. |
|
Sets the damping constant for linear mode.
Definition at line 275 of file SpringMotor.cpp. References opal::SpringMotorData::linearKd, and mData. |
|
Sets the spring constant for linear mode.
Definition at line 280 of file SpringMotor.cpp. References opal::SpringMotorData::linearKs, and mData. |
|
Sets the spring's attach point on the Solid. This is a local offset point from the Solid's position. Definition at line 177 of file SpringMotor.cpp. References opal::SpringMotorData::attachOffset, and mData. |
|
Sets the Motor's name.
Implements opal::Motor. Definition at line 59 of file SpringMotor.cpp. References mData, and opal::MotorData::name. |
|
Stores data describing the Motor.
Definition at line 122 of file SpringMotor.h. Referenced by getAngularKd(), getAngularKs(), getData(), getGlobalAttachPoint(), getLinearKd(), getLinearKs(), getLocalAttachOffset(), getName(), getType(), init(), internal_dependsOnSolid(), internal_update(), isEnabled(), setAngularKd(), setAngularKs(), setDesiredOrientation(), setDesiredPosition(), setDesiredTransform(), setEnabled(), setGlobalAttachPoint(), setLinearKd(), setLinearKs(), setLocalAttachOffset(), and setName(). |