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

openvrml::vrml97_node::plane_sensor_node Class Reference

Inheritance diagram for openvrml::vrml97_node::plane_sensor_node:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

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

virtual ~plane_sensor_node () throw ()
 Destroy.

virtual plane_sensor_node * to_plane_sensor () const
 Cast to a plane_sensor_node.

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

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


Private Member Functions

void process_set_autoOffset (const field_value &value, double timestamp) throw (std::bad_cast)
 set_autoOffset eventIn handler.

void process_set_enabled (const field_value &value, double timestamp) throw (std::bad_cast)
 set_enabled eventIn handler.

void process_set_maxPosition (const field_value &value, double timestamp) throw (std::bad_cast)
 set_maxPosition eventIn handler.

void process_set_minPosition (const field_value &value, double timestamp) throw (std::bad_cast)
 set_minPosition eventIn handler.

void process_set_offset (const field_value &value, double timestamp) throw (std::bad_cast)
 set_offset eventIn handler.


Private Attributes

sfbool autoOffset
 autoOffset exposedField.

sfbool enabled_
 enabled exposedField.

sfvec2f maxPosition
 maxPosition exposedField.

sfvec2f minPosition
 minPosition exposedField.

sfvec3f offset
 offset exposedField.

sfbool active
 isActive eventOut.

sfvec3f translation
 translation_changed eventOut.

sfvec3f trackPoint
 trackPoint_changed eventOut.

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.


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.


Constructor & Destructor Documentation

openvrml::vrml97_node::plane_sensor_node::plane_sensor_node const node_type type,
const scope_ptr 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

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::process_set_autoOffset const field_value value,
double  timestamp
throw (std::bad_cast) [private]
 

set_autoOffset eventIn handler.

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

void openvrml::vrml97_node::plane_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.

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

set_maxPosition eventIn handler.

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

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

set_minPosition eventIn handler.

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

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

set_offset eventIn handler.

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

void openvrml::vrml97_node::plane_sensor_node::render openvrml::viewer viewer,
rendering_context  context
[virtual]
 

Render the node.

Render a frame if there is one available.

Parameters:
viewer a Viewer.
context a rendering context.

Reimplemented from openvrml::node.

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.


Friends And Related Function Documentation

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

Class object for PlaneSensor instances.


Member Data Documentation

mat4f openvrml::vrml97_node::plane_sensor_node::activationMatrix [private]
 

Activation matrix.

sfvec3f openvrml::vrml97_node::plane_sensor_node::activationPoint [private]
 

The point at which the PlaneSensor was activated.

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

isActive eventOut.

sfbool openvrml::vrml97_node::plane_sensor_node::autoOffset [private]
 

autoOffset exposedField.

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

enabled exposedField.

sfvec2f openvrml::vrml97_node::plane_sensor_node::maxPosition [private]
 

maxPosition exposedField.

sfvec2f openvrml::vrml97_node::plane_sensor_node::minPosition [private]
 

minPosition exposedField.

mat4f openvrml::vrml97_node::plane_sensor_node::modelview [private]
 

The modelview matrix.

sfvec3f openvrml::vrml97_node::plane_sensor_node::offset [private]
 

offset exposedField.

sfvec3f openvrml::vrml97_node::plane_sensor_node::trackPoint [private]
 

trackPoint_changed eventOut.

sfvec3f openvrml::vrml97_node::plane_sensor_node::translation [private]
 

translation_changed eventOut.