Home | Download | Screen shots | Discussion | Documentation
--- | --- | --- | --- | ---

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

# 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< sfvec3f > | center_
| center exposedField.
exposedfield< sfbool > | enabled_
| enabled exposedField.
exposedfield< sfvec3f > | size_
| 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

exposedfield< sfvec3f > openvrml::vrml97_node::proximity_sensor_node::center_ `[private]`

| center exposedField.

exposedfield< sfbool > openvrml::vrml97_node::proximity_sensor_node::enabled_ `[private]`

| enabled exposedField.

exposedfield< sfvec3f > openvrml::vrml97_node::proximity_sensor_node::size_ `[private]`

| size exposedField.

sfbool openvrml::vrml97_node::proximity_sensor_node::is_active_ `[private]`

| isActive eventOut value.

sfbool_emitter openvrml::vrml97_node::proximity_sensor_node::is_active_emitter_ `[private]`

| isActive eventOut emitter.

sfvec3f openvrml::vrml97_node::proximity_sensor_node::position_changed_ `[private]`

| position_changed eventOut value.

sfvec3f_emitter openvrml::vrml97_node::proximity_sensor_node::position_changed_emitter_ `[private]`

| position_changed eventOut emitter.

sfrotation openvrml::vrml97_node::proximity_sensor_node::orientation_changed_ `[private]`

| orientation_changed eventOut value.

sfrotation openvrml::vrml97_node::proximity_sensor_node::orientation_changed_emitter_ `[private]`

| orientation_changed eventOut emitter.

sftime openvrml::vrml97_node::proximity_sensor_node::enter_time_ `[private]`

| enterTime eventOut value.

sftime_emitter openvrml::vrml97_node::proximity_sensor_node::enter_time_emitter_ `[private]`

| enterTime eventOut emitter.

sftime openvrml::vrml97_node::proximity_sensor_node::exit_time_ `[private]`

| exitTime eventOut value.

sftime_emitter openvrml::vrml97_node::proximity_sensor_node::exit_time_emitter_ `[private]`

| exitTime eventOut emitter.