#include <InclineSensor.h>
Inheritance diagram for opal::InclineSensor:
Public Member Functions | |
InclineSensor () | |
virtual | ~InclineSensor () |
virtual void OPAL_CALL | init (const InclineSensorData &data) |
virtual const InclineSensorData &OPAL_CALL | getData () const |
virtual real OPAL_CALL | getAngle () |
virtual void OPAL_CALL | setEnabled (bool e) |
virtual bool OPAL_CALL | isEnabled () const |
virtual void OPAL_CALL | setAxis (const Vec3r &axis) |
virtual const Vec3r &OPAL_CALL | getAxis () |
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 Member Functions | |
void | setupInternalVectors () |
Protected Attributes | |
InclineSensorData | mData |
Vec3r | mLocalReferenceVec |
Vec3r | mInitGlobalReferenceVec |
Definition at line 48 of file InclineSensor.h.
|
Definition at line 33 of file InclineSensor.cpp. |
|
Definition at line 40 of file InclineSensor.cpp. |
|
Returns the angle of rotation about the local rotation axis relative to the initial angle of rotation. Definition at line 58 of file InclineSensor.cpp. References opal::angleBetween(), opal::areCollinear(), opal::InclineSensorData::axis, opal::cross(), opal::SensorData::enabled, opal::Solid::getTransform(), mData, mInitGlobalReferenceVec, mLocalReferenceVec, opal::project(), and opal::SensorData::solid. |
|
Returns the local rotation axis.
Definition at line 129 of file InclineSensor.cpp. References opal::InclineSensorData::axis, and mData. |
|
Returns all data describing the Sensor.
Definition at line 53 of file InclineSensor.cpp. References mData. |
|
Returns the Sensor's name.
Implements opal::Sensor. Definition at line 154 of file InclineSensor.cpp. References mData, and opal::SensorData::name. |
|
Returns the Sensor's transform.
Implements opal::Sensor. Definition at line 144 of file InclineSensor.cpp. References mData, and opal::SensorData::transform. |
|
Returns the Sensor type.
Implements opal::Sensor. Definition at line 134 of file InclineSensor.cpp. References opal::SensorData::getType(), and mData. |
|
Initializes the Sensor with the given data structure. This will define the rotation angle as zero degrees when called. The Solid pointer should be valid because this Sensor only works when attached to something. This does nothing if the Sensor's Solid pointer is NULL. Definition at line 44 of file InclineSensor.cpp. References opal::Sensor::init(), mData, and setupInternalVectors(). |
|
Returns true if this Sensor depends on the given Solid.
Reimplemented from opal::Sensor. Definition at line 167 of file InclineSensor.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 159 of file InclineSensor.cpp. References opal::SensorData::enabled, mData, and opal::SensorData::solid. |
|
Returns true if the Sensor is enabled.
Implements opal::Sensor. Definition at line 111 of file InclineSensor.cpp. References opal::SensorData::enabled, and mData. |
|
Sets the local rotation axis around which the angle of rotation will be measured. This will redefine the rotation angle as zero degrees when called. This does nothing if the Sensor's Solid pointer is NULL. Definition at line 116 of file InclineSensor.cpp. References opal::defaults::sensor::incline::axis, opal::InclineSensorData::axis, mData, setupInternalVectors(), and opal::SensorData::solid. |
|
Sets whether the Sensor can update its measurements.
Implements opal::Sensor. Definition at line 101 of file InclineSensor.cpp. References opal::SensorData::enabled, and mData. |
|
Sets the Sensor's name.
Implements opal::Sensor. Definition at line 149 of file InclineSensor.cpp. References mData, and opal::SensorData::name. |
|
Sets the Sensor's transform.
Implements opal::Sensor. Definition at line 139 of file InclineSensor.cpp. References mData, and opal::SensorData::transform. |
|
A helper function that sets up all internal vectors used when calculating the angle of rotation. Definition at line 179 of file InclineSensor.cpp. References opal::areCollinear(), opal::InclineSensorData::axis, opal::cross(), opal::Solid::getTransform(), mData, mInitGlobalReferenceVec, mLocalReferenceVec, opal::Vec3r::set(), and opal::SensorData::solid. |
|
Stores data describing the Sensor.
Definition at line 102 of file InclineSensor.h. Referenced by getAngle(), getAxis(), getData(), getName(), getTransform(), getType(), init(), internal_dependsOnSolid(), internal_update(), isEnabled(), setAxis(), setEnabled(), setName(), setTransform(), and setupInternalVectors(). |
|
A vector used to measure the angle of rotation.
Definition at line 108 of file InclineSensor.h. Referenced by getAngle(), and setupInternalVectors(). |
|
A vector used to measure the angle of rotation.
Definition at line 105 of file InclineSensor.h. Referenced by getAngle(), and setupInternalVectors(). |