SoVRMLLOD Class Reference
[VRML97 nodes]

VSG extension Distance-based level-of-detail switching group node. More...

#include <Inventor/VRMLnodes/SoVRMLLOD.h>

Inheritance diagram for SoVRMLLOD:
SoVRMLParent SoGroup SoNode SoFieldContainer SoBase SoRefCounter SoTypedObject

List of all members.

Public Member Functions

virtual SoType getTypeId () const
 SoVRMLLOD (int nLevels)
virtual SbBool affectsState () const
void addLevel (SoNode *level1)
void insertLevel (SoNode *level1, int newLevelIndex)
SoNodegetLevel (int index) const
int findLevel (const SoNode *level1) const
int getNumLevels () const
void removeLevel (int index)
void removeLevel (SoNode *level1)
void removeAllLevels ()
void replaceLevel (int index, SoNode *newLevel)
void replaceLevel (SoNode *oldLevel, SoNode *newLevel)

Static Public Member Functions

static SoType getClassTypeId ()

Public Attributes

SoMFFloat range
SoSFVec3f center
SoMFNode level

Detailed Description

VSG extension Distance-based level-of-detail switching group node.

The SoVRMLLOD node allows applications to switch between various levels of detail or complexity for a given object, based on the distance from the user.

NOTE: This class does not exist in Open Inventor 10.0 and later.

NOTE: This node contains three fields inherited from SoVRMLParent that are new in Open Inventor 5.0. These fields are children (replaces the level field for X3D), bboxCenter, and bboxSize. If you specify a non-default value for this field, when this node is written to an Inventor file, the file will contain this new field. Older versions of Open Inventor will not be able to read this file and will generate an Inventor read error (unknown field).
NOTE 2: This field is not compatible with VRML97. If you specify a non-default value for this field, when this node is written to a VRML file, the file will contain this incompatible field and standard VRML97 file readers will not be able to read it.

The level field contains a list of nodes that represent the same object or objects at varying levels of detail, from highest to the lowest level of detail, and the range field specifies the ideal distances at which to switch between the levels.

The center field is a translation offset in the local coordinate system that specifies the center of the SoVRMLLOD object for distance calculations. In order to calculate which level to display, first the distance is calculated from the viewpoint, transformed into the local coordinate space of the SoVRMLLOD node, (including any scaling transformations), to the center point of the SoVRMLLOD. If the distance is less than the first value in the range field, then the first level of the SoVRMLLOD is drawn. If between the first and second values in the range field, the second level is drawn, and so on.

If there are N values in the range field, the SoVRMLLOD must have N+1 nodes in its level field. Specifying too few levels will result in the last level being used repeatedly for the lowest levels of detail; if more levels than ranges are specified, the extra levels will be ignored. The exception to this rule is to leave the range field empty, which is a hint to the browser that it should choose a level automatically to maintain a constant display rate. Each value in the range field should be greater than the previous value; otherwise results are undefined.

Note that the selection of which child to render depends on the current camera settings, so generally this node should not be render cached. SoVRMLLOD nodes prohibit auto-caching, so that no SoSeparator (or other render caching node) above an SoVRMLLOD in the scene graph will automatically create a render cache. This can significantly affect performance and applications should try to keep nodes that can be render cached (especially geometry nodes) under a different SoSeparator.





Open Inventor Toolkit reference manual, generated on 1 Nov 2022
Copyright © Thermo Fisher Scientific All rights reserved.