Detects visibility changes of a rectangular box.
Action not implemented for this node.
More...
#include <Inventor/VRMLnodes/SoVRMLVisibilitySensor.h>
Public Member Functions | |
virtual SoType | getTypeId () const |
SoVRMLVisibilitySensor () | |
Static Public Member Functions | |
static SoType | getClassTypeId () |
static void | enableEvents (SbBool OnOffFlag) |
static SbBool | isEventsEnabled () |
Public Attributes | |
SoSFVec3f | center |
SoSFVec3f | size |
SoSFBool | enabled |
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.
NOTE: This class does not exist in Open Inventor 10.0 and later.This section may reference portions of the VRML97 specification that are not present in this help file. The complete VRML97 spec is available at http://www.web3d.org .
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.
center | 0 0 0 |
enabled | TRUE |
size | 0 0 0 |
metadata | NULL |
SoSFVec3f | set_center |
SoSFBool | set_enabled |
SoSFVec3f | set_size |
SoSFNode | set_metadata |
SoSFTime | enterTime |
SoSFTime | exitTime |
SoSFBool | isActive |
SoSFVec3f | center_changed |
SoSFBool | enabled_changed |
SoSFVec3f | size_changed |
SoSFNode | metadata_changed |
SoVRMLVisibilitySensor::SoVRMLVisibilitySensor | ( | ) |
Constructor.
static void SoVRMLVisibilitySensor::enableEvents | ( | SbBool | OnOffFlag | ) | [static] |
Enables/disables events for all 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.
static SoType SoVRMLVisibilitySensor::getClassTypeId | ( | ) | [static] |
Returns the type identifier for this class.
Reimplemented from SoVRMLNode.
virtual SoType SoVRMLVisibilitySensor::getTypeId | ( | ) | const [virtual] |
Returns the type identifier for this specific instance.
Reimplemented from SoVRMLNode.
static SbBool SoVRMLVisibilitySensor::isEventsEnabled | ( | ) | [static] |
Queries if events are enabled for all objects of this class.
Object space location of the box center.
Enables (TRUE) or disables (FALSE) the sensor.
Width, height, and depth of the box.