Class SoLevelOfDetail
- All Implemented Interfaces:
SafeDisposable
The size is computed as the area of the screen rectangle enclosing the projection of the 3D bounding box that encloses all of the children. When rendering, this size is compared to the values in the screenArea
field. If the size is greater than the first value, child 0 is traversed. If it is smaller than the first, but greater than the second, child 1 is traversed, and so on. If there are fewer children than are required by this rule, the last child is traversed. The screenArea
field contains just 0 by default, so the first child is always traversed.
The size calculation takes the current complexity into account. If the complexity is 0 or is of type BOUNDING_BOX, the last child is always traversed. If the complexity is less than .5, the computed size is scaled down appropriately to use (possibly) a less detailed representation. If the complexity is greater than .5, the size is scaled up. At complexity 1, the first child is always used.
Note that the SoLOD
node is similar to SoLevelOfDetail
, except the switching between levels in the SoLOD
node is based on distance from the camera, which is faster than using screen area.
File format/default:
LevelOfDetail {
screenArea | 0 |
Action behavior:
SoGLRenderAction
, SoRayPickAction
, SoCallbackAction
Only the child with the appropriate level of detail is traversed.
SoGetBoundingBoxAction
The box that encloses all children is computed. (This is the box that is needed to compute the projected size.)
Other actions
All implemented as for SoGroup
.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.openinventor.inventor.nodes.SoNode
SoNode.RenderModes
Nested classes/interfaces inherited from class com.openinventor.inventor.Inventor
Inventor.ConstructorCommand
-
Field Summary
FieldsFields inherited from class com.openinventor.inventor.nodes.SoGroup
boundingBoxIgnoring
Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a level-of-detail node with default settings.SoLevelOfDetail
(int nChildren) Constructor that takes approximate number of children. -
Method Summary
Methods inherited from class com.openinventor.inventor.nodes.SoGroup
addChild, findChild, getChild, getNumChildren, insertChild, removeAllChildren, removeChild, removeChild, replaceChild, replaceChild
Methods inherited from class com.openinventor.inventor.nodes.SoNode
affectsState, callback, copy, copy, distribute, doAction, getAlternateRep, getBoundingBox, getByName, getMatrix, getPrimitiveCount, getRenderEngineMode, getRenderUnitID, GLRender, GLRenderBelowPath, GLRenderInPath, GLRenderOffPath, grabEventsCleanup, grabEventsSetup, handleEvent, isBoundingBoxIgnoring, isOverride, pick, rayPick, search, setOverride, touch, write
Methods inherited from class com.openinventor.inventor.fields.SoFieldContainer
copyFieldValues, copyFieldValues, enableNotify, fieldsAreEqual, get, getAllFields, getEventIn, getEventOut, getField, getFieldName, hasDefaultValues, isNotifyEnabled, set, setToDefaults
Methods inherited from class com.openinventor.inventor.misc.SoBase
dispose, getName, isDisposable, isSynchronizable, setName, setSynchronizable
Methods inherited from class com.openinventor.inventor.Inventor
getNativeResourceHandle
-
Field Details
-
screenArea
Areas to use for comparison.
-
-
Constructor Details
-
SoLevelOfDetail
public SoLevelOfDetail()Creates a level-of-detail node with default settings. -
SoLevelOfDetail
public SoLevelOfDetail(int nChildren) Constructor that takes approximate number of children.
-