public class SoVRMLVisibilitySensor extends SoVRMLNode
The SoVRMLVisibilitySensor
detects visibility changes of a rectangular box as the user navigates the world. SoVRMLVisibilitySensor
is typically used to detect when the user can see a specific object or region in the scene, and to activate or deactivate some behavior or animation in order to attract the user or improve performance.
<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 SoVRMLVisibilitySensor
detects visibility changes of a rectangular box as the user navigates the world. SoVRMLVisibilitySensor
is typically used to detect when the user can see a specific object or region in the scene, and to activate or deactivate some behavior or animation in order to attract the user or improve performance.
The enabled
field enables and disables the SoVRMLVisibilitySensor
. If enabled
is set to false, the SoVRMLVisibilitySensor
does not send output events. If enabled
is true, then the SoVRMLVisibilitySensor
detects changes to the visibility status of the box specified and sends events through the isActive eventOut. A true event is output to isActive when any portion of the box impacts the rendered view, and a false event is sent when the box has no effect on the view. Browsers must guarantee that if isActive is false that the box has absolutely no effect on the rendered view - browsers may error liberally when isActive is true (e.g. maybe it does affect the rendering).
The exposed fields center
and size
specify the object space location of the box center and the extents of the box (i.e., width, height, and depth). The SoVRMLVisibilitySensor
's box is affected by hierarchical transformations of its parents.
The enterTime event is generated whenever the isActive true event is generated, and exitTime events are generated whenever isActive false events are generated.
Each SoVRMLVisibilitySensor
behaves independently of all other SoVRMLVisibilitySensors - every enabled SoVRMLVisibilitySensor
that is affected by the user's movement receives and sends events, possibly resulting in multiple SoVRMLVisibilitySensors receiving and sending events simultaneously. Unlike SoVRMLTouchSensors, there is no notion of an SoVRMLVisibilitySensor
lower in the scene graph "grabbing" events. Instanced (DEF/USE) SoVRMLVisibilitySensors use the union of all the boxes defined by their instances to check for enter and exit - an instanced SoVRMLVisibilitySensor
will detect enter, motion, and exit for all instances of the box and send output events appropriately.
File format/default:
VRMLVisibilitySensor {
center | 0 0 0 |
enabled | true |
size | 0 0 0 |
metadata | NULL |
SoSFTime | enterTime |
SoSFTime | exitTime |
SoSFBool | isActive |
SoSFVec3f | center_changed |
SoSFBool | enabled_changed |
SoSFVec3f | size_changed |
SoSFNode | metadata_changed |
Inventor.ConstructorCommand
Modifier and Type | Field and Description |
---|---|
SoSFVec3f |
center
Deprecated.
Object space location of the box center.
|
SoSFBool |
enabled
Deprecated.
Enables (true) or disables (false) the sensor.
|
SoSFVec3f |
size
Deprecated.
Width, height, and depth of the box.
|
metadata
VERBOSE_LEVEL, ZeroHandle
Constructor and Description |
---|
SoVRMLVisibilitySensor()
Deprecated.
Constructor.
|
Modifier and Type | Method and Description |
---|---|
static void |
enableEvents(boolean OnOffFlag)
Deprecated.
Enables/disables events for
all
SoVRMLVisibilitySensor 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 static boolean isEventsEnabled()
public static void enableEvents(boolean OnOffFlag)
SoVRMLVisibilitySensor
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