NTRT Simulator
Version: Master
|
#include <tgSensorInfo.h>
Inherited by tgCompoundRigidSensorInfo, tgRodSensorInfo, and tgSpringCableActuatorSensorInfo.
Public Member Functions | |
tgSensorInfo () | |
virtual | ~tgSensorInfo () |
virtual bool | isThisMySenseable (tgSenseable *pSenseable)=0 |
virtual std::vector< tgSensor * > | createSensorsIfAppropriate (tgSenseable *pSenseable)=0 |
tgSensorInfo is an abstract class that contains methods for creating sensors. This is how a tgDataManager will create sensors for specific tgSenseable objects (e.g., how a tgDataLogger2 will create sensors for specific tgModels.) Note that an individual tgSensorInfo may return multiple sensors upon a single call to createSensorsIfAppropriate - this would be the case for e.g. tgCompoundRigidSensor, but in most cases (e.g. rods and spring-cables) only one sensor is returned.
Definition at line 51 of file tgSensorInfo.h.
tgSensorInfo::tgSensorInfo | ( | ) |
Empty constructor and destructor. Note that the destructor must be virtual also, since this is a class with virtual member functions.
Empty constructor.
Definition at line 37 of file tgSensorInfo.cpp.
|
virtual |
A class with virtual member functions must have a virtual destructor.
Definition at line 42 of file tgSensorInfo.cpp.
|
pure virtual |
Next, this class needs to be able to actually create one or more sensors.
[in] | pSenseable | a pointer to the tgSenseable object that is to be sensed. |
Implemented in tgCompoundRigidSensorInfo, tgRodSensorInfo, and tgSpringCableActuatorSensorInfo.
|
pure virtual |
First, a tgSensorInfo should be able to determine if it can create at least one sensor for a specific tgSenseable object. This is the first step in creating sensors, first check then create.
[in] | pSenseable | a pointer to a senseable object (usually a tgModel), which either can or cannot be sensed by whatever particular sensor would be created by this tgSensorInfo. |
Implemented in tgCompoundRigidSensorInfo, tgRodSensorInfo, and tgSpringCableActuatorSensorInfo.