Main Page   Namespace List   Class Hierarchy   Compound List   Namespace Members   Compound Members   Related Pages  

TouchSensor Class Reference

TouchSensor node instances. More...

Inheritance diagram for TouchSensor:

AbstractChild AbstractBase ChildNode Node Node List of all members.

Public Methods

 TouchSensor (const NodeType &nodeType, const ScopePtr &scope)
 Constructor.

virtual ~TouchSensor () throw ()
 Destructor.

virtual TouchSensor * toTouchSensor () const
 Cast to a TouchSensor.

void activate (double timeStamp, bool isOver, bool isActive, double *p)
bool isEnabled () const
 Return whether the TouchSensor is enabled.


Private Methods

void processSet_enabled (const FieldValue &sfbool, double timestamp) throw (std::bad_cast)
 set_enabled eventIn handler.


Private Attributes

SFBool enabled
 enabled exposedField.

SFVec3f hitNormal
 hitNormal_changed eventOut.

SFVec3f hitPoint
 hitPoint_changed eventOut.

SFVec2f hitTexCoord
 hitTexCoord_changed eventOut.

SFBool active
 isActive eventOut.

SFBool over
 isOver eventOut.

SFTime touchTime
 touchTime eventOut.


Friends

class TouchSensorClass
 Class object for TouchSensor instances.


Detailed Description

TouchSensor node instances.


Constructor & Destructor Documentation

TouchSensor const NodeType   nodeType,
const ScopePtr   scope
 

Constructor.

Parameters:
nodeType the NodeType associated with the instance.
scope the Scope that the new node will belong to.

~TouchSensor   throw () [virtual]
 

Destructor.


Member Function Documentation

void activate double    timeStamp,
bool    isOver,
bool    isActive,
double *    p
 

Todo:
Doesn't compute the xxx_changed eventOuts yet...

bool isEnabled   const
 

Return whether the TouchSensor is enabled.

Returns:
true if the TouchSensor is enabled, false otherwise.

void processSet_enabled const FieldValue   sfbool,
double    timestamp
throw (std::bad_cast) [private]
 

set_enabled eventIn handler.

Parameters:
sfbool an SFBool value.
timestamp the current time.
Exceptions:
std::bad_cast if sfbool is not an SFBool.

TouchSensor * toTouchSensor   const [virtual]
 

Cast to a TouchSensor.

Returns:
a pointer to the object.

Reimplemented from Node.


Friends And Related Function Documentation

TouchSensorClass [friend]
 

Class object for TouchSensor instances.


Member Data Documentation

SFBool active [private]
 

isActive eventOut.

SFBool enabled [private]
 

enabled exposedField.

SFVec3f hitNormal [private]
 

hitNormal_changed eventOut.

SFVec3f hitPoint [private]
 

hitPoint_changed eventOut.

SFVec2f hitTexCoord [private]
 

hitTexCoord_changed eventOut.

SFBool over [private]
 

isOver eventOut.

SFTime touchTime [private]
 

touchTime eventOut.