Package gaiasky.scenegraph
Class FadeNode
- java.lang.Object
-
- gaiasky.scenegraph.SceneGraphNode
-
- gaiasky.scenegraph.FadeNode
-
- All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable
,IStarContainer
,IPosition
- Direct Known Subclasses:
AbstractOctreeWrapper
,BackgroundModel
,Constellation
,GenericCatalog
,MeshObject
,ParticleGroup
,RecursiveGrid
,Text2D
public class FadeNode extends SceneGraphNode
Node that offers fade-in and fade-out capabilities.
-
-
Field Summary
Fields Modifier and Type Field Description protected CatalogInfo
catalogInfo
Information on the catalog this fade node represents (particle group, octree, etc.)protected double
currentDistance
The current distance at each cycle, in internal unitsprotected boolean
highlighted
Is it highlighted?protected float[]
hlc
protected IAttribute
hlcma
protected int
hlcmi
protected double
hlcmmax
protected double
hlcmmin
protected boolean
hlplain
boolean
inSceneGraph
Is the node already in the scene graph?protected float[]
labelcolor
Colour of labelprotected Vector3d
labelPosition
Position of label-
Fields inherited from class gaiasky.scenegraph.SceneGraphNode
aux3d1, aux3d2, aux3d3, aux3d4, aux3f1, aux3f2, aux3f3, aux3f4, cc, 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 FadeNode()
FadeNode(java.lang.String name, SceneGraphNode parent)
-
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)
protected float
getBaseOpacity()
CatalogInfo
getCatalogInfo()
IAttribute
getHlcma()
int
getHlcmi()
double
getHlcmmax()
double
getHlcmmin()
void
highlight(boolean hl, float[] color)
Highlight using a plain colorvoid
highlight(boolean hl, int cmi, IAttribute cma, double cmmin, double cmmax)
Highlight using a colormapboolean
isHighlighted()
boolean
isHlplain()
boolean
isVisible()
void
setCataloginfo(java.util.Map<java.lang.String,java.lang.String> map)
void
setCatalogInfo(CatalogInfo info)
void
setCatalogInfoBare(CatalogInfo info)
void
setFadein(double[] fadein)
void
setFadeout(double[] fadeout)
void
setLabelcolor(double[] labelcolor)
Sets the label colorvoid
setLabelcolor(float[] labelcolor)
void
setLabelposition(double[] labelposition)
Sets the position of the label, in parsecs and in the internal reference framevoid
setPosition(double[] pos)
void
setPositionobjectname(java.lang.String po)
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
setUp()
void
setVisible(boolean visible)
void
update(ITimeFrameProvider time, Vector3d parentTransform, ICamera camera, float opacity)
void
updateLocal(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.void
updateLocalValues(ITimeFrameProvider time, ICamera camera)
This function updates all the local values before the localTransform is updated.protected void
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, initialize, 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
-
-
-
-
Field Detail
-
labelPosition
protected Vector3d labelPosition
Position of label
-
labelcolor
protected float[] labelcolor
Colour of label
-
currentDistance
protected double currentDistance
The current distance at each cycle, in internal units
-
inSceneGraph
public boolean inSceneGraph
Is the node already in the scene graph?
-
catalogInfo
protected CatalogInfo catalogInfo
Information on the catalog this fade node represents (particle group, octree, etc.)
-
highlighted
protected boolean highlighted
Is it highlighted?
-
hlplain
protected boolean hlplain
-
hlc
protected float[] hlc
-
hlcmi
protected int hlcmi
-
hlcma
protected IAttribute hlcma
-
hlcmmin
protected double hlcmmin
-
hlcmmax
protected double hlcmmax
-
-
Constructor Detail
-
FadeNode
public FadeNode()
-
FadeNode
public FadeNode(java.lang.String name, SceneGraphNode parent)
-
-
Method Detail
-
doneLoading
public void doneLoading(com.badlogic.gdx.assets.AssetManager manager)
- Overrides:
doneLoading
in classSceneGraphNode
-
update
public void update(ITimeFrameProvider time, Vector3d parentTransform, ICamera camera, float opacity)
- Overrides:
update
in classSceneGraphNode
-
updateLocal
public void updateLocal(ITimeFrameProvider time, ICamera camera)
Description copied from class:SceneGraphNode
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.- Overrides:
updateLocal
in classSceneGraphNode
-
updateOpacity
protected void updateOpacity()
-
getBaseOpacity
protected float getBaseOpacity()
-
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 classSceneGraphNode
-
updateLocalValues
public void updateLocalValues(ITimeFrameProvider time, ICamera camera)
Description copied from class:SceneGraphNode
This function updates all the local values before the localTransform is updated. Position, rotations and scale must be updated in here.- Overrides:
updateLocalValues
in classSceneGraphNode
-
setFadein
public void setFadein(double[] fadein)
-
setFadeout
public void setFadeout(double[] fadeout)
-
setPosition
public void setPosition(double[] pos)
-
setLabelposition
public void setLabelposition(double[] labelposition)
Sets the position of the label, in parsecs and in the internal reference frame- Parameters:
labelposition
-
-
setLabelcolor
public void setLabelcolor(double[] labelcolor)
Sets the label color- Overrides:
setLabelcolor
in classSceneGraphNode
- Parameters:
labelcolor
-
-
setLabelcolor
public void setLabelcolor(float[] labelcolor)
- Overrides:
setLabelcolor
in classSceneGraphNode
-
setPositionobjectname
public void setPositionobjectname(java.lang.String po)
-
setVisible
public void setVisible(boolean visible)
-
isVisible
public boolean isVisible()
-
setCatalogInfoBare
public void setCatalogInfoBare(CatalogInfo info)
-
setCatalogInfo
public void setCatalogInfo(CatalogInfo info)
-
getCatalogInfo
public CatalogInfo getCatalogInfo()
-
setCataloginfo
public void setCataloginfo(java.util.Map<java.lang.String,java.lang.String> map)
-
highlight
public void highlight(boolean hl, float[] color)
Highlight using a plain color- Parameters:
hl
- Whether to highlightcolor
- The plain color
-
highlight
public void highlight(boolean hl, int cmi, IAttribute cma, double cmmin, double cmmax)
Highlight using a colormap- Parameters:
hl
- Whether to highlightcmi
- Color map indexcma
- Attributecmmin
- Min mapping valuecmmax
- Max mapping value
-
isHighlighted
public boolean isHighlighted()
-
setUp
public void setUp()
- Overrides:
setUp
in classSceneGraphNode
-
setSize
public void setSize(java.lang.Long size)
Description copied from class:SceneGraphNode
Sets the absolute size (diameter) of this entity- Overrides:
setSize
in classSceneGraphNode
- Parameters:
size
- The diameter in internal units
-
setSize
public void setSize(java.lang.Double size)
Description copied from class:SceneGraphNode
Sets the absolute size (diameter) of this entity- Overrides:
setSize
in classSceneGraphNode
- Parameters:
size
- The diameter in internal units
-
isHlplain
public boolean isHlplain()
-
getHlcmi
public int getHlcmi()
-
getHlcma
public IAttribute getHlcma()
-
getHlcmmin
public double getHlcmmin()
-
getHlcmmax
public double getHlcmmax()
-
-