Main Page | Modules | Namespace List | Class Hierarchy | Class List | Namespace Members | Class 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_nodeto_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.

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.