29 #ifndef __X3DTOUCHSENSORNODE_H__
30 #define __X3DTOUCHSENSORNODE_H__
54 public AutoUpdate< TypedField < SFBool, SFBool > > {
56 virtual void setValue(
const bool &b,
int _id = 0 ) {
60 virtual void update() {
62 bool _isActive =
static_cast< SFBool *
>( routes_in[0] )->
getValue();
65 if( !_isActive && ts->
isOver->getValue() ) {
66 ts->
touchTime->setValue( event.time_stamp, ts->id );
76 Inst< SFBool > _enabled = 0,
77 Inst< SFNode > _metadata = 0,
78 Inst< SFBool > _isActive = 0,
79 Inst< SFBool > _isOver = 0,
80 Inst< SFTime > _touchTime = 0 );
Contains the SFTime field class.
Header file for X3DPointingDeviceSensorNode, X3D scene-graph node.
The SFBool field contains a single boolean value.
Definition: SFBool.h:41
virtual void setValue(const bool &v, int id=0)
Set the value of the field.
Definition: SField.h:215
virtual void update()
Make the field up to date given that an event has occured.
Definition: SField.h:181
This abstract node type is the base type for all pointing device sensors.
Definition: X3DPointingDeviceSensorNode.h:109
H3DUniquePtr< SFBool > isOver
The isOver field reflects the state of the pointing device with regard to whether it is pointing towa...
Definition: X3DPointingDeviceSensorNode.h:149
The SetTouchTime class is specialize field to generate a touchTime event.
Definition: X3DTouchSensorNode.h:54
This abstract node type is the base type for all touch-style pointing device sensors.
Definition: X3DTouchSensorNode.h:46
H3DUniquePtr< SetTouchTime > setTouchTime
instance of specialized field used to set the touchTime field.
Definition: X3DTouchSensorNode.h:102
H3DUniquePtr< SFTime > touchTime
The field touchTime is generated when all three of the following conditions are true:
Definition: X3DTouchSensorNode.h:95
static H3DNodeDatabase database
The H3DNodeDatabase for this node.
Definition: X3DTouchSensorNode.h:98
Type getValue(const char *s, const char *&rest)
Function that reads characters from a char * and converts them to a given type.
Definition: X3DFieldConversion.h:134
H3D API namespace.
Definition: Anchor.h:38
The AutoUpdate field is a template to force the BaseField to update itself as soon as an event is rec...
Definition: FieldTemplates.h:130
The H3DNodeDatabase contains a mapping between a name of a Node and the constructor for the Node with...
Definition: H3DNodeDatabase.h:194