public class SoVRMLProximitySensor extends SoVRMLNode
SoVRMLProximitySensor
generates events when the user enters, exits, and moves within a region in space (defined by a box).
<font color="#0000FF">NOTE:</font> This class does not exist in Open Inventor 10.0 and later.
This section describes the expected behavior of the node in a conforming VRML97 browser application. In some cases, the application is responsible for implementing portions of the expected behavior. Open Inventor viewer classes and IVF classes implement some of the application behaviors.
This section may reference portions of the VRML97 specification that are not present in this help file. The complete VRML97 spec is available at
The SoVRMLProximitySensor
generates events when the user enters, exits, and moves within a region in space (defined by a box). A proximity sensor can be enabled or disabled by sending it an enabled
event with a value of true or false
An SoVRMLProximitySensor
generates isActive
true/false events as the viewer enters and exits the rectangular box defined by its center
and size
fields. Browsers must interpolate user positions and timestamp the isActive
events with the exact time the user first intersected the proximity region. The center
field defines the center point of the proximity region in object space, and the size
field specifies a vector which defines the width (x), height (y), and depth (z) of the box bounding the region. SoVRMLProximitySensor
nodes are affected by the hierarchical transformations of its parents.
The enterTime
event is generated whenever the isActive
true event is generated (user enters the box), and exitTime
events are generated whenever isActive
false event is generated (user exits the box).
The position_changed
and orientation_changed
events send events whenever the position and orientation of the viewer changes with respect to the SoVRMLProximitySensor
's coordinate system - this includes enter and exit times. Note that the user movement may be as a result of a variety of circumstances (e.g. browser navigation, proximity sensor's coordinate system changes, bound Viewpoint's position or orientation changes, or the SoVRMLProximitySensor
's coordinate system changes).
Each SoVRMLProximitySensor
behaves independently of all other SoVRMLProximitySensors - every enabled SoVRMLProximitySensor
that is affected by the user's movement receives and sends events, possibly resulting in multiple SoVRMLProximitySensors receiving and sending events simultaneously. Unlike SoVRMLTouchSensors, there is no notion of an SoVRMLProximitySensor
lower in the scene graph "grabbing" events.
Instanced (DEF/USE) SoVRMLProximitySensors use the union of all the boxes to check for enter and exit - an instanced SoVRMLProximitySensor
will detect enter and exit for all instances of the box and send output events appropriately.
An SoVRMLProximitySensor
that surrounds the entire world will have an enterTime equal to the time that the world was entered and can be used to start up animations or behaviors as soon as a world is loaded. A SoVRMLProximitySensor
with a (0 0 0) size
field cannot generate events - this is equivalent to setting the enabled
field to false.
File format/default:
VRMLProximitySensor {
center | 0 0 0 |
enabled | true |
size | 0 0 0 |
metadata | NULL |
SoSFBool | isActive |
SoSFVec3f | position_changed |
SoSFRotation | orientation_changed |
SoSFVec3f | centerOfRotation_changed (Note: Not implemented) |
SoSFTime | enterTime |
SoSFTime | exitTime |
SoSFVec3f | center_changed |
SoSFBool | enabled_changed |
SoSFVec3f | size_changed |
SoSFNode | metadata_changed |
Inventor.ConstructorCommand
Modifier and Type | Field and Description |
---|---|
SoSFVec3f |
center
Deprecated.
|
SoSFVec3f |
centerOfRotation_changed
Deprecated.
Output event sent when centerOfRotation changes.
|
SoSFBool |
enabled
Deprecated.
Enable (true) or disable (false) the sensor.
|
SoSFTime |
enterTime
Deprecated.
Output event sent when viewer enters.
|
SoSFTime |
exitTime
Deprecated.
Output event sent when viewer leaves.
|
SoSFBool |
isActive
Deprecated.
Output event sent when viewer enters/leaves.
|
SoSFRotation |
orientation_changed
Deprecated.
Output event sent when viewer turns.
|
SoSFVec3f |
position_changed
Deprecated.
Output event sent when viewer moves.
|
SoSFVec3f |
size
Deprecated.
Define the rectangular box within which isActive event is generated.
|
metadata
VERBOSE_LEVEL, ZeroHandle
Constructor and Description |
---|
SoVRMLProximitySensor()
Deprecated.
Constructor.
|
Modifier and Type | Method and Description |
---|---|
static void |
enableEvents(boolean OnOffFlag)
Deprecated.
Enables/disables events for
all
SoVRMLProximitySensor objects. |
static boolean |
isEventsEnabled()
Deprecated.
Queries if events are enabled for all objects of this class.
|
affectsState, callback, copy, copy, distribute, doAction, getAlternateRep, getBoundingBox, getByName, getMatrix, getPrimitiveCount, getRenderUnitID, GLRender, GLRenderBelowPath, GLRenderInPath, GLRenderOffPath, grabEventsCleanup, grabEventsSetup, handleEvent, isBoundingBoxIgnoring, isOverride, pick, rayPick, search, setOverride, touch, write
copyFieldValues, copyFieldValues, enableNotify, fieldsAreEqual, get, getAllFields, getEventIn, getEventOut, getField, getFieldName, hasDefaultValues, isNotifyEnabled, set, setToDefaults
dispose, getEXTERNPROTO, getName, getPROTO, isDisposable, isSynchronizable, setName, setSynchronizable
getAddress, getNativeResourceHandle, startInternalThreads, stopInternalThreads
public final SoSFVec3f center
public final SoSFVec3f size
public final SoSFBool enabled
public final SoSFBool isActive
public final SoSFVec3f position_changed
public final SoSFRotation orientation_changed
public final SoSFVec3f centerOfRotation_changed
public final SoSFTime enterTime
public final SoSFTime exitTime
public static boolean isEventsEnabled()
public static void enableEvents(boolean OnOffFlag)
SoVRMLProximitySensor
objects.
If you have created several objects of this class, you can disable/enable events for all of them with a single call to this method.Generated on January 23, 2025, Copyright © Thermo Fisher Scientific. All rights reserved. http://www.openinventor.com