opal::VolumeSensor Class Reference

#include <VolumeSensor.h>

Inheritance diagram for opal::VolumeSensor:

opal::Sensor List of all members.

Public Member Functions

 VolumeSensor (Simulator *s)
virtual ~VolumeSensor ()
virtual void OPAL_CALL init (const VolumeSensorData &data)
virtual const VolumeSensorData
&OPAL_CALL 
getData () const
virtual const VolumeQueryResult
&OPAL_CALL 
queryVolume (Solid *volume)
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

VolumeSensorData mData
SimulatormSim

Detailed Description

A Sensor that queries a scene to find which Solids are intersecting a specified volume. Each volume query returns a data structure containing a list of those Solids. This Sensor does not do a volume query every time step because that would be a waste of time in most cases; it must be queried manually.

Definition at line 117 of file VolumeSensor.h.


Constructor & Destructor Documentation

opal::VolumeSensor::VolumeSensor Simulator s  ) 
 

Definition at line 33 of file VolumeSensor.cpp.

References mSim.

opal::VolumeSensor::~VolumeSensor  )  [virtual]
 

Definition at line 39 of file VolumeSensor.cpp.


Member Function Documentation

const VolumeSensorData & opal::VolumeSensor::getData  )  const [virtual]
 

Returns all data describing the Sensor.

Definition at line 49 of file VolumeSensor.cpp.

References mData.

const std::string & opal::VolumeSensor::getName  )  const [virtual]
 

Returns the Sensor's name.

Implements opal::Sensor.

Definition at line 133 of file VolumeSensor.cpp.

References mData, and opal::SensorData::name.

const Matrix44r & opal::VolumeSensor::getTransform  )  const [virtual]
 

Returns the Sensor's transform.

Implements opal::Sensor.

Definition at line 123 of file VolumeSensor.cpp.

References mData, and opal::SensorData::transform.

SensorType opal::VolumeSensor::getType  )  const [virtual]
 

Returns the Sensor type.

Implements opal::Sensor.

Definition at line 113 of file VolumeSensor.cpp.

References opal::SensorData::getType(), and mData.

void opal::VolumeSensor::init const VolumeSensorData data  )  [virtual]
 

Initializes the Sensor with the given data structure.

Definition at line 43 of file VolumeSensor.cpp.

References opal::Sensor::init(), and mData.

bool opal::VolumeSensor::internal_dependsOnSolid Solid s  )  [virtual]
 

Returns true if this Sensor depends on the given Solid.

Reimplemented from opal::Sensor.

Definition at line 146 of file VolumeSensor.cpp.

References mData, and opal::SensorData::solid.

void opal::VolumeSensor::internal_update  )  [virtual]
 

Called regularly to update the Sensor. This does nothing if the Sensor is disabled.

Implements opal::Sensor.

Definition at line 138 of file VolumeSensor.cpp.

References opal::SensorData::enabled, mData, and opal::SensorData::solid.

bool opal::VolumeSensor::isEnabled  )  const [virtual]
 

Returns true if the Sensor is enabled.

Implements opal::Sensor.

Definition at line 108 of file VolumeSensor.cpp.

References opal::SensorData::enabled, and mData.

const VolumeQueryResult & opal::VolumeSensor::queryVolume Solid volume  )  [virtual]
 

Queries the Sensor's environment with the given Solid's volume, returning a list of the Solids that collide with that Solid. The given Solid's transform will be totally ignored; use the Sensor's transform instead. If this Sensor is attached to a Solid, that Solid will not be added to the results.

Definition at line 54 of file VolumeSensor.cpp.

References opal::SensorData::enabled, opal::Solid::getTransform(), opal::Simulator::internal_queryVolume(), mData, mSim, opal::Solid::setTransform(), opal::SensorData::solid, and opal::SensorData::transform.

void opal::VolumeSensor::setEnabled bool  e  )  [virtual]
 

Sets whether the Sensor can update its measurements.

Implements opal::Sensor.

Definition at line 98 of file VolumeSensor.cpp.

References opal::SensorData::enabled, and mData.

void opal::VolumeSensor::setName const std::string &  name  )  [virtual]
 

Sets the Sensor's name.

Implements opal::Sensor.

Definition at line 128 of file VolumeSensor.cpp.

References mData, and opal::SensorData::name.

void opal::VolumeSensor::setTransform const Matrix44r t  )  [virtual]
 

Sets the Sensor's transform.

Implements opal::Sensor.

Definition at line 118 of file VolumeSensor.cpp.

References mData, and opal::SensorData::transform.


Member Data Documentation

VolumeSensorData opal::VolumeSensor::mData [protected]
 

Stores data describing the Sensor.

Definition at line 158 of file VolumeSensor.h.

Referenced by getData(), getName(), getTransform(), getType(), init(), internal_dependsOnSolid(), internal_update(), isEnabled(), queryVolume(), setEnabled(), setName(), and setTransform().

Simulator* opal::VolumeSensor::mSim [protected]
 

Pointer to the Simulator containing this Sensor; used to fire rays into the Simulator.

Definition at line 162 of file VolumeSensor.h.

Referenced by queryVolume(), and VolumeSensor().


The documentation for this class was generated from the following files:
Generated on Tue May 16 17:49:58 2006 for OPAL by  doxygen 1.4.6-NO