NTRT Simulator  Version: Master
 All Classes Namespaces Files Functions Variables Typedefs Friends Pages
tgSpringCableActuatorSensorInfo Class Reference

#include <tgSpringCableActuatorSensorInfo.h>

Inheritance diagram for tgSpringCableActuatorSensorInfo:
Collaboration diagram for tgSpringCableActuatorSensorInfo:

Public Member Functions

 tgSpringCableActuatorSensorInfo ()
 
 ~tgSpringCableActuatorSensorInfo ()
 
virtual bool isThisMySenseable (tgSenseable *pSenseable)
 
virtual std::vector< tgSensor * > createSensorsIfAppropriate (tgSenseable *pSenseable)
 

Detailed Description

tgSpringCableActuatorSensorInfo is a sensor info class that creates tgSpringCableActuatorSensors for tgSpringCableActuators.

Definition at line 47 of file tgSpringCableActuatorSensorInfo.h.

Constructor & Destructor Documentation

tgSpringCableActuatorSensorInfo::tgSpringCableActuatorSensorInfo ( )

tgSensorInfo has an empty constructor. It does not contain any data.

Nothing to do in this constructor. A sensor info doesn't have any data.

Definition at line 40 of file tgSpringCableActuatorSensorInfo.cpp.

tgSpringCableActuatorSensorInfo::~tgSpringCableActuatorSensorInfo ( )

Similarly, its destructor should be empty.

Similarly, empty destructor.

Definition at line 47 of file tgSpringCableActuatorSensorInfo.cpp.

Member Function Documentation

std::vector< tgSensor * > tgSpringCableActuatorSensorInfo::createSensorsIfAppropriate ( tgSenseable pSenseable)
virtual

Similarly, create a sensor if appropriate. See tgSensorInfo for more... info.

Parameters
[in]pSenseablepointer to a senseable object. Sensor will be created for this pSenseable.
Returns
a list of pointers to tgSpringCableActuatorSensors. Note that this should ALWAYS have size 1. Don't create sensors for elements that just have rods as descendants, only create sensors for an actual spring-cable actuator. (This eliminates redundant sensor creation.)
Exceptions
invalid_argumentif pSenseable is not a tgSpringCableActuator. This enforces the caller to check isThisMySenseable before creating sensors.

Create a sensor for a tgSpringCableActuator. Returns a list of size 1.

Implements tgSensorInfo.

Definition at line 70 of file tgSpringCableActuatorSensorInfo.cpp.

Here is the call graph for this function:

bool tgSpringCableActuatorSensorInfo::isThisMySenseable ( tgSenseable pSenseable)
virtual

From tgSensorInfo, need to implement a check to see if a particular tgSenseable is a tgSpringCableActuator.

Parameters
[in]pSenseablea pointer to a tgSenseable object, that this sensor info may or may not be able to create a sensor for.
Returns
true if pSenseable is able to be sensed by the type of sensor that this sensor info creates.

To check if a tgSenseable is a tgSpringCableActuator, we can use tgCast.

Implements tgSensorInfo.

Definition at line 54 of file tgSpringCableActuatorSensorInfo.cpp.

Here is the caller graph for this function:


The documentation for this class was generated from the following files: