Package gaiasky.scenegraph
Class FadeNode
java.lang.Object
gaiasky.scenegraph.SceneGraphNode
gaiasky.scenegraph.FadeNode
- All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable
,IFadeObject
,IStarContainer
,IVisibilitySwitch
,IPosition
- Direct Known Subclasses:
AbstractOctreeWrapper
,BackgroundModel
,GenericCatalog
,ParticleGroup
,RecursiveGrid
,Text2D
Node that offers fade-in and fade-out capabilities.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CatalogInfo
Information on the catalog this fade node represents (particle group, octree, etc.)protected double
The current distance at each cycle, in internal unitsprotected boolean
Is it highlighted?protected boolean
protected float[]
protected IAttribute
protected int
protected double
protected double
protected boolean
protected boolean
boolean
Is the node already in the scene graph?protected Vector3b
Position of labelprotected float
protected SceneGraphNode
If set, the fade distance is the distance between the current fade node and this object.Fields inherited from class gaiasky.scenegraph.SceneGraphNode
B31, B32, B33, B34, cc, children, computed, coordinates, copy, ct, D31, D32, D33, D34, distToCamera, F31, F32, F33, F34, forceLabel, id, labelcolor, lastStateChangeTimeMs, localizedNameIndex, localTransform, names, numChildren, octant, octantId, opacity, orientation, parent, parentName, pos, posSph, ROOT_NAME, size, translation, viewAngle, viewAngleApparent, visible
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected 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
Gets the fade in distances.Gets the fade out distances.getHlcma()
int
getHlcmi()
double
double
float
void
highlight
(boolean hl, float[] color, boolean allVisible) Highlight using a plain colorvoid
highlight
(boolean hl, int cmi, IAttribute cma, double cmmin, double cmmax, boolean allVisible) Highlight using a colormapprotected void
initializeCatalogInfo
(boolean create, String name, String desc, int nParticles, String dataFile) boolean
boolean
boolean
void
setCataloginfo
(Map<String, String> map) void
setCatalogInfo
(CatalogInfo info) void
void
setFadein
(double[] fadein) void
setFadeIn
(double nearPc, double farPc) Sets the near and far fade in distances.void
setFadeout
(double[] fadeout) void
setFadeOut
(double nearPc, double farPc) Sets the near and far fade out distances.void
setLabelposition
(double[] labelposition) Sets the position of the label, in parsecs and in the internal reference frame.void
setPointscaling
(float pointscaling) void
setPosition
(double[] pos) void
setPosition
(int[] pos) void
void
Sets the absolute size (diameter) of this entityvoid
Sets the absolute size (diameter) of this entityvoid
setUp
(ISceneGraph sceneGraph) void
update
(ITimeFrameProvider time, Vector3b 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
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, getChildrenByComponentType, getChildrenByType, getColor, getComponentType, getCoordinates, getCt, getDelta, getDescription, getDistToCamera, getFirstStarAncestor, getHeight, getHeight, getHeight, getHeightScale, getId, getLabelcolor, getLineCopy, getLocalizedName, getName, getNames, getNext, getNode, getNode, getOctant, getOpacity, getOrientation, getPos, getPosition, getPosition, getPosSph, getPredictedPosition, getRadius, getRoot, getSceneGraphDepth, getSimpleCopy, getSize, getStarCount, getUnrotatedPos, getVelocity, getViewAngle, getViewAngleApparent, getVisibilityOpacityFactor, hasCt, hasName, hasName, initialize, insert, isCopy, isForceLabel, isForceLabel, isInRender, isInRender, isValidPosition, isVisibilityOn, isVisible, isVisible, isVisible, isVisibleGroup, isVisibleGroup, msSinceStateChange, mustAddToIndex, mustUpdatePosition, namesConcat, removeChild, removeFromIndex, removeFromRender, render2DLabel, render2DLabel, render2DLabel, render2DLabel, render3DLabel, render3DLabel, returnToPool, setColor, setColor, setComputedFlag, setCoordinates, setCt, setCt, setDescription, setForcelabel, setForceLabel, setForceLabel, setId, setLabelcolor, setLabelcolor, setLabelcolor, setName, setName, setNames, setParent, setPos, setVisible, setVisible, setVisibleGroup, shouldRender, toString, update, updateLocalizedName, updateLocalizedNameRecursive
-
Field Details
-
labelPosition
Position of label -
currentDistance
protected double currentDistanceThe current distance at each cycle, in internal units -
position
If set, the fade distance is the distance between the current fade node and this object. Otherwise, it is the length of the current object's position. -
inSceneGraph
public boolean inSceneGraphIs the node already in the scene graph? -
catalogInfo
Information on the catalog this fade node represents (particle group, octree, etc.) -
initialUpdate
protected boolean initialUpdate -
highlighted
protected boolean highlightedIs it highlighted? -
hlplain
protected boolean hlplain -
hlc
protected float[] hlc -
hlallvisible
protected boolean hlallvisible -
hlcmi
protected int hlcmi -
hlcma
-
hlcmmin
protected double hlcmmin -
hlcmmax
protected double hlcmmax -
pointscaling
protected float pointscaling
-
-
Constructor Details
-
FadeNode
public FadeNode() -
FadeNode
-
-
Method Details
-
initializeCatalogInfo
-
doneLoading
public void doneLoading(com.badlogic.gdx.assets.AssetManager manager) - Overrides:
doneLoading
in classSceneGraphNode
-
update
public void update(ITimeFrameProvider time, Vector3b parentTransform, ICamera camera, float opacity) - Overrides:
update
in classSceneGraphNode
-
updateLocal
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
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
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
-
getFadeIn
Description copied from interface:IFadeObject
Gets the fade in distances.- Specified by:
getFadeIn
in interfaceIFadeObject
- Returns:
- The fade in distances in internal units.
-
setFadeIn
public void setFadeIn(double nearPc, double farPc) Description copied from interface:IFadeObject
Sets the near and far fade in distances.- Specified by:
setFadeIn
in interfaceIFadeObject
- Parameters:
nearPc
- Near fade in distance in parsecs.farPc
- Far fade in distance in parsecs.
-
setFadein
public void setFadein(double[] fadein) -
getFadeOut
Description copied from interface:IFadeObject
Gets the fade out distances.- Specified by:
getFadeOut
in interfaceIFadeObject
- Returns:
- The fade out distances in internal units.
-
setFadeOut
public void setFadeOut(double nearPc, double farPc) Description copied from interface:IFadeObject
Sets the near and far fade out distances.- Specified by:
setFadeOut
in interfaceIFadeObject
- Parameters:
nearPc
- Near fade out distance in parsecs.farPc
- Far fade out distance in parsecs.
-
setFadeout
public void setFadeout(double[] fadeout) -
setPosition
public void setPosition(double[] pos) -
setPosition
public void setPosition(int[] pos) -
setLabelposition
public void setLabelposition(double[] labelposition) Sets the position of the label, in parsecs and in the internal reference frame.- Parameters:
labelposition
- The position of the label in internal cartesian coordinates.
-
setPositionobjectname
-
setCatalogInfoBare
-
setCatalogInfo
-
getCatalogInfo
-
setCataloginfo
-
highlight
public void highlight(boolean hl, float[] color, boolean allVisible) Highlight using a plain color- Parameters:
hl
- Whether to highlightcolor
- The plain colorallVisible
- All visible
-
highlight
public void highlight(boolean hl, int cmi, IAttribute cma, double cmmin, double cmmax, boolean allVisible) Highlight using a colormap- Parameters:
hl
- Whether to highlightcmi
- Color map indexcma
- Color map attributecmmin
- Min mapping valuecmmax
- Max mapping value
-
isHighlighted
public boolean isHighlighted() -
setUp
- Overrides:
setUp
in classSceneGraphNode
-
setSize
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
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
-
getHlcmmin
public double getHlcmmin() -
getHlcmmax
public double getHlcmmax() -
isHlAllVisible
public boolean isHlAllVisible() -
getPointscaling
public float getPointscaling() -
setPointscaling
public void setPointscaling(float pointscaling)
-