Bumper Class Reference

#include <Bumper.h>

Inheritance diagram for Bumper:

Sensor SimObject List of all members.

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 SimObjectclone () const

Protected Attributes

bool value

Detailed Description

A class representing a bumper.

Definition at line 20 of file Bumper.h.


Constructor & Destructor Documentation

Bumper::Bumper (  ) 

Constructor

Definition at line 13 of file Bumper.cpp.

References value.

Referenced by clone().


Member Function Documentation

void Bumper::addToDescriptions ( std::vector< ObjectDescription > &  objectDescriptionTree,
int  depth 
) [virtual]

Adds descriptions of the object and its children to a list

Parameters:
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

Parameters:
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

Returns:
A pointer to a copy of the object

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

Parameters:
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]

Returns a string describing the kind of object

Returns:
The kind

Reimplemented from Sensor.

Definition at line 33 of file Bumper.h.


Member Data Documentation

bool Bumper::value [protected]

The current value of the bumper (true/false)

Definition at line 24 of file Bumper.h.

Referenced by Bumper().


The documentation for this class was generated from the following files:
Generated on Thu Dec 7 01:19:35 2006 for DT2005.panorama by  doxygen 1.4.7