Package gaiasky.scenegraph.octreewrapper
Class AbstractOctreeWrapper
java.lang.Object
gaiasky.scenegraph.SceneGraphNode
gaiasky.scenegraph.FadeNode
gaiasky.scenegraph.octreewrapper.AbstractOctreeWrapper
- All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable,IStarContainer,IVisibilitySwitch,IPosition,java.lang.Iterable<OctreeNode>
- Direct Known Subclasses:
OctreeWrapper
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 Summary
Fields Modifier and Type Field Description protected booleancopyIs this just a copy?protected intlastNumberObjectsThe number of objects added to render in the last framejava.util.Map<SceneGraphNode,OctreeNode>parenthoodOctreeNoderootprotected java.util.List<SceneGraphNode>rouletteRoulette list with the objects to processFields inherited from class gaiasky.scenegraph.FadeNode
catalogInfo, currentDistance, highlighted, hlallvisible, hlc, hlcma, hlcmi, hlcmmax, hlcmmin, hlplain, inSceneGraph, labelcolor, labelPositionFields inherited from class gaiasky.scenegraph.SceneGraphNode
aux3b1, aux3b2, aux3b3, aux3b4, aux3d1, aux3d2, aux3d3, aux3d4, aux3f1, aux3f2, aux3f3, aux3f4, cc, children, computed, coordinates, ct, distToCamera, id, lastStateChangeTimeMs, localTransform, namekey, names, numChildren, octant, octantId, opacity, orientation, parent, parentkey, parentName, pos, posSph, ROOT_NAME, sg, size, translation, viewAngle, viewAngleApparent, visible -
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractOctreeWrapper()protectedAbstractOctreeWrapper(java.lang.String parentName, OctreeNode root) -
Method Summary
Modifier and Type Method Description voidadd(SceneGraphNode child, OctreeNode octant)voidadd(java.util.List<SceneGraphNode> children, OctreeNode octant)voidaddToRenderLists(ICamera camera, OctreeNode octant)booleancontainsObject(SceneGraphNode object)voiddispose()<T extends SceneGraphNode>
TgetSimpleCopy()Gets a copy of this object but does not copy its parent or childrenintgetStarCount()voidhighlight(boolean hl, float[] color, boolean allVisible)Highlight using a plain colorvoidhighlight(boolean hl, int cmi, IAttribute cma, double cmmin, double cmmax, boolean allVisible)Highlight using a colormapvoidinitialize()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.java.util.Iterator<OctreeNode>iterator()voidremoveParenthood(SceneGraphNode child)voidupdateLocal(ITimeFrameProvider time, ICamera camera)Updates the transform matrix with the transformations that will apply to the children and the local transform matrix with the transformations that will apply only to this object.protected abstract voidupdateOctreeObjects(ITimeFrameProvider time, Vector3b parentTransform, ICamera camera)Runs the update on all the observed and selected octree objects.Methods inherited from class gaiasky.scenegraph.FadeNode
addToRenderLists, doneLoading, getBaseOpacity, getCatalogInfo, getFadeIn, getFadeOut, getHlcma, getHlcmi, getHlcmmax, getHlcmmin, isHighlighted, isHlAllVisible, isHlplain, setCataloginfo, setCatalogInfo, setCatalogInfoBare, setFadein, setFadeout, setLabelcolor, setLabelcolor, setLabelposition, setPosition, setPositionobjectname, setSize, setSize, setUp, update, updateLocalValues, updateOpacityMethods inherited from class gaiasky.scenegraph.SceneGraphNode
add, add, addChild, addChild, addFocusableObjects, addName, addNodes, addToIndex, addToRender, computeFuturePosition, getAbsoluteOrientation, getAbsolutePosition, getAbsolutePosition, getAggregatedChildren, getAlpha, getChildByName, getChildByNameAndType, getChildrenByComponentType, getChildrenByType, getColor, getComponentType, getCt, getDelta, getDescription, getDistToCamera, getFirstStarAncestor, getHeight, getHeight, getHeight, getHeightScale, getId, getLineCopy, getName, getNames, getNext, getNode, getNode, getOctant, getOpacity, getOrientation, getPos, getPosition, getPosition, getPosSph, getPredictedPosition, getRadius, getRoot, getSceneGraphDepth, getSize, getUnrotatedPos, getVelocity, getViewAngle, getViewAngleApparent, getVisibilityOpacityFactor, hasCt, hasName, hasName, insert, insert, isCopy, isInRender, isInRender, isValidPosition, isVisibilityOn, isVisible, isVisible, msSinceStateChange, mustAddToIndex, mustUpdatePosition, namesConcat, removeChild, removeFromIndex, removeFromRender, render2DLabel, render2DLabel, render2DLabel, render2DLabel, render3DLabel, render3DLabel, returnToPool, setColor, setColor, setComputedFlag, setCoordinates, setCt, setCt, setDescription, setId, setName, setNamekey, setNames, setParent, setParentkey, setVisible, shouldRender, toString, update, updateNames, updateNamesRecMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
root
-
roulette
Roulette list with the objects to process -
parenthood
-
lastNumberObjects
protected int lastNumberObjectsThe number of objects added to render in the last frame -
copy
protected boolean copyIs this just a copy?
-
-
Constructor Details
-
AbstractOctreeWrapper
protected AbstractOctreeWrapper() -
AbstractOctreeWrapper
-
-
Method Details
-
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.- Overrides:
initializein classSceneGraphNode
-
containsObject
-
add
-
add
-
removeParenthood
-
updateLocal
Description copied from class:SceneGraphNodeUpdates the transform matrix with the transformations that will apply to the children and the local transform matrix with the transformations that will apply only to this object.- Overrides:
updateLocalin classFadeNode
-
updateOctreeObjects
protected abstract void updateOctreeObjects(ITimeFrameProvider time, Vector3b parentTransform, ICamera camera)Runs the update on all the observed and selected octree objects.- Parameters:
time-parentTransform-camera-
-
addToRenderLists
-
iterator
- Specified by:
iteratorin interfacejava.lang.Iterable<OctreeNode>
-
getStarCount
public int getStarCount()- Specified by:
getStarCountin interfaceIStarContainer- Overrides:
getStarCountin classSceneGraphNode
-
highlight
public void highlight(boolean hl, float[] color, boolean allVisible)Description copied from class:FadeNodeHighlight using a plain color -
highlight
public void highlight(boolean hl, int cmi, IAttribute cma, double cmmin, double cmmax, boolean allVisible)Description copied from class:FadeNodeHighlight using a colormap -
getSimpleCopy
Gets a copy of this object but does not copy its parent or children- Overrides:
getSimpleCopyin classSceneGraphNode- Returns:
- The copied object
-
dispose
public void dispose()- Specified by:
disposein interfacecom.badlogic.gdx.utils.Disposable- Overrides:
disposein classSceneGraphNode
-