SoVRMLVisibilitySensor(3)

NAME
SoVRMLVisibilitySensor - The SoVRMLVisibilitySensor class will generate events based on visibility.

SYNOPSIS

#include <Inventor/VRMLnodes/SoVRMLVisibilitySensor.h>

Inherits SoNode.

  Public Member Functions
virtual SoType getTypeId (void) const
SoVRMLVisibilitySensor (void)
virtual void GLRender (SoGLRenderAction *action)

  Static Public Member Functions
static SoType getClassTypeId (void)
static void initClass (void)

  Public Attributes
SoSFVec3f center
SoSFVec3f size
SoSFBool enabled
SoSFTime enterTime
SoSFTime exitTime
SoSFBool isActive

  Protected Member Functions
virtual const SoFieldData * getFieldData (void) const
virtual ~SoVRMLVisibilitySensor ()

  Static Protected Member Functions
static const SoFieldData ** getFieldDataPtr (void)

  Additional Inherited Members

Detailed Description

The SoVRMLVisibilitySensor class will generate events based on visibility. The detailed class documentation is taken verbatim from the VRML97 standard (ISO/IEC 14772-1:1997). It is copyright The Web3D Consortium, and is used by permission of the Consortium:

VisibilitySensor {
  exposedField SFVec3f center   0 0 0      # (-,)
  exposedField SFBool  enabled  TRUE
  exposedField SFVec3f size     0 0 0      # [0,)
  eventOut     SFTime  enterTime
  eventOut     SFTime  exitTime
  eventOut     SFBool  isActive
}

The VisibilitySensor node detects visibility changes of a rectangular box as the user navigates the world. VisibilitySensor is typically used to detect when the user can see a specific object or region in the scene in order to activate or deactivate some behaviour or animation. The purpose is often to attract the attention of the user or to improve performance.

The enabled field enables and disables the VisibilitySensor node. If enabled is set to FALSE, the VisibilitySensor node does not send events. If enabled is TRUE, the VisibilitySensor node 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. A FALSE event is sent when the box has no effect on the view. Browsers shall guarantee that, if isActive is FALSE, the box has absolutely no effect on the rendered view. Browsers may err liberally when isActive is TRUE. For example, the box may affect the rendering.

The exposed fields center and size specify the object space location of the box centre and the extents of the box (i.e., width, height, and depth). The VisibilitySensor node's box is affected by hierarchical transformations of its parents. The components of the size field shall be greater than or equal to zero.

The enterTime event is generated whenever the isActive TRUE event is generated, and exitTime events are generated whenever isActive FALSE events are generated. A VisibilitySensor read from a VRML file shall generate isActive TRUE and enterTime events if the sensor is enabled and the visibility box is visible. A VisibilitySensor inserted into the transformation hierarchy shall generate isActive TRUE and enterTime events if the sensor is enabled and the visibility box is visible. A VisibilitySensor removed from the transformation hierarchy shall generate isActive FALSE and exitTime events if the sensor is enabled and the visibility box is visible.

Each VisibilitySensor node behaves independently of all other VisibilitySensor nodes. Every enabled VisibilitySensor node that is affected by the user's movement receives and sends events, possibly resulting in multiple VisibilitySensor nodes receiving and sending events simultaneously. Unlike TouchSensor nodes, there is no notion of a VisibilitySensor node lower in the scene graph 'grabbing' events. Multiply instanced VisibilitySensor nodes (i.e., DEF/USE) use the union of all the boxes defined by their instances. An instanced VisibilitySensor node shall detect visibility changes for all instances of the box and send events appropriately.

Constructor & Destructor Documentation

  SoVRMLVisibilitySensor::SoVRMLVisibilitySensor (void)
Constructor.

  SoVRMLVisibilitySensor::~SoVRMLVisibilitySensor () [protected], [virtual]
Destructor.

Member Function Documentation

  SoType SoVRMLVisibilitySensor::getClassTypeId (void) [static]
This static method returns the SoType object associated with objects of this class.

  SoType SoVRMLVisibilitySensor::getTypeId (void) const [virtual]
Returns the type identification of an object derived from a class inheriting SoBase. This is used for runtime type checking and 'downward' casting.

Implements SoBase.

  const SoFieldData ** SoVRMLVisibilitySensor::getFieldDataPtr (void) [static], [protected]
This API member is considered internal to the library, as it is not likely to be of interest to the application programmer.
 Returns the SoFieldData class which holds information about fields in this node.

  const SoFieldData * SoVRMLVisibilitySensor::getFieldData (void) const [protected], [virtual]
Returns a pointer to the class-wide field data storage object for this instance. If no fields are present, returns NULL.

Reimplemented from SoFieldContainer.

  void SoVRMLVisibilitySensor::initClass (void) [static]

  void SoVRMLVisibilitySensor::GLRender (SoGLRenderAction * action) [virtual]
Action method for the SoGLRenderAction.

This is called during rendering traversals. Nodes influencing the rendering state in any way or want to throw geometry primitives at OpenGL override this method.

Reimplemented from SoNode.

Member Data Documentation

  SoSFVec3f SoVRMLVisibilitySensor::center
Visibility area center. Default value is (0, 0, 0).

  SoSFVec3f SoVRMLVisibilitySensor::size
Visibility area size. Default value is (0, 0, 0).

  SoSFBool SoVRMLVisibilitySensor::enabled
Enable/disable sensor. Default value is TRUE.

  SoSFTime SoVRMLVisibilitySensor::enterTime
An eventOut that is triggered when the region becomes visible.

  SoSFTime SoVRMLVisibilitySensor::exitTime
An eventOut that is triggered when the region becomes not visible.

  SoSFBool SoVRMLVisibilitySensor::isActive
An eventOut that is generated when the visibility state changes.

Author

Generated automatically by Doxygen for Coin from the source code.