.TH "SoVRMLVisibilitySensor" 3 "Thu May 29 2014" "Version 4.0.0a" "Coin" \" -*- nroff -*- .ad l .nh .SH NAME SoVRMLVisibilitySensor \- .PP The \fBSoVRMLVisibilitySensor\fP class will generate events based on visibility\&. .PP \fBThe 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:\fP .SH SYNOPSIS .br .PP .PP \fC#include \fP .PP Inherits \fBSoNode\fP\&. .SS "Public Member Functions" .in +1c .ti -1c .RI "virtual \fBSoType\fP \fBgetTypeId\fP (void) const " .br .RI "\fIReturns the type identification of an object derived from a class inheriting \fBSoBase\fP\&. This is used for run-time type checking and 'downward' casting\&. \fP" .ti -1c .RI "\fBSoVRMLVisibilitySensor\fP (void)" .br .ti -1c .RI "virtual void \fBGLRender\fP (\fBSoGLRenderAction\fP *action)" .br .in -1c .SS "Static Public Member Functions" .in +1c .ti -1c .RI "static \fBSoType\fP \fBgetClassTypeId\fP (void)" .br .ti -1c .RI "static void \fBinitClass\fP (void)" .br .in -1c .SS "Public Attributes" .in +1c .ti -1c .RI "\fBSoSFVec3f\fP \fBcenter\fP" .br .ti -1c .RI "\fBSoSFVec3f\fP \fBsize\fP" .br .ti -1c .RI "\fBSoSFBool\fP \fBenabled\fP" .br .ti -1c .RI "\fBSoSFTime\fP \fBenterTime\fP" .br .ti -1c .RI "\fBSoSFTime\fP \fBexitTime\fP" .br .ti -1c .RI "\fBSoSFBool\fP \fBisActive\fP" .br .in -1c .SS "Protected Member Functions" .in +1c .ti -1c .RI "virtual const \fBSoFieldData\fP * \fBgetFieldData\fP (void) const " .br .ti -1c .RI "virtual \fB~SoVRMLVisibilitySensor\fP ()" .br .in -1c .SS "Static Protected Member Functions" .in +1c .ti -1c .RI "static const \fBSoFieldData\fP ** \fBgetFieldDataPtr\fP (void)" .br .in -1c .SS "Additional Inherited Members" .SH "Detailed Description" .PP The \fBSoVRMLVisibilitySensor\fP class will generate events based on visibility\&. .PP \fBThe 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:\fP .PP .nf 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 } .fi .PP .PP 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\&. .PP The \fIenabled\fP 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\&. .PP The exposed fields \fIcenter\fP and \fIsize\fP 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\&. .PP The \fIenterTime\fP 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\&. .PP 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\&. .SH "Constructor & Destructor Documentation" .PP .SS "SoVRMLVisibilitySensor::SoVRMLVisibilitySensor (void)" Constructor\&. .SS "SoVRMLVisibilitySensor::~SoVRMLVisibilitySensor ()\fC [protected]\fP, \fC [virtual]\fP" Destructor\&. .SH "Member Function Documentation" .PP .SS "\fBSoType\fP SoVRMLVisibilitySensor::getTypeId (void) const\fC [virtual]\fP" .PP Returns the type identification of an object derived from a class inheriting \fBSoBase\fP\&. This is used for run-time type checking and 'downward' casting\&. Usage example: .PP .PP .nf void foo(SoNode * node) { if (node->getTypeId() == SoFile::getClassTypeId()) { SoFile * filenode = (SoFile *)node; // safe downward cast, knows the type } } .fi .PP .PP For application programmers wanting to extend the library with new nodes, engines, nodekits, draggers or others: this method needs to be overridden in \fIall\fP subclasses\&. This is typically done as part of setting up the full type system for extension classes, which is usually accomplished by using the pre-defined macros available through for instance \fBInventor/nodes/SoSubNode\&.h\fP (SO_NODE_INIT_CLASS and SO_NODE_CONSTRUCTOR for node classes), Inventor/engines/SoSubEngine\&.h (for engine classes) and so on\&. .PP For more information on writing Coin extensions, see the class documentation of the toplevel superclasses for the various class groups\&. .PP Implements \fBSoBase\fP\&. .SS "const \fBSoFieldData\fP * SoVRMLVisibilitySensor::getFieldData (void) const\fC [protected]\fP, \fC [virtual]\fP" Returns a pointer to the class-wide field data storage object for this instance\&. If no fields are present, returns \fCNULL\fP\&. .PP Reimplemented from \fBSoFieldContainer\fP\&. .SS "void SoVRMLVisibilitySensor::GLRender (\fBSoGLRenderAction\fP *action)\fC [virtual]\fP" Action method for the \fBSoGLRenderAction\fP\&. .PP This is called during rendering traversals\&. Nodes influencing the rendering state in any way or who wants to throw geometry primitives at OpenGL overrides this method\&. .PP Reimplemented from \fBSoNode\fP\&. .SH "Member Data Documentation" .PP .SS "\fBSoSFVec3f\fP SoVRMLVisibilitySensor::center" Visibility area center\&. Default value is (0, 0, 0)\&. .SS "\fBSoSFVec3f\fP SoVRMLVisibilitySensor::size" Visibility area size\&. Default value is (0, 0, 0)\&. .SS "\fBSoSFBool\fP SoVRMLVisibilitySensor::enabled" Enable/disable sensor\&. Default value is TRUE\&. .SS "\fBSoSFTime\fP SoVRMLVisibilitySensor::enterTime" An event out that is triggered when the region becomes visible\&. .SS "\fBSoSFTime\fP SoVRMLVisibilitySensor::exitTime" An event out that is triggered when the region becomes not visible\&. .SS "\fBSoSFBool\fP SoVRMLVisibilitySensor::isActive" An event out that is generated when the visibility state changes\&. .SH "Author" .PP Generated automatically by Doxygen for Coin from the source code\&.