H3D::TouchSensor Class Reference
[X3D node classes.]

A TouchSensor node tracks the location and state of the pointing device and detects when the user points at geometry contained by the TouchSensor node's parent group. More...

#include <H3D/TouchSensor.h>

Inheritance diagram for H3D::TouchSensor:

Inheritance graph

List of all members.

Public Member Functions

 TouchSensor (Inst< SFString > _description=0, Inst< SFBool > _enabled=0, Inst< SFNode > _metadata=0, Inst< SFVec3f > _hitNormal_changed=0, Inst< SFVec3f > _hitPoint_changed=0, Inst< SFVec2f > _hitTexCoord_changed=0, Inst< SFBool > _isActive=0, Inst< SFBool > _isOver=0, Inst< SFTime > _touchTime=0)
 Constructor.

Public Attributes

auto_ptr< SFVec3fhitNormal_changed
 hitNormal_changed events contain the surface normal vector at the hitPoint.
auto_ptr< SFVec3fhitPoint_changed
 hitPoint_changed events contain the 3D point on the surface of the underlying geometry, given in the TouchSensor node's coordinate system.
auto_ptr< SFVec2fhitTexCoord_changed
 hitTexCoord_changed events contain the texture coordinates of that surface at the hitPoint.

Static Public Attributes

static H3DNodeDatabase database
 The H3DNodeDatabase for this node.

Protected Member Functions

virtual void onIsOver (IntersectionInfo *result=0, Matrix4f *global_to_local=0)
 Called to generate isOver events and other events (dependent on isOver).


Detailed Description

A TouchSensor node tracks the location and state of the pointing device and detects when the user points at geometry contained by the TouchSensor node's parent group.

As the user moves the bearing over the TouchSensor node's geometry, the point of intersection (if any) between the bearing and the geometry is determined. Each movement of the pointing device, while isOver is TRUE, generates hitPoint_changed, hitNormal_changed and hitTexCoord_changed events. hitPoint_changed events contain the 3D point on the surface of the underlying geometry, given in the TouchSensor node's coordinate system. hitNormal_changed events contain the surface normal vector at the hitPoint. hitTexCoord_changed events contain the texture coordinates of that surface at the hitPoint. The values of hitTexCoord_changed and hitNormal_changed events are computed as appropriate for the associated shape.


Member Data Documentation

hitNormal_changed events contain the surface normal vector at the hitPoint.

( Given in TouchSensors local coordinates )

Access type: outputOnly

Referenced by onIsOver().

hitPoint_changed events contain the 3D point on the surface of the underlying geometry, given in the TouchSensor node's coordinate system.

Access type: outputOnly

Referenced by onIsOver().

hitTexCoord_changed events contain the texture coordinates of that surface at the hitPoint.

Access type: outputOnly

Referenced by onIsOver().


The documentation for this class was generated from the following files:

Generated on Fri Nov 7 10:31:16 2008 for H3D API by  doxygen 1.5.7