All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object | +----dnx.util.DNXObject | +----dnx.lr.Node | +----dnx.lr.GroupingNode | +----dnx.lr.SwitchingNode | +----dnx.lr.node.LODNode
LOD { exposedField MFNode level [] field SFVec3f center 0 0 0 field MFFloat range [] }
The LOD 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 LOD 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 LOD node, (including any scaling transformations), to the center point of the LOD. If the distance is less than the first value in the range field, then the first level of the LOD 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 LOD shall 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 LOD 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 LOD 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.
LOD nodes are evaluated top-down in the scene graph. Only the descendants of the currently selected level are rendered. Note that all nodes under an LOD node continue to receive and send events (i.e. routes) regardless of which LOD level is active. For example, if an active TimeSensor is contained within an inactive level of an LOD, the TimeSensor sends events regardless of the LOD's state.
public MFNode levelcenter
public SFVec3f centerrange
public MFFloat range
public LODNode()
protected void createNodeDefinition(NodeDefinition def)
protected void initFields()
public MFNode getChildren()
public synchronized int getSwitchedInNode(Camera cam, Matrix4 objectToViewerMatrix)mapTraversalPathNodeChildren
public boolean mapTraversalPathNodeChildren(ChildNodeMapper fun, Camera cam, Matrix4 objectToViewerMatrix, Object mapData)
public NodeInstance mapTraversalPathInstanceChildren(NodeInstance inst, ChildInstanceMapper fun, Camera cam, Matrix4 objectToViewerMatrix, Object mapData)
public void pushSubtreeProperties(SubtreePropertyTraversal traversal)
public NodeList getSubtreePropertyNodes(Camera cam, Matrix4 objectToViewerMatrix)
protected void updateSubtreePropertyNodes(MFNode children)
public void recomputeBoundingBox(BoundingBox3 box)
protected boolean boundingBoxHasChanged(Field f)
All Packages Class Hierarchy This Package Previous Next Index