public class SoVRMLLOD extends SoVRMLParent
SoVRMLLOD
node allows applications to switch between various levels of detail or complexity for a given object, based on the distance from the user.
<font color="#0000FF">NOTE:</font> 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
.
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 SoVRMLLOD
node specifies various levels of detail or complexity for a given object, and provides hints for browsers to automatically choose the appropriate version of the object based on the distance from the user. 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. See the "Concepts - Grouping and Children Nodes" section for a details on the types of nodes that are legal values for level.
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.
Authors should set SoVRMLLOD
ranges so that the transitions from one level of detail to the next are smooth. Browsers may adjust which level of detail is displayed to maintain interactive frame rates, to display an already-fetched level of detail while a higher level of detail (contained in an Inline node) is fetched, or might disregard the author-specified ranges for any other implementation-dependent reason. For best results, specify ranges only where necessary, and nest SoVRMLLOD
nodes with and without ranges. Browsers should try to honor the hints given by authors, and authors should try to give browsers as much freedom as they can to choose levels of detail based on performance.
SoVRMLLOD
nodes are evaluated top-down in the scene graph. Only the descendants of the currently selected level are rendered and evaluated. Note that all nodes under an SoVRMLLOD
node continue to receive and send events regardless of which SoVRMLLOD
level
is active.
File format/default:
VRMLLOD {
level | [] // VRML97 only |
children | [] // X3D only |
center | 0 0 0 |
range | [] |
bboxCenter | 0 0 0 |
bboxSize | -1 -1 -1 |
metadata | NULL |
Action behavior:
SoGLRenderAction
, SoCallbackAction
, SoGetBoundingBoxAction
, SoRayPickAction
, SoSearchAction
, SoWriteAction
Deprecated since Open Inventor 9500
Inventor.ConstructorCommand
Modifier and Type | Field and Description |
---|---|
SoSFVec3f |
center
Deprecated.
Translation offset in the local coordinate system that specifies the center of the
SoVRMLLOD objects. |
SoMFNode |
level
Deprecated.
List of nodes that request the same object or objects at varying levels of detail from highest to lowest (VRML97).
|
SoMFFloat |
range
Deprecated.
Specifies the ideal distances at which to switch between the levels.
|
bboxCenter, bboxSize, children, metadata
boundingBoxIgnoring
VERBOSE_LEVEL, ZeroHandle
Constructor and Description |
---|
SoVRMLLOD()
Deprecated.
Constructor.
|
SoVRMLLOD(int nLevels)
Deprecated.
Constructor that takes approximate number of levels/children.
|
Modifier and Type | Method and Description |
---|---|
void |
addLevel(SoNode level1)
Deprecated.
Adds a level/child as last one in group.
|
int |
findLevel(SoNode level1)
Deprecated.
Finds index of given level/child within group.
|
SoNode |
getLevel(int index)
Deprecated.
Returns the nth level/child node.
|
int |
getNumLevels()
Deprecated.
Returns number of levels/children.
|
void |
insertLevel(SoNode level1,
int newLevelIndex)
Deprecated.
Adds a level/child so that it becomes the one with the given index.
|
void |
removeAllLevels()
Deprecated.
Removes all levels/children from group.
|
void |
removeLevel(int index)
Deprecated.
Removes level/child with given index from group.
|
void |
removeLevel(SoNode level1)
Deprecated.
Removes first instance of given level/child from group.
|
void |
replaceLevel(int index,
SoNode newLevel)
Deprecated.
Replaces level with given index with new level/child.
|
void |
replaceLevel(SoNode oldLevel,
SoNode newLevel)
Deprecated.
Replaces first instance of given level/child with new level/child.
|
addChild, findChild, getChild, getNumChildren, insertChild, removeAllChildren, removeChild, removeChild, replaceChild, replaceChild
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 SoMFFloat range
public final SoSFVec3f center
SoVRMLLOD
objects.public final SoMFNode level
SoVRMLParent
).
NOTE: The children field is a new field in SoVRMLLOD
added in Open Inventor 5.0. 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.
public SoVRMLLOD(int nLevels)
public SoVRMLLOD()
public void removeAllLevels()
public void replaceLevel(int index, SoNode newLevel)
public void addLevel(SoNode level1)
public int getNumLevels()
public int findLevel(SoNode level1)
public SoNode getLevel(int index)
public void removeLevel(int index)
public void insertLevel(SoNode level1, int newLevelIndex)
public void removeLevel(SoNode level1)
Generated on January 23, 2025, Copyright © Thermo Fisher Scientific. All rights reserved. http://www.openinventor.com