InteractiveButton Class Reference

#include <InteractiveButton.h>

Inheritance diagram for InteractiveButton:

Sensor SimObject List of all members.

Public Member Functions

 InteractiveButton ()
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
virtual bool isMovableOrClickable (std::string &nameOfObject, bool testClickable) const
void setSnapIn (bool snapIn)
void hasBeenClicked ()
void hasBeenReleased ()

Protected Attributes

bool value
bool snapIn

Detailed Description

A class representing a button which can be clicked by the user in any scene view.

Definition at line 21 of file InteractiveButton.h.


Constructor & Destructor Documentation

InteractiveButton::InteractiveButton (  ) 

Constructor

Definition at line 13 of file InteractiveButton.cpp.

References snapIn, and value.

Referenced by clone().


Member Function Documentation

void InteractiveButton::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 28 of file InteractiveButton.cpp.

References SimObject::addToDescriptions(), ObjectDescription::depth, SimObject::fullName, ObjectDescription::fullName, ObjectDescription::name, OBJECT_TYPE_SENSORPORT, and ObjectDescription::type.

void InteractiveButton::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 19 of file InteractiveButton.cpp.

References boolSensor.

SimObject * InteractiveButton::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 65 of file InteractiveButton.cpp.

References SimObject::addChildNode(), SimObject::childNodes, SimObject::deactivatedChildNode, SimObject::deactivatedChildNodeSuccessor, SimObject::fullName, InteractiveButton(), SimObject::intersectionSphereRadius, SimObject::name, SimObject::parentNode, SimObject::position, SimObject::rotation, SimObject::setFullName(), SimObject::setName(), SimObject::setPosition(), and snapIn.

void InteractiveButton::computeValue ( bool &  value,
int  portId 
) [virtual]

Returns the current value of the button

Parameters:
value The value
portId The id of the sensorport

Reimplemented from Sensor.

Definition at line 40 of file InteractiveButton.cpp.

virtual std::string InteractiveButton::getKind (  )  const [inline, virtual]

Returns a string describing the kind of object

Returns:
The kind

Reimplemented from Sensor.

Definition at line 36 of file InteractiveButton.h.

void InteractiveButton::hasBeenClicked (  )  [virtual]

Informs the button about being clicked

Reimplemented from SimObject.

Definition at line 45 of file InteractiveButton.cpp.

References snapIn, and value.

void InteractiveButton::hasBeenReleased (  )  [virtual]

Informs the button about being released

Reimplemented from SimObject.

Definition at line 57 of file InteractiveButton.cpp.

References snapIn, and value.

bool InteractiveButton::isMovableOrClickable ( std::string &  nameOfObject,
bool  testClickable 
) const [virtual]

Returns true, since this object is clickable

Parameters:
nameOfObject The name of this object will be copied to this variable
testClickable Flag: Also test for interactive buttons, if true
Returns:
Always true

Reimplemented from SimObject.

Definition at line 87 of file InteractiveButton.cpp.

References SimObject::fullName, and SimObject::isMovableOrClickable().

void InteractiveButton::setSnapIn ( bool  snapIn  )  [inline]

Sets the value of the snapIn flag

Parameters:
snapIn The new value of snapIn

Definition at line 76 of file InteractiveButton.h.

Referenced by SAX2Handler::parseInteractiveButtonAttributes().


Member Data Documentation

bool InteractiveButton::snapIn [protected]

Flag: Button keeps activated after click, if true

Definition at line 27 of file InteractiveButton.h.

Referenced by clone(), hasBeenClicked(), hasBeenReleased(), and InteractiveButton().

bool InteractiveButton::value [protected]

The current value of the button (true/false)

Definition at line 25 of file InteractiveButton.h.

Referenced by hasBeenClicked(), hasBeenReleased(), and InteractiveButton().


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