Package gaiasky.scenegraph.octreewrapper
Class AbstractOctreeWrapper
- java.lang.Object
-
- gaiasky.scenegraph.SceneGraphNode
-
- gaiasky.scenegraph.AbstractPositionEntity
-
- gaiasky.scenegraph.FadeNode
-
- gaiasky.scenegraph.octreewrapper.AbstractOctreeWrapper
-
- All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable,IStarContainer,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.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class gaiasky.scenegraph.SceneGraphNode
SceneGraphNode.RenderGroup, SceneGraphNode.TLV3, SceneGraphNode.TLV3D
-
-
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<AbstractPositionEntity,OctreeNode>parenthoodOctreeNoderootprotected java.util.List<SceneGraphNode>rouletteRoulette list with the objects to process-
Fields inherited from class gaiasky.scenegraph.FadeNode
catalogInfo, highlighted, hlc, hlcma, hlcmi, hlcmmax, hlcmmin, hlplain, inSceneGraph, labelcolor, labelPosition
-
Fields inherited from class gaiasky.scenegraph.AbstractPositionEntity
cc, coordinates, distToCamera, octant, octantId, pos, posSph, size, viewAngle, viewAngleApparent
-
Fields inherited from class gaiasky.scenegraph.SceneGraphNode
aux3d1, aux3d2, aux3d3, aux3d4, aux3f1, aux3f2, aux3f3, aux3f4, children, computed, ct, id, localTransform, namekey, names, numChildren, opacity, orientation, parent, parentkey, parentName, ROOT_NAME, sg, translation
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractOctreeWrapper()protectedAbstractOctreeWrapper(java.lang.String parentName, OctreeNode root)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidadd(AbstractPositionEntity child, OctreeNode octant)voidadd(java.util.List<AbstractPositionEntity> children, OctreeNode octant)voidaddToRenderLists(ICamera camera, OctreeNode octant)booleancontainsObject(AbstractPositionEntity 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)Highlight using a plain colorvoidhighlight(boolean hl, int cmi, IAttribute cma, double cmmin, double cmmax)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(AbstractPositionEntity child)voidupdate(ITimeFrameProvider time, Vector3d parentTransform, ICamera camera)voidupdate(ITimeFrameProvider time, Vector3d parentTransform, ICamera camera, float opacity)protected abstract voidupdateOctreeObjects(ITimeFrameProvider time, Vector3d 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, getHlcma, getHlcmi, getHlcmmax, getHlcmmin, isHighlighted, isHlplain, isVisible, setCataloginfo, setCatalogInfo, setCatalogInfoBare, setFadein, setFadeout, setLabelcolor, setLabelcolor, setLabelposition, setPosition, setPositionobjectname, setSize, setSize, setUp, setVisible, updateLocal, updateLocalValues
-
Methods inherited from class gaiasky.scenegraph.AbstractPositionEntity
computeFuturePosition, getAbsoluteOrientation, getAbsolutePosition, getAbsolutePosition, getAlpha, getDelta, getDistToCamera, getHeight, getHeight, getHeight, getHeightScale, getNext, getOctant, getPos, getPosition, getPosition, getPosSph, getPredictedPosition, getRadius, getSize, getViewAngle, getViewAngleApparent, isCopy, mustUpdatePosition, render2DLabel, render2DLabel, render2DLabel, render2DLabel, render3DLabel, setColor, setColor, setCoordinates
-
Methods inherited from class gaiasky.scenegraph.SceneGraphNode
add, add, addChild, addChild, addFocusableObjects, addName, addNodes, addToIndex, addToRender, getAggregatedChildren, getChildByName, getChildByNameAndType, getChildrenByType, getComponentType, getCt, getFirstStarAncestor, getId, getLineCopy, getName, getNames, getNode, getNode, getOpacity, getOrientation, getRoot, getSceneGraphDepth, getVelocity, hasName, hasName, insert, insert, isInRender, isInRender, isValidPosition, isVisibilityOn, mustAddToIndex, namesConcat, removeChild, removeFromIndex, removeFromRender, returnToPool, setComputedFlag, setCt, setCt, setId, setName, setNamekey, setNames, setParent, setParentkey, toString, updateNames, updateNamesRec
-
-
-
-
Field Detail
-
root
public OctreeNode root
-
roulette
protected java.util.List<SceneGraphNode> roulette
Roulette list with the objects to process
-
parenthood
public java.util.Map<AbstractPositionEntity,OctreeNode> parenthood
-
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.- Overrides:
initializein classSceneGraphNode
-
containsObject
public boolean containsObject(AbstractPositionEntity object)
-
add
public void add(java.util.List<AbstractPositionEntity> children, OctreeNode octant)
-
add
public void add(AbstractPositionEntity child, OctreeNode octant)
-
removeParenthood
public void removeParenthood(AbstractPositionEntity child)
-
update
public void update(ITimeFrameProvider time, Vector3d parentTransform, ICamera camera)
- Overrides:
updatein classSceneGraphNode
-
update
public void update(ITimeFrameProvider time, Vector3d parentTransform, ICamera camera, float opacity)
-
updateOctreeObjects
protected abstract void updateOctreeObjects(ITimeFrameProvider time, Vector3d parentTransform, ICamera camera)
Runs the update on all the observed and selected octree objects.- Parameters:
time-parentTransform-camera-
-
addToRenderLists
public void addToRenderLists(ICamera camera, OctreeNode octant)
-
iterator
public java.util.Iterator<OctreeNode> 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)Description copied from class:FadeNodeHighlight using a plain color
-
highlight
public void highlight(boolean hl, int cmi, IAttribute cma, double cmmin, double cmmax)Description copied from class:FadeNodeHighlight using a colormap
-
getSimpleCopy
public <T extends SceneGraphNode> T getSimpleCopy()
Gets a copy of this object but does not copy its parent or children- Overrides:
getSimpleCopyin classAbstractPositionEntity- Returns:
- The copied object
-
dispose
public void dispose()
- Specified by:
disposein interfacecom.badlogic.gdx.utils.Disposable- Overrides:
disposein classSceneGraphNode
-
-