#include <Bumper.h>
Inheritance diagram for Bumper:
Public Member Functions | |
Bumper () | |
virtual std::string | getKind () const |
virtual void | computeValue (bool &value, int portId) |
virtual void | addToLists (std::vector< Sensorport * > &sensorportList, std::vector< Actuatorport * > &actuatorportList, std::vector< Actuator * > &actuatorList) |
virtual void | addToDescriptions (std::vector< ObjectDescription > &objectDescriptionTree, int depth) |
virtual SimObject * | clone () const |
Protected Attributes | |
bool | value |
Definition at line 20 of file Bumper.h.
Bumper::Bumper | ( | ) |
void Bumper::addToDescriptions | ( | std::vector< ObjectDescription > & | objectDescriptionTree, | |
int | depth | |||
) | [virtual] |
Adds descriptions of the object and its children to a list
objectDescriptionTree | The list of descriptions | |
The | depth of the object in the object tree |
Reimplemented from SimObject.
Definition at line 27 of file Bumper.cpp.
References SimObject::addToDescriptions(), ObjectDescription::depth, SimObject::fullName, ObjectDescription::fullName, ObjectDescription::name, OBJECT_TYPE_SENSORPORT, and ObjectDescription::type.
void Bumper::addToLists | ( | std::vector< Sensorport * > & | sensorportList, | |
std::vector< Actuatorport * > & | actuatorportList, | |||
std::vector< Actuator * > & | actuatorList | |||
) | [virtual] |
Adds the object to some internal lists
sensorportList | A list of all sensor ports in the scene | |
actuatorportList | A list of all actuator ports in the scene | |
actuatorList | A list of all actuators in the scene |
Reimplemented from SimObject.
Definition at line 18 of file Bumper.cpp.
References boolSensor.
SimObject * Bumper::clone | ( | ) | const [virtual] |
Clones the object and its child nodes
Reimplemented from SimObject.
Definition at line 49 of file Bumper.cpp.
References SimObject::addChildNode(), Bumper(), SimObject::childNodes, SimObject::deactivatedChildNode, SimObject::deactivatedChildNodeSuccessor, SimObject::fullName, SimObject::intersectionSphereRadius, SimObject::name, SimObject::parentNode, SimObject::position, SimObject::rotation, SimObject::setFullName(), SimObject::setName(), and SimObject::setPosition().
void Bumper::computeValue | ( | bool & | value, | |
int | portId | |||
) | [virtual] |
Computes the current value of the bumper
value | The computed value | |
portId | The id of the sensorport |
Reimplemented from Sensor.
Definition at line 39 of file Bumper.cpp.
References SimObject::checkCollisionWithScene(), Sensor::lastComputationStep, and SimObject::simulationStep.
virtual std::string Bumper::getKind | ( | ) | const [inline, virtual] |
bool Bumper::value [protected] |