Interface LOD

  • All Superinterfaces:
    X3DBoundedObject, X3DChildNode, X3DGroupingNode, X3DNode
    All Known Implementing Classes:
    LODObject

    public interface LOD
    extends X3DGroupingNode
    Abstract node interface, defined by X3D Java Scene Access Interface (SAI) Specification to support X3D Java interoperability.

    X3D node tooltip: [X3DGroupingNode] LOD (Level Of Detail) uses camera-to-object distance to switch among contained child levels. (Contained nodes are now called 'children' rather than 'level', for consistent naming among all GroupingNodeType nodes.) LOD range values go from near to far (as child geometry gets simpler for better performance). For n range values, you must have n+1 children levels! Only currently selected children level is rendered, but all levels continue to send/receive events.
    • Hint: can add <WorldInfo info='null node'/> as a nonrendering, invisible final (or initial or intermediate) child node that also documents the LOD switch-over rationale.
    • Hint: insert a Shape node before adding geometry or Appearance.
    • Hint: GeoViewpoint OrthoViewpoint and Viewpoint share the same binding stack, so no more than one of these nodes can be bound and active at a given time.
    • Warning: do not include GeoViewpoint OrthoViewpoint or Viewpoint as a child of LOD or Switch, instead use ViewpointGroup as parent to constrain location proximity where the viewpoint is available to user.
    • Warning: results are undefined if a bindable node (Background, Fog, NavigationInfo, OrthoViewpoint, TextureBackground, Viewpoint) is a contained descendant node of either LOD or Switch.
    • Hint: security mechanisms such as encryption and authentication can be applied to high levels of detail, allowing authors to protect intellectual property at high resolution for authorized users while still rendering simple unrestricted models for other users.
    • Warning: nested LOD (and/or GeoLOD) nodes with overlapping range intervals can lead to unexpected or undefined behavior.
    • Hint: contained nodes must have type X3DChildNode, such as Group or Transform or Shape.
    • Warning: LOD is not allowed as a direct parent of Appearance, Material, Color, Coordinate, Normal or Texture nodes, instead ensure that a Shape is present.
    • Hint: apply containerField='shape' if parent node is CADFace.
    • Hint: ConformanceNist X3D Examples Archive http://2014.web3d.org/x3d/content/examples/ConformanceNist/SpecialGroups/LOD

    Package hint: This interface is defined by the X3D Java Language Binding Specification for the Scene Authoring Interface (SAI).
    See Also:
    SAI Java Specification: TODO, X3D Abstract Specification: LOD, X3D Tooltips: LOD, X3D Scene Authoring Hints
    • Method Summary

      Modifier and Type Method Description
      void addChildren​(X3DNode[] newValue)
      Add array of children nodes to array of existing nodes (if any).
      float[] getBboxCenter()
      Provide array of 3-tuple float results from initializeOnly SFVec3f field named bboxCenter.
      float[] getBboxSize()
      Provide array of 3-tuple float results within allowed range of [0,infinity), or default value [-1 -1 -1], from initializeOnly SFVec3f field named bboxSize.
      float[] getCenter()
      Provide array of 3-tuple float results from initializeOnly SFVec3f field named center.
      X3DNode[] getChildren()
      Provide array of X3DNode results (using an array consisting of properly typed nodes or ProtoInstanceObjects) from inputOutput MFNode field children.
      boolean getForceTransitions()
      Provide boolean value from initializeOnly SFBool field named forceTransitions.
      int getLevel()
      Provide int value within allowed range of [0,infinity) from outputOnly SFInt32 field named level_changed.
      X3DMetadataObject getMetadata()
      Provide X3DMetadataObject instance (using a properly typed node) from inputOutput SFNode field metadata.
      float[] getRange()
      Provide array of float results from initializeOnly MFFloat field named range.
      LOD setBboxCenter​(float[] newValue)
      Accessor method to assign 3-tuple float array to initializeOnly SFVec3f field named bboxCenter.
      LOD setBboxSize​(float[] newValue)
      Accessor method to assign 3-tuple float array to initializeOnly SFVec3f field named bboxSize.
      LOD setCenter​(float[] newValue)
      Accessor method to assign 3-tuple float array to initializeOnly SFVec3f field named center.
      void setChildren​(X3DNode newValue)
      Set single children node, replacing prior array of existing nodes (if any).
      LOD setChildren​(X3DNode[] newValue)
      Accessor method to assign X3DNode array (using an array consisting of properly typed nodes or ProtoInstanceObjects) to inputOutput MFNode field children.
      LOD setForceTransitions​(boolean newValue)
      Accessor method to assign boolean value to initializeOnly SFBool field named forceTransitions.
      LOD setMetadata​(X3DMetadataObject newValue)
      Accessor method to assign X3DMetadataObject instance (using a properly typed node) to inputOutput SFNode field metadata.
      LOD setRange​(float[] newValue)
      Accessor method to assign float array to initializeOnly MFFloat field named range.
    • Method Detail

      • setBboxCenter

        LOD setBboxCenter​(float[] newValue)
        Accessor method to assign 3-tuple float array to initializeOnly SFVec3f field named bboxCenter.

        Tooltip: Bounding box center accompanies bboxSize and provides an optional hint for bounding box position offset from origin of local coordinate system.
        Specified by:
        setBboxCenter in interface X3DBoundedObject
        Specified by:
        setBboxCenter in interface X3DGroupingNode
        Parameters:
        newValue - is new value for the bboxCenter field.
        Returns:
        LOD - namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
      • getBboxSize

        float[] getBboxSize()
        Provide array of 3-tuple float results within allowed range of [0,infinity), or default value [-1 -1 -1], from initializeOnly SFVec3f field named bboxSize.

        Tooltip: Bounding box size is usually omitted, and can easily be calculated automatically by an X3D player at scene-loading time with minimal computational cost. Bounding box size can also be defined as an optional authoring hint that suggests an optimization or constraint.
        Specified by:
        getBboxSize in interface X3DBoundedObject
        Specified by:
        getBboxSize in interface X3DGroupingNode
        Returns:
        value of bboxSize field
      • setBboxSize

        LOD setBboxSize​(float[] newValue)
        Accessor method to assign 3-tuple float array to initializeOnly SFVec3f field named bboxSize.

        Tooltip: Bounding box size is usually omitted, and can easily be calculated automatically by an X3D player at scene-loading time with minimal computational cost. Bounding box size can also be defined as an optional authoring hint that suggests an optimization or constraint.
        Specified by:
        setBboxSize in interface X3DBoundedObject
        Specified by:
        setBboxSize in interface X3DGroupingNode
        Parameters:
        newValue - is new value for the bboxSize field.
        Returns:
        LOD - namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
      • getCenter

        float[] getCenter()
        Provide array of 3-tuple float results from initializeOnly SFVec3f field named center.

        Tooltip: Viewpoint distance-measurement offset from origin of local coordinate system, used for LOD node distance calculations. *
        Returns:
        value of center field
      • setCenter

        LOD setCenter​(float[] newValue)
        Accessor method to assign 3-tuple float array to initializeOnly SFVec3f field named center.

        Tooltip: Viewpoint distance-measurement offset from origin of local coordinate system, used for LOD node distance calculations. *
        Parameters:
        newValue - is new value for the center field.
        Returns:
        LOD - namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
      • getChildren

        X3DNode[] getChildren()
        Provide array of X3DNode results (using an array consisting of properly typed nodes or ProtoInstanceObjects) from inputOutput MFNode field children.

        Tooltip: [X3DChildNode] Grouping nodes contain an ordered list of children nodes.
        • Hint: Each grouping node defines a coordinate space for its children, relative to the coordinate space of its parent node. Thus transformations accumulate down the scene graph hierarchy.
        • Hint: inputOnly MFNode addChildren field can append new X3DChildNode nodes via a ROUTE connection, duplicate input nodes (i.e. matching DEF, USE values) are ignored.
        • Hint: inputOnly MFNode removeChildren field can remove nodes from the children list, unrecognized input nodes (i.e. nonmatching DEF, USE values) are ignored.
        • Hint: X3D Architecture 10.2.1 Grouping and children node types, http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/group.html#GroupingAndChildrenNodes


        Warning: according to X3D Unified Object Model (X3DUOM), acceptable node types are limited to X3DChildNode.
        Specified by:
        getChildren in interface X3DGroupingNode
        Returns:
        value of children field
        See Also:
        X3DChildNode
      • setChildren

        LOD setChildren​(X3DNode[] newValue)
        Accessor method to assign X3DNode array (using an array consisting of properly typed nodes or ProtoInstanceObjects) to inputOutput MFNode field children.

        Tooltip: [X3DChildNode] Grouping nodes contain an ordered list of children nodes.
        • Hint: Each grouping node defines a coordinate space for its children, relative to the coordinate space of its parent node. Thus transformations accumulate down the scene graph hierarchy.
        • Hint: inputOnly MFNode addChildren field can append new X3DChildNode nodes via a ROUTE connection, duplicate input nodes (i.e. matching DEF, USE values) are ignored.
        • Hint: inputOnly MFNode removeChildren field can remove nodes from the children list, unrecognized input nodes (i.e. nonmatching DEF, USE values) are ignored.
        • Hint: X3D Architecture 10.2.1 Grouping and children node types, http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/group.html#GroupingAndChildrenNodes


        Note: according to X3D Unified Object Model (X3DUOM), acceptable node types are limited to X3DChildNode.
        Specified by:
        setChildren in interface X3DGroupingNode
        Parameters:
        newValue - is new value for the children field.
        Returns:
        LOD - namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
      • addChildren

        void addChildren​(X3DNode[] newValue)
        Add array of children nodes to array of existing nodes (if any).

        Note: according to X3D Unified Object Model (X3DUOM), acceptable node types are limited to X3DChildNode.
        Specified by:
        addChildren in interface X3DGroupingNode
        Parameters:
        newValue - is new value array to be appended the children field.
      • setChildren

        void setChildren​(X3DNode newValue)
        Set single children node, replacing prior array of existing nodes (if any).
        Specified by:
        setChildren in interface X3DGroupingNode
        Parameters:
        newValue - is new node for the children field
      • getForceTransitions

        boolean getForceTransitions()
        Provide boolean value from initializeOnly SFBool field named forceTransitions.

        Tooltip: Whether to perform every range-based transition, regardless of browser optimizations that might otherwise occur. *
        Returns:
        value of forceTransitions field
      • setForceTransitions

        LOD setForceTransitions​(boolean newValue)
        Accessor method to assign boolean value to initializeOnly SFBool field named forceTransitions.

        Tooltip: Whether to perform every range-based transition, regardless of browser optimizations that might otherwise occur. *
        Parameters:
        newValue - is new value for the forceTransitions field.
        Returns:
        LOD - namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
      • getLevel

        int getLevel()
        Provide int value within allowed range of [0,infinity) from outputOnly SFInt32 field named level_changed.

        Tooltip: Output event that reports current level of LOD children whenever switching occurs.
        • Hint: LOD level index counting starts at zero. Thus level_changed value of -1 means no choice, 0 means initial child, 1 means second child, etc.
        • Warning: it is an error to define this transient outputOnly field in an X3D file, instead only use it a source for ROUTE events.
        Returns:
        value of level_changed field
      • getRange

        float[] getRange()
        Provide array of float results from initializeOnly MFFloat field named range.

        Tooltip: (0,+infinity) Specifies ideal distances at which to switch between levels. The range field is a floating-point array of camera-to-object distance transitions for each child level, where range values go from near to far. For n range values, you must have n+1 child levels!
        • Hint: can add <WorldInfo info='null node'/> as a nonrendering, invisible final (or initial or intermediate) child node that also documents the LOD switch-over rationale.
        • Hint: not setting range values indicates that level switching can be optimized automatically based on performance.
        Returns:
        value of range field
      • setRange

        LOD setRange​(float[] newValue)
        Accessor method to assign float array to initializeOnly MFFloat field named range.

        Tooltip: (0,+infinity) Specifies ideal distances at which to switch between levels. The range field is a floating-point array of camera-to-object distance transitions for each child level, where range values go from near to far. For n range values, you must have n+1 child levels!
        • Hint: can add <WorldInfo info='null node'/> as a nonrendering, invisible final (or initial or intermediate) child node that also documents the LOD switch-over rationale.
        • Hint: not setting range values indicates that level switching can be optimized automatically based on performance.
        Parameters:
        newValue - is new value for the range field.
        Returns:
        LOD - namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).