Package gaiasky.scenegraph
Class RecursiveGrid
- java.lang.Object
-
- gaiasky.scenegraph.SceneGraphNode
-
- gaiasky.scenegraph.FadeNode
-
- gaiasky.scenegraph.RecursiveGrid
-
- All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable
,IObserver
,I3DTextRenderable
,ILineRenderable
,IModelRenderable
,IRenderable
,IStarContainer
,IPosition
public class RecursiveGrid extends FadeNode implements IModelRenderable, I3DTextRenderable, ILineRenderable, IObserver
A recursive grid which adapts to equatorial, ecliptic and galactic systems.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class gaiasky.scenegraph.SceneGraphNode
SceneGraphNode.TLV3, SceneGraphNode.TLV3D
-
-
Field Summary
Fields Modifier and Type Field Description ModelComponent
mc
protected java.lang.String
transformName
-
Fields inherited from class gaiasky.scenegraph.FadeNode
catalogInfo, currentDistance, highlighted, hlc, hlcma, hlcmi, hlcmmax, hlcmmin, hlplain, inSceneGraph, labelcolor, labelPosition
-
Fields inherited from class gaiasky.scenegraph.SceneGraphNode
aux3d1, aux3d2, aux3d3, aux3d4, aux3f1, aux3f2, aux3f3, aux3f4, children, computed, coordinates, copy, ct, distToCamera, id, localTransform, namekey, names, numChildren, octant, octantId, opacity, orientation, parent, parentkey, parentName, pos, posSph, ROOT_NAME, sg, size, translation, viewAngle, viewAngleApparent
-
-
Constructor Summary
Constructors Constructor Description RecursiveGrid()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addToRenderLists(ICamera camera)
Adds this entity to the necessary render lists after the distance to the camera and the view angle have been determined.void
doneLoading(com.badlogic.gdx.assets.AssetManager manager)
int
getGlPrimitive()
float
getLineWidth()
float
getTextOpacity()
Gets the text opacityboolean
hasAtmosphere()
void
initialize()
boolean
isLabel()
Is it a label or another kind of text?void
notify(Events event, java.lang.Object... data)
void
render(LineRenderSystem renderer, ICamera camera, float alpha)
Line rendering.void
render(ExtSpriteBatch batch, ExtShaderProgram shader, FontRenderSystem sys, RenderingContext rc, ICamera camera)
Label rendering.void
render(IntModelBatch modelBatch, float alpha, double t, RenderingContext rc)
Model rendering.boolean
renderText()
Tells whether the text must be rendered or not for this entityvoid
setLabel(java.lang.Boolean label)
void
setModel(ModelComponent mc)
void
setRendergroup(java.lang.String rg)
void
setSize(java.lang.Double size)
Sets the absolute size (diameter) of this entityvoid
setSize(java.lang.Long size)
Sets the absolute size (diameter) of this entityvoid
setTransformName(java.lang.String transformName)
java.lang.String
text()
Returns the textfloat[]
textColour()
Returns an array with the text colour in the fashion [r, g, b, a]void
textDepthBuffer()
Executes the blending for the textvoid
textPosition(ICamera cam, Vector3d out)
Sets the position of this text in the out vectorfloat
textScale()
Returns the text scale for the scale varying in the shaderfloat
textSize()
Returns the text sizevoid
update(ITimeFrameProvider time, Vector3d parentTransform, ICamera camera, float opacity)
-
Methods inherited from class gaiasky.scenegraph.FadeNode
getBaseOpacity, getCatalogInfo, getHlcma, getHlcmi, getHlcmmax, getHlcmmin, highlight, highlight, isHighlighted, isHlplain, isVisible, setCataloginfo, setCatalogInfo, setCatalogInfoBare, setFadein, setFadeout, setLabelcolor, setLabelcolor, setLabelposition, setPosition, setPositionobjectname, setUp, setVisible, updateLocal, updateLocalValues, updateOpacity
-
Methods inherited from class gaiasky.scenegraph.SceneGraphNode
add, add, addChild, addChild, addFocusableObjects, addName, addNodes, addToIndex, addToRender, computeFuturePosition, dispose, getAbsoluteOrientation, getAbsolutePosition, getAbsolutePosition, getAggregatedChildren, getAlpha, getChildByName, getChildByNameAndType, getChildrenByType, getComponentType, getCt, getDelta, getDistToCamera, getFirstStarAncestor, getHeight, getHeight, getHeight, getHeightScale, getId, getLineCopy, getName, getNames, getNext, getNode, getNode, getOctant, getOpacity, getOrientation, getPos, getPosition, getPosition, getPosSph, getPredictedPosition, getRadius, getRoot, getSceneGraphDepth, getSimpleCopy, getSize, getStarCount, getUnrotatedPos, getVelocity, getViewAngle, getViewAngleApparent, hasName, hasName, insert, insert, isCopy, isInRender, isInRender, isValidPosition, isVisibilityOn, mustAddToIndex, mustUpdatePosition, namesConcat, removeChild, removeFromIndex, removeFromRender, render2DLabel, render2DLabel, render2DLabel, render2DLabel, render3DLabel, render3DLabel, returnToPool, setColor, setColor, setComputedFlag, setCoordinates, setCt, setCt, setId, setName, setNamekey, setNames, setParent, setParentkey, toString, update, updateNames, updateNamesRec
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface gaiasky.render.IRenderable
getComponentType, getDistToCamera, getOpacity
-
-
-
-
Field Detail
-
transformName
protected java.lang.String transformName
-
mc
public ModelComponent mc
-
-
Method Detail
-
initialize
public void initialize()
- Overrides:
initialize
in classSceneGraphNode
-
doneLoading
public void doneLoading(com.badlogic.gdx.assets.AssetManager manager)
- Overrides:
doneLoading
in classFadeNode
-
addToRenderLists
protected void addToRenderLists(ICamera camera)
Description copied from class:SceneGraphNode
Adds this entity to the necessary render lists after the distance to the camera and the view angle have been determined.- Overrides:
addToRenderLists
in classFadeNode
-
update
public void update(ITimeFrameProvider time, Vector3d parentTransform, ICamera camera, float opacity)
-
render
public void render(IntModelBatch modelBatch, float alpha, double t, RenderingContext rc)
Model rendering.- Specified by:
render
in interfaceIModelRenderable
-
render
public void render(ExtSpriteBatch batch, ExtShaderProgram shader, FontRenderSystem sys, RenderingContext rc, ICamera camera)
Label rendering.- Specified by:
render
in interfaceI3DTextRenderable
- Parameters:
batch
- The sprite batchshader
- The shadersys
- The font render systemrc
- The render contextcamera
- The camera
-
render
public void render(LineRenderSystem renderer, ICamera camera, float alpha)
Line rendering.- Specified by:
render
in interfaceILineRenderable
- Parameters:
renderer
- The line renderer.camera
- The camera.alpha
- The alpha opacity.
-
setTransformName
public void setTransformName(java.lang.String transformName)
-
hasAtmosphere
public boolean hasAtmosphere()
- Specified by:
hasAtmosphere
in interfaceIModelRenderable
-
setModel
public void setModel(ModelComponent mc)
-
setLabel
public void setLabel(java.lang.Boolean label)
-
renderText
public boolean renderText()
Description copied from interface:I3DTextRenderable
Tells whether the text must be rendered or not for this entity- Specified by:
renderText
in interfaceI3DTextRenderable
- Returns:
- True if text must be rendered
-
textColour
public float[] textColour()
Description copied from interface:I3DTextRenderable
Returns an array with the text colour in the fashion [r, g, b, a]- Specified by:
textColour
in interfaceI3DTextRenderable
- Returns:
- Array with the colour
-
textSize
public float textSize()
Description copied from interface:I3DTextRenderable
Returns the text size- Specified by:
textSize
in interfaceI3DTextRenderable
- Returns:
- The text size
-
textScale
public float textScale()
Description copied from interface:I3DTextRenderable
Returns the text scale for the scale varying in the shader- Specified by:
textScale
in interfaceI3DTextRenderable
- Returns:
- The scale
-
textPosition
public void textPosition(ICamera cam, Vector3d out)
Description copied from interface:I3DTextRenderable
Sets the position of this text in the out vector- Specified by:
textPosition
in interfaceI3DTextRenderable
out
- The out parameter with the result
-
text
public java.lang.String text()
Description copied from interface:I3DTextRenderable
Returns the text- Specified by:
text
in interfaceI3DTextRenderable
- Returns:
- The text
-
textDepthBuffer
public void textDepthBuffer()
Description copied from interface:I3DTextRenderable
Executes the blending for the text- Specified by:
textDepthBuffer
in interfaceI3DTextRenderable
-
isLabel
public boolean isLabel()
Description copied from interface:I3DTextRenderable
Is it a label or another kind of text?- Specified by:
isLabel
in interfaceI3DTextRenderable
- Returns:
- Whether this is a label
-
getTextOpacity
public float getTextOpacity()
Description copied from interface:I3DTextRenderable
Gets the text opacity- Specified by:
getTextOpacity
in interfaceI3DTextRenderable
- Returns:
- Text opacity
-
setRendergroup
public void setRendergroup(java.lang.String rg)
-
setSize
public void setSize(java.lang.Double size)
Description copied from class:SceneGraphNode
Sets the absolute size (diameter) of this entity
-
setSize
public void setSize(java.lang.Long size)
Description copied from class:SceneGraphNode
Sets the absolute size (diameter) of this entity
-
notify
public void notify(Events event, java.lang.Object... data)
-
getLineWidth
public float getLineWidth()
- Specified by:
getLineWidth
in interfaceILineRenderable
-
getGlPrimitive
public int getGlPrimitive()
- Specified by:
getGlPrimitive
in interfaceILineRenderable
-
-