Class AbstractOctreeWrapper

  • All Implemented Interfaces:
    com.badlogic.gdx.utils.Disposable, IStarContainer, IPosition, java.lang.Iterable<OctreeNode>
    Direct Known Subclasses:

    public abstract class AbstractOctreeWrapper
    extends FadeNode
    implements java.lang.Iterable<OctreeNode>
    Abstract Octree wrapper with the common parts of the regular Octree wrapper and the concurrent one.
    • Field Detail

      • roulette

        protected java.util.List<SceneGraphNode> roulette
        Roulette list with the objects to process
      • lastNumberObjects

        protected int lastNumberObjects
        The number of objects added to render in the last frame
      • copy

        protected boolean copy
        Is this just a copy?
    • Constructor Detail

      • AbstractOctreeWrapper

        protected AbstractOctreeWrapper()
      • AbstractOctreeWrapper

        protected AbstractOctreeWrapper​(java.lang.String parentName,
                                        OctreeNode root)
    • Method Detail

      • initialize

        public void initialize()
        An octree wrapper has as 'scene graph children' all the elements contained in the octree, even though it acts as a hub that decides which are processed and which are not.
        initialize in class SceneGraphNode
      • containsObject

        public boolean containsObject​(SceneGraphNode object)
      • removeParenthood

        public void removeParenthood​(SceneGraphNode child)
      • updateOctreeObjects

        protected abstract void updateOctreeObjects​(ITimeFrameProvider time,
                                                    Vector3d parentTransform,
                                                    ICamera camera)
        Runs the update on all the observed and selected octree objects.
        time -
        parentTransform -
        camera -
      • addToRenderLists

        public void addToRenderLists​(ICamera camera,
                                     OctreeNode octant)
      • iterator

        public java.util.Iterator<OctreeNode> iterator()
        Specified by:
        iterator in interface java.lang.Iterable<OctreeNode>
      • highlight

        public void highlight​(boolean hl,
                              float[] color)
        Description copied from class: FadeNode
        Highlight using a plain color
        highlight in class FadeNode
        hl - Whether to highlight
        color - The plain color
      • highlight

        public void highlight​(boolean hl,
                              int cmi,
                              IAttribute cma,
                              double cmmin,
                              double cmmax)
        Description copied from class: FadeNode
        Highlight using a colormap
        highlight in class FadeNode
        hl - Whether to highlight
        cmi - Color map index
        cma - Attribute
        cmmin - Min mapping value
        cmmax - Max mapping value
      • getSimpleCopy

        public <T extends SceneGraphNode> T getSimpleCopy()
        Gets a copy of this object but does not copy its parent or children
        getSimpleCopy in class SceneGraphNode
        The copied object
      • dispose

        public void dispose()
        Specified by:
        dispose in interface com.badlogic.gdx.utils.Disposable
        dispose in class SceneGraphNode