Package gaiasky.scenegraph
Class Orbit
java.lang.Object
gaiasky.scenegraph.SceneGraphNode
gaiasky.scenegraph.VertsObject
gaiasky.scenegraph.Polyline
gaiasky.scenegraph.Orbit
- All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable
,I3DTextRenderable
,IGPUVertsRenderable
,ILineRenderable
,IRenderable
,IStarContainer
,IVisibilitySwitch
,IPosition
- Direct Known Subclasses:
EclipticOrbit
,HeliotropicOrbit
A polyline that represents a closed orbit. Contains a reference to the body and some other goodies
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptiondouble
protected CelestialBody
double
protected Vector3d
boolean
protected Double
boolean
int
Number of samples for the orbit data provider.protected boolean
float[]
Point colorfloat
Point sizeprotected Vector3d
protected String
protected Class<? extends IOrbitDataProvider>
boolean
Refreshing stateprotected static final float
Special overlap factorprotected static float
Threshold solid angleFields inherited from class gaiasky.scenegraph.VertsObject
additive, blend, closedLoop, depth, glPrimitive, pointCloudData, primitiveSize, renderGroup
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
void
doneLoading
(com.badlogic.gdx.assets.AssetManager manager) double
getAlpha()
float
Gets the text opacityvoid
void
void
boolean
isLabel()
Is it a label or another kind of text?float
labelMax()
boolean
Whether to add this node to the index.void
refreshOrbit
(boolean force) void
render
(LineRenderSystem renderer, ICamera camera, float alpha) void
render
(ExtSpriteBatch batch, ExtShaderProgram shader, FontRenderSystem sys, RenderingContext rc, ICamera camera) Render labelboolean
Tells whether the text must be rendered or not for this entityvoid
setBody
(CelestialBody body) void
Sets the orientation model as a string.void
setMultiplier
(Double multiplier) void
setNewmethod
(Boolean newMethod) void
setNumSamples
(Long numSamples) void
setOnlybody
(Boolean onlyBody) void
void
setOrbittrail
(Boolean trail) void
void
setPointcolor
(double[] color) void
setPointsize
(Double pointsize) void
setPointsize
(Long pointsize) void
setProvider
(String provider) void
Sets the absolute size of this entitystatic void
setSolidAngleThreshold
(float angleDeg) void
void
setTransformFunction
(String transformFunction) void
setTransformName
(String transformFunction) void
setTransformValues
(double[] transformValues) Constructs the transformation matrix from a double array containing the values in a column-major order (first the four values of the first column, then the second, etc.).void
setVisible
(boolean visible, String name) text()
Returns the textfloat[]
Returns an array with the text colour in the fashion [r, g, b, a]void
Executes the blending for the textvoid
textPosition
(ICamera cam, Vector3d out) Sets the position of this text in the out vectordouble
textPosition2
(ICamera cam, Vector3d out) float
Returns the text scale for the scale varying in the shaderfloat
textSize()
Returns the text sizevoid
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.protected void
updateLocalTransform
(Instant date) Methods inherited from class gaiasky.scenegraph.Polyline
getLineWidth, setArrowCap
Methods inherited from class gaiasky.scenegraph.VertsObject
addPoint, addPoints, blend, clear, depth, getColor, getGlPrimitive, getLocalTransform, getParent, getPointCloud, getPrimitiveSize, isClosedLoop, isEmpty, isLine, isPoint, markForUpdate, setAdditive, setBlend, setClosedLoop, setDepth, setGlPrimitive, setPoints, setPrimitiveLineLoop, setPrimitiveLines, setPrimitiveLineStip, setPrimitivePoints, setPrimitiveSize, updateLocalValues
Methods inherited from class gaiasky.scenegraph.SceneGraphNode
add, add, addChild, addChild, addFocusableObjects, addName, addNodes, addToIndex, addToRender, computeFuturePosition, dispose, getAbsoluteOrientation, getAbsolutePosition, getAbsolutePosition, getAggregatedChildren, getChildByName, getChildByNameAndType, getChildrenByComponentType, getChildrenByType, 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, insert, isCopy, isForceLabel, isForceLabel, isInRender, isInRender, isValidPosition, isVisibilityOn, isVisible, isVisible, isVisible, isVisibleGroup, isVisibleGroup, msSinceStateChange, 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, setSize, setSize, setUp, setVisible, setVisibleGroup, shouldRender, toString, update, update, updateLocalizedName, updateLocalizedNameRecursive
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface gaiasky.render.ILineRenderable
getGlPrimitive
Methods inherited from interface gaiasky.render.IRenderable
getComponentType, getDistToCamera, getOpacity
-
Field Details
-
SOLID_ANGLE_THRESHOLD
protected static float SOLID_ANGLE_THRESHOLDThreshold solid angle -
SHADER_MODEL_OVERLAP_FACTOR
protected static final float SHADER_MODEL_OVERLAP_FACTORSpecial overlap factor- See Also:
-
body
-
prev
-
curr
-
alpha
public double alpha -
localTransformD
-
transformFunction
-
auxMat
-
provider
-
multiplier
-
providerClass
-
oc
-
onlyBody
protected boolean onlyBody -
newMethod
public boolean newMethod -
coord
public double coord -
model
-
isInOrbitalElementsGroup
public boolean isInOrbitalElementsGroup -
refreshing
public boolean refreshingRefreshing state -
numSamples
public int numSamplesNumber of samples for the orbit data provider. -
pointColor
public float[] pointColorPoint color -
pointSize
public float pointSizePoint size
-
-
Constructor Details
-
Orbit
public Orbit()
-
-
Method Details
-
setSolidAngleThreshold
public static void setSolidAngleThreshold(float angleDeg) -
initialize
public void initialize()- Overrides:
initialize
in classSceneGraphNode
-
doneLoading
public void doneLoading(com.badlogic.gdx.assets.AssetManager manager) - Overrides:
doneLoading
in classSceneGraphNode
-
computeExtrasolarSystemTransformMatrix
public void computeExtrasolarSystemTransformMatrix() -
initializeTransformMatrix
public void initializeTransformMatrix() -
setPointCloudData
- Overrides:
setPointCloudData
in classVertsObject
-
initOrbitMetadata
public void initOrbitMetadata() -
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
-
updateLocalTransform
-
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 classPolyline
-
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
-
labelMax
public float labelMax() -
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
-
textSize
public float textSize()Description copied from interface:I3DTextRenderable
Returns the text size- Specified by:
textSize
in interfaceI3DTextRenderable
- Returns:
- The text size
-
keplerToCartesian
-
textPosition
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
-
textPosition2
-
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
-
render
public void render(ExtSpriteBatch batch, ExtShaderProgram shader, FontRenderSystem sys, RenderingContext rc, ICamera camera) Render label- Specified by:
render
in interfaceI3DTextRenderable
- Parameters:
batch
- The sprite batchshader
- The shadersys
- The font render systemrc
- The render contextcamera
- The camera
-
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
-
render
- Specified by:
render
in interfaceILineRenderable
- Overrides:
render
in classPolyline
-
refreshOrbit
public void refreshOrbit(boolean force) -
setSize
Sets the absolute size of this entity -
setPointsize
-
setPointsize
-
setPointcolor
public void setPointcolor(double[] color) -
getProvider
-
setProvider
-
setOrbit
-
setTransformName
-
setTransformFunction
-
setTransformValues
public void setTransformValues(double[] transformValues) Constructs the transformation matrix from a double array containing the values in a column-major order (first the four values of the first column, then the second, etc.). The double array must have at least 16 elements; the first 16 will be copied. -
setMultiplier
-
setBody
-
setOnlybody
-
setNewmethod
-
setTrail
-
setOrbittrail
-
setNumSamples
-
setModel
Sets the orientation model as a string.- Parameters:
model
- The orientation model.
-
getAlpha
public double getAlpha()- Specified by:
getAlpha
in interfaceIGPUVertsRenderable
- Overrides:
getAlpha
in classVertsObject
-
setVisible
- Specified by:
setVisible
in interfaceIVisibilitySwitch
- Overrides:
setVisible
in classSceneGraphNode
-
mustAddToIndex
public boolean mustAddToIndex()Description copied from class:SceneGraphNode
Whether to add this node to the index.- Overrides:
mustAddToIndex
in classSceneGraphNode
- Returns:
- True if the node needs to be added to the index.
-