#include <RaycastSensor.h>
Inheritance diagram for opal::RaycastSensor:
Public Member Functions | |
RaycastSensor (Simulator *s) | |
virtual | ~RaycastSensor () |
virtual void OPAL_CALL | init (const RaycastSensorData &data) |
virtual const RaycastSensorData &OPAL_CALL | getData () const |
virtual const RaycastResult &OPAL_CALL | fireRay () |
virtual const std::vector< RaycastResult > &OPAL_CALL | firePiercingRay () |
virtual const RaycastResult &OPAL_CALL | fireRay (real length) |
virtual const std::vector< RaycastResult > &OPAL_CALL | firePiercingRay (real length) |
virtual void OPAL_CALL | setEnabled (bool e) |
virtual bool OPAL_CALL | isEnabled () const |
virtual void OPAL_CALL | setRay (const Rayr &r) |
virtual const Rayr &OPAL_CALL | getRay () 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 | |
RaycastSensorData | mData |
Simulator * | mSim |
Definition at line 93 of file RaycastSensor.h.
|
Constructor.
Definition at line 39 of file RaycastSensor.cpp. References mSim. |
|
Destructor.
Definition at line 45 of file RaycastSensor.cpp. |
|
Same as the other firePiercingRay, except that the length is an explicit parameter.
Definition at line 115 of file RaycastSensor.cpp. References opal::RaycastSensorData::contactGroup, opal::SensorData::enabled, opal::Solid::getTransform(), opal::Simulator::internal_fireRay(), mData, mSim, opal::RaycastSensorData::ray, opal::SensorData::solid, and opal::SensorData::transform. |
|
Same as fireRay, except that this function returns a set of sorted results.
Definition at line 64 of file RaycastSensor.cpp. References opal::Rayr::getLength(), mData, and opal::RaycastSensorData::ray. |
|
Same as the other fireRay, except that the length is an explicit parameter.
Definition at line 69 of file RaycastSensor.cpp. References opal::RaycastSensorData::contactGroup, opal::distance(), opal::SensorData::enabled, opal::Solid::getTransform(), opal::Simulator::internal_fireRay(), mData, mSim, opal::RaycastSensorData::ray, opal::SensorData::solid, and opal::SensorData::transform. |
|
Fires a ray into the Sensor's environment, returning information about the closest intersection encountered. The length of the ray used will be the RaycastSensorData length. Definition at line 59 of file RaycastSensor.cpp. References opal::Rayr::getLength(), mData, and opal::RaycastSensorData::ray. |
|
Returns all data describing the Sensor.
Definition at line 54 of file RaycastSensor.cpp. References mData. |
|
Returns the Sensor's name.
Implements opal::Sensor. Definition at line 198 of file RaycastSensor.cpp. References mData, and opal::SensorData::name. |
|
Returns the Sensor's ray.
Definition at line 173 of file RaycastSensor.cpp. References mData, and opal::RaycastSensorData::ray. |
|
Returns the Sensor's transform.
Implements opal::Sensor. Definition at line 188 of file RaycastSensor.cpp. References mData, and opal::SensorData::transform. |
|
Returns the Sensor type.
Implements opal::Sensor. Definition at line 178 of file RaycastSensor.cpp. References opal::SensorData::getType(), and mData. |
|
Initializes the Sensor with the given data structure. If the Solid pointer in the data is valid, the Sensor's offset will be relative to the Solid's transform instead of the global origin. Definition at line 48 of file RaycastSensor.cpp. References opal::Sensor::init(), and mData. |
|
Returns true if this Sensor depends on the given Solid.
Reimplemented from opal::Sensor. Definition at line 211 of file RaycastSensor.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 203 of file RaycastSensor.cpp. References opal::SensorData::enabled, mData, and opal::SensorData::solid. |
|
Returns true if the Sensor is enabled.
Implements opal::Sensor. Definition at line 163 of file RaycastSensor.cpp. References opal::SensorData::enabled, and mData. |
|
Sets whether the Sensor can update its measurements.
Implements opal::Sensor. Definition at line 153 of file RaycastSensor.cpp. References opal::SensorData::enabled, and mData. |
|
Sets the Sensor's name.
Implements opal::Sensor. Definition at line 193 of file RaycastSensor.cpp. References mData, and opal::SensorData::name. |
|
Sets the Sensor's ray.
Definition at line 168 of file RaycastSensor.cpp. References mData, and opal::RaycastSensorData::ray. |
|
Sets the Sensor's transform.
Implements opal::Sensor. Definition at line 183 of file RaycastSensor.cpp. References mData, and opal::SensorData::transform. |
|
Stores data describing the Sensor.
Definition at line 166 of file RaycastSensor.h. Referenced by firePiercingRay(), fireRay(), getData(), getName(), getRay(), getTransform(), getType(), init(), internal_dependsOnSolid(), internal_update(), isEnabled(), setEnabled(), setName(), setRay(), and setTransform(). |
|
Pointer to the Simulator containing this Sensor; used to fire rays into the Simulator. Definition at line 170 of file RaycastSensor.h. Referenced by firePiercingRay(), fireRay(), and RaycastSensor(). |