openvrml::vrml97_node::plane_sensor_node Class Reference

Inheritance diagram for openvrml::vrml97_node::plane_sensor_node:
[legend]

List of all members.


Detailed Description

The PlaneSensor node maps pointing device motion into two-dimensional translation in a plane parallel to the z = 0 plane of the local coordinate system. The PlaneSensor node uses the descendent geometry of its parent node to determine whether it is liable to generate events.

Public Member Functions

 plane_sensor_node (const node_type &type, const boost::shared_ptr< openvrml::scope > &scope)
 Construct.
virtual ~plane_sensor_node () throw ()
 Destroy.
virtual plane_sensor_nodeto_plane_sensor () const
 Cast to a plane_sensor_node.
void activate (double timeStamp, bool isActive, double *p)
bool enabled () const
 Return whether the PlaneSensor is enabled.

Private Member Functions

virtual void do_render_child (openvrml::viewer &viewer, rendering_context context)
 Render the node.

Private Attributes

exposedfield< sfboolauto_offset_
 autoOffset exposedField.
exposedfield< sfboolenabled_
 enabled exposedField.
exposedfield< sfvec2fmax_position_
 maxPosition exposedField.
exposedfield< sfvec2fmin_position_
 minPosition exposedField.
exposedfield< sfvec3foffset_
 offset exposedField.
sfbool is_active_
 isActive eventOut value.
sfbool_emitter is_active_emitter_
 isActive eventOut emitter.
sfvec3f track_point_changed_
 trackPoint_changed eventOut value.
sfvec3f_emitter track_point_changed_emitter_
 trackPoint_changed eventOut emitter.
sfvec3f translation_changed_
 translation_changed eventOut value.
sfvec3f_emitter translation_changed_emitter_
 translation_changed eventOut emitter.
sfvec3f activationPoint
 The point at which the PlaneSensor was activated.
mat4f activationMatrix
 Activation matrix.
mat4f modelview
 The modelview matrix.

Friends

class plane_sensor_class
 Class object for PlaneSensor instances.

Constructor & Destructor Documentation

openvrml::vrml97_node::plane_sensor_node::plane_sensor_node ( const node_type type,
const boost::shared_ptr< openvrml::scope > &  scope 
)

Construct.

Parameters:
type the node_type associated with the node.
scope the scope to which the node belongs.

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

Destroy.


Member Function Documentation

plane_sensor_node * openvrml::vrml97_node::plane_sensor_node::to_plane_sensor (  )  const [virtual]

Cast to a plane_sensor_node.

Returns:
a pointer to the plane_sensor_node.

Reimplemented from openvrml::node.

void openvrml::vrml97_node::plane_sensor_node::activate ( double  timestamp,
bool  isActive,
double *  p 
)

Todo:
The local coords are computed for one instance; do we need to convert p to local coords for each instance (USE) of the sensor?

bool openvrml::vrml97_node::plane_sensor_node::enabled (  )  const

Return whether the PlaneSensor is enabled.

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

void openvrml::vrml97_node::plane_sensor_node::do_render_child ( openvrml::viewer viewer,
rendering_context  context 
) [private, virtual]

Render the node.

Render a frame if there is one available.

Parameters:
viewer a Viewer.
context a rendering context.

Reimplemented from openvrml::child_node.


Friends And Related Function Documentation

openvrml::vrml97_node::plane_sensor_node::plane_sensor_class [friend]

Class object for PlaneSensor instances.


Member Data Documentation

autoOffset exposedField.

enabled exposedField.

maxPosition exposedField.

minPosition exposedField.

offset exposedField.

isActive eventOut value.

isActive eventOut emitter.

trackPoint_changed eventOut value.

trackPoint_changed eventOut emitter.

translation_changed eventOut value.

translation_changed eventOut emitter.

The point at which the PlaneSensor was activated.

Activation matrix.

The modelview matrix.