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

openvrml::vrml97_node::touch_sensor_node Class Reference

TouchSensor node instances. More...

Inheritance diagram for openvrml::vrml97_node::touch_sensor_node:

Inheritance graph
[legend]
Collaboration diagram for openvrml::vrml97_node::touch_sensor_node:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 touch_sensor_node (const node_type &type, const scope_ptr &scope)
 Construct.

virtual ~touch_sensor_node () throw ()
 Destroy.

virtual touch_sensor_node * to_touch_sensor () const
 Cast to a touch_sensor_node.

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


Private Member Functions

void process_set_enabled (const field_value &value, 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 touch_sensor_class
 Class object for TouchSensor instances.


Detailed Description

TouchSensor node instances.


Constructor & Destructor Documentation

openvrml::vrml97_node::touch_sensor_node::touch_sensor_node const node_type type,
const scope_ptr scope
 

Construct.

Parameters:
type the node_type associated with the instance.
scope the scope that the new node will belong to.

openvrml::vrml97_node::touch_sensor_node::~touch_sensor_node  )  throw () [virtual]
 

Destroy.


Member Function Documentation

void openvrml::vrml97_node::touch_sensor_node::activate double  timeStamp,
bool  isOver,
bool  isActive,
double *  p
 

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

bool openvrml::vrml97_node::touch_sensor_node::enabled  )  const
 

Return whether the TouchSensor is enabled.

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

void openvrml::vrml97_node::touch_sensor_node::process_set_enabled const field_value value,
double  timestamp
throw (std::bad_cast) [private]
 

set_enabled eventIn handler.

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

touch_sensor_node * openvrml::vrml97_node::touch_sensor_node::to_touch_sensor  )  const [virtual]
 

Cast to a touch_sensor_node.

Returns:
a pointer to the object.

Reimplemented from openvrml::node.


Friends And Related Function Documentation

openvrml::vrml97_node::touch_sensor_node::touch_sensor_class [friend]
 

Class object for TouchSensor instances.


Member Data Documentation

sfbool openvrml::vrml97_node::touch_sensor_node::active [private]
 

isActive eventOut.

sfbool openvrml::vrml97_node::touch_sensor_node::enabled_ [private]
 

enabled exposedField.

sfvec3f openvrml::vrml97_node::touch_sensor_node::hitNormal [private]
 

hitNormal_changed eventOut.

sfvec3f openvrml::vrml97_node::touch_sensor_node::hitPoint [private]
 

hitPoint_changed eventOut.

sfvec2f openvrml::vrml97_node::touch_sensor_node::hitTexCoord [private]
 

hitTexCoord_changed eventOut.

sfbool openvrml::vrml97_node::touch_sensor_node::over [private]
 

isOver eventOut.

sftime openvrml::vrml97_node::touch_sensor_node::touchTime [private]
 

touchTime eventOut.