Public Member Functions
|LOD (Inst< MFChild > _addChildren=0, Inst< MFChild > _removeChildren=0, Inst< MFChild > _children=0, Inst< SFNode > _metadata=0, Inst< SFBound > _bound=0, Inst< SFInt32 > _level_changed=0, Inst< SFVec3f > _bboxCenter=0, Inst< SFVec3f > _bboxSize=0, Inst< SFVec3f > _center=0, Inst< SFBool > _forceTransitions=0, Inst< MFFloat > _range=0)|
|virtual void||render ()|
|Render the children. |
|virtual void||traverseSG (TraverseInfo &ti)|
|Traverse the scenegraph. |
|auto_ptr< SFInt32 >||level_changed|
|The LOD node generates a level_changed event with value i where the value of i identifies which level was activated for display. |
|auto_ptr< SFVec3f >||center|
|The center field is a translation offset in the local coordinate system that specifies the centre of the LOD node for distance calculations. |
|auto_ptr< SFBool >||forceTransitions|
|The forceTransitions field specifies whether browsers are allowed to disregard level distances in order to provide better performance. |
|auto_ptr< MFFloat >||range|
|The range field specifies the ideal distances at which to switch between the levels. |
Static Public Attributes
|The H3DNodeDatabase for this node. |
The children field contains a list of nodes that represent the same object or objects at varying levels of detail, ordered from highest level of detail to the lowest level of detail.
The range field specifies the ideal distances at which to switch between the levels. The forceTransitions field specifies whether browsers are allowed to disregard level distances in order to provide better performance. A forceTransitions value of TRUE specifies that every transition should be performed regardless of any internal optimizations that might be available. A forceTransitions value of FALSE specifies that browsers are allowed to disregard level distances in order to provide better performance.
The center field is a translation offset in the local coordinate system that specifies the centre of the LOD node for distance calculations.
The number of nodes in the children field shall exceed the number of values in the range field by one (i.e., N+1 children nodes for N range values). The range field contains monotonic increasing values that shall be greater than zero. In order to calculate which level to display, first the distance is calculated from the viewer's location, transformed into the local coordinate system of the LOD node (including any scaling transformations), to the center point of the LOD node. Then, the LOD node evaluates the step function L(d) to choose a level for a given value of d (where d is the distance from the viewer position to the centre of the LOD node).
|void LOD::traverseSG||(||TraverseInfo &||ti||)||
Traverse the scenegraph.
Calculates distance to viewer and decides which level in the LOD should be used for rendering.
|ti||The TraverseInfo object containing information about the traversal.|
Reimplemented from H3D::MatrixTransform.
References H3D::X3DViewpointNode::accForwardMatrix, center, H3D::X3DGroupingNode::children, forceTransitions, H3D::TraverseInfo::getAccInverseMatrix(), H3D::X3DViewpointNode::getActive(), range, and H3D::X3DViewpointNode::totalPosition.
The range field specifies the ideal distances at which to switch between the levels.
Each value in the range field shall be greater than the previous value.
Referenced by traverseSG().