openvrml::vrml97_node::proximity_sensor_node Class Reference

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

List of all members.


Detailed Description

Represents ProximitySensor node instances.

Public Member Functions

 proximity_sensor_node (const node_type &type, const boost::shared_ptr< openvrml::scope > &scope)
 Construct.
virtual ~proximity_sensor_node () throw ()
 Destroy.

Private Member Functions

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

Private Attributes

exposedfield< sfvec3fcenter_
 center exposedField.
exposedfield< sfboolenabled_
 enabled exposedField.
exposedfield< sfvec3fsize_
 size exposedField.
sfbool is_active_
 isActive eventOut value.
sfbool_emitter is_active_emitter_
 isActive eventOut emitter.
sfvec3f position_changed_
 position_changed eventOut value.
sfvec3f_emitter position_changed_emitter_
 position_changed eventOut emitter.
sfrotation orientation_changed_
 orientation_changed eventOut value.
sfrotation_emitter orientation_changed_emitter_
 orientation_changed eventOut emitter.
sftime enter_time_
 enterTime eventOut value.
sftime_emitter enter_time_emitter_
 enterTime eventOut emitter.
sftime exit_time_
 exitTime eventOut value.
sftime_emitter exit_time_emitter_
 exitTime eventOut emitter.

Friends

class proximity_sensor_class
 Class object for ProximitySensor instances.

Constructor & Destructor Documentation

openvrml::vrml97_node::proximity_sensor_node::proximity_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::proximity_sensor_node::~proximity_sensor_node (  )  throw () [virtual]

Destroy.


Member Function Documentation

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

Render the node: generate proximity events.

If necessary, events prior to the current time are generated due to interpolation of enterTimes and exitTimes. The timestamp should never be increased.

This is in a render() method since the it needs the viewer position with respect to the local coordinate system. Could do this with Node::inverseTransform(double [4][4]) now...

The positions and times are not interpolated to report the exact place and time of entries and exits from the sensor regions as required by the spec, since that would require the last viewer position to be stored in the node, which is problematic in the presence of DEF/USEd nodes... I suppose the scene could keep the last viewer position in the global coordinate system and it could be transformed all the way down the scenegraph, but that sounds painful.

Parameters:
viewer a Viewer.
context a rendering context.

Reimplemented from openvrml::child_node.


Friends And Related Function Documentation

openvrml::vrml97_node::proximity_sensor_node::proximity_sensor_class [friend]

Class object for ProximitySensor instances.


Member Data Documentation

center exposedField.

enabled exposedField.

size exposedField.

isActive eventOut value.

isActive eventOut emitter.

position_changed eventOut value.

position_changed eventOut emitter.

orientation_changed eventOut value.

orientation_changed eventOut emitter.

enterTime eventOut value.

enterTime eventOut emitter.

exitTime eventOut value.

exitTime eventOut emitter.