#include <AccelerationSensor.h>
Inheritance diagram for opal::AccelerationSensor:
Public Member Functions | |
AccelerationSensor (Simulator *s) | |
virtual | ~AccelerationSensor () |
virtual void OPAL_CALL | init (const AccelerationSensorData &data) |
virtual const AccelerationSensorData &OPAL_CALL | getData () const |
virtual Vec3r OPAL_CALL | getGlobalLinearAccel () const |
virtual Vec3r OPAL_CALL | getGlobalAngularAccel () const |
virtual Vec3r OPAL_CALL | getLocalLinearAccel () const |
virtual Vec3r OPAL_CALL | getLocalAngularAccel () const |
virtual void OPAL_CALL | setEnabled (bool e) |
virtual bool OPAL_CALL | isEnabled () const |
virtual void OPAL_CALL | setTransform (const Matrix44r &t) |
virtual const Matrix44r &OPAL_CALL | getTransform () const |
virtual SensorType 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 | internal_update () |
virtual bool OPAL_CALL | internal_dependsOnSolid (Solid *s) |
Protected Attributes | |
AccelerationSensorData | mData |
Simulator * | mSim |
Vec3r | mCurrentGlobalLinearVel |
Vec3r | mCurrentGlobalAngularVel |
Vec3r | mCurrentLocalLinearVel |
Vec3r | mCurrentLocalAngularVel |
Vec3r | mPrevGlobalLinearVel |
Vec3r | mPrevGlobalAngularVel |
Vec3r | mPrevLocalLinearVel |
Vec3r | mPrevLocalAngularVel |
Definition at line 43 of file AccelerationSensor.h.
|
Definition at line 33 of file AccelerationSensor.cpp. References mSim. |
|
Definition at line 49 of file AccelerationSensor.cpp. |
|
Returns all data describing the Sensor.
Definition at line 59 of file AccelerationSensor.cpp. References mData. |
|
Returns the Sensor's global angular acceleration. If the Sensor is not attached to a Solid, this returns (0, 0, 0). Definition at line 75 of file AccelerationSensor.cpp. References opal::SensorData::enabled, opal::Simulator::getStepSize(), mCurrentGlobalAngularVel, mData, mPrevGlobalAngularVel, mSim, and opal::SensorData::solid. |
|
Returns the Sensor's global linear acceleration. If the Sensor is not attached to a Solid, this returns (0, 0, 0). Definition at line 64 of file AccelerationSensor.cpp. References opal::SensorData::enabled, opal::Simulator::getStepSize(), mCurrentGlobalLinearVel, mData, mPrevGlobalLinearVel, mSim, and opal::SensorData::solid. |
|
Returns the Sensor's local angular acceleration. If the Sensor is not attached to a Solid, this returns (0, 0, 0). Definition at line 97 of file AccelerationSensor.cpp. References opal::SensorData::enabled, opal::Simulator::getStepSize(), mCurrentLocalAngularVel, mData, mPrevLocalAngularVel, mSim, and opal::SensorData::solid. |
|
Returns the Sensor's local linear acceleration. If the Sensor is not attached to a Solid, this returns (0, 0, 0). Definition at line 86 of file AccelerationSensor.cpp. References opal::SensorData::enabled, opal::Simulator::getStepSize(), mCurrentLocalLinearVel, mData, mPrevLocalLinearVel, mSim, and opal::SensorData::solid. |
|
Returns the Sensor's name.
Implements opal::Sensor. Definition at line 143 of file AccelerationSensor.cpp. References mData, and opal::SensorData::name. |
|
Returns the Sensor's transform.
Implements opal::Sensor. Definition at line 133 of file AccelerationSensor.cpp. References mData, and opal::SensorData::transform. |
|
Returns the Sensor type.
Implements opal::Sensor. Definition at line 123 of file AccelerationSensor.cpp. References opal::SensorData::getType(), and mData. |
|
Initializes the Sensor with the given data structure. The Solid pointer should always be valid because this Sensor only works when attached to something. Definition at line 53 of file AccelerationSensor.cpp. References opal::Sensor::init(), and mData. |
|
Returns true if this Sensor depends on the given Solid.
Reimplemented from opal::Sensor. Definition at line 168 of file AccelerationSensor.cpp. References mData, and opal::SensorData::solid. |
|
Called regularly to update the Sensor. This does nothing if the Sensor is disabled. Implements opal::Sensor. Definition at line 148 of file AccelerationSensor.cpp. References opal::SensorData::enabled, opal::Solid::getGlobalAngularVel(), opal::Solid::getGlobalLinearVel(), opal::Solid::getLocalAngularVel(), opal::Solid::getLocalLinearVel(), mCurrentGlobalAngularVel, mCurrentGlobalLinearVel, mCurrentLocalAngularVel, mCurrentLocalLinearVel, mData, mPrevGlobalAngularVel, mPrevGlobalLinearVel, mPrevLocalAngularVel, mPrevLocalLinearVel, and opal::SensorData::solid. |
|
Returns true if the Sensor is enabled.
Implements opal::Sensor. Definition at line 118 of file AccelerationSensor.cpp. References opal::SensorData::enabled, and mData. |
|
Sets whether the Sensor can update its measurements.
Implements opal::Sensor. Definition at line 108 of file AccelerationSensor.cpp. References opal::SensorData::enabled, and mData. |
|
Sets the Sensor's name.
Implements opal::Sensor. Definition at line 138 of file AccelerationSensor.cpp. References mData, and opal::SensorData::name. |
|
Sets the Sensor's transform.
Implements opal::Sensor. Definition at line 128 of file AccelerationSensor.cpp. References mData, and opal::SensorData::transform. |
|
Stored copy of the current step's velocity data; used for acceleration calculations. Definition at line 106 of file AccelerationSensor.h. Referenced by getGlobalAngularAccel(), and internal_update(). |
|
Stored copy of the current step's velocity data; used for acceleration calculations. Definition at line 102 of file AccelerationSensor.h. Referenced by getGlobalLinearAccel(), and internal_update(). |
|
Stored copy of the current step's velocity data; used for acceleration calculations. Definition at line 114 of file AccelerationSensor.h. Referenced by getLocalAngularAccel(), and internal_update(). |
|
Stored copy of the current step's velocity data; used for acceleration calculations. Definition at line 110 of file AccelerationSensor.h. Referenced by getLocalLinearAccel(), and internal_update(). |
|
Stores data describing the Sensor.
Definition at line 94 of file AccelerationSensor.h. Referenced by getData(), getGlobalAngularAccel(), getGlobalLinearAccel(), getLocalAngularAccel(), getLocalLinearAccel(), getName(), getTransform(), getType(), init(), internal_dependsOnSolid(), internal_update(), isEnabled(), setEnabled(), setName(), and setTransform(). |
|
Stored copy of the previous step's velocity data; used for acceleration calculations. Definition at line 122 of file AccelerationSensor.h. Referenced by getGlobalAngularAccel(), and internal_update(). |
|
Stored copy of the previous step's velocity data; used for acceleration calculations. Definition at line 118 of file AccelerationSensor.h. Referenced by getGlobalLinearAccel(), and internal_update(). |
|
Stored copy of the previous step's velocity data; used for acceleration calculations. Definition at line 130 of file AccelerationSensor.h. Referenced by getLocalAngularAccel(), and internal_update(). |
|
Stored copy of the previous step's velocity data; used for acceleration calculations. Definition at line 126 of file AccelerationSensor.h. Referenced by getLocalLinearAccel(), and internal_update(). |
|
Pointer to the Simulator containing this Sensor. This is used to get an accurate dt value on every update. Definition at line 98 of file AccelerationSensor.h. Referenced by AccelerationSensor(), getGlobalAngularAccel(), getGlobalLinearAccel(), getLocalAngularAccel(), and getLocalLinearAccel(). |