Package gaiasky.scenegraph
Class Orbit
- java.lang.Object
-
- All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable
,IGPUVertsRenderable
,ILineRenderable
,IRenderable
,IStarContainer
,IPosition
- Direct Known Subclasses:
EclipticOrbit
,HeliotropicOrbit
public class Orbit extends Polyline
-
-
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 double
alpha
protected static float
ANGLE_LIMIT
Threshold angleprotected CelestialBody
body
protected Vector3d
curr
boolean
elemsInGpu
Orbital elements in gpu, in case there is no bodyMatrix4d
localTransformD
protected java.lang.Double
multiplier
boolean
newmethod
OrbitComponent
oc
protected boolean
onlybody
float[]
pointColor
Point colorfloat
pointSize
Point sizeprotected Vector3d
prev
protected java.lang.String
provider
protected java.lang.Class<? extends IOrbitDataProvider>
providerClass
boolean
refreshing
Refreshing stateprotected static float
SHADER_MODEL_OVERLAP_FACTOR
Special overlap factorMatrix4d
transformFunction
-
Fields inherited from class gaiasky.scenegraph.VertsObject
additive, blend, closedLoop, count, depth, glPrimitive, inGpu, offset, pointCloudData, primitiveSize, renderGroup
-
Fields inherited from class gaiasky.scenegraph.AbstractPositionEntity
cc, coordinates, copy, 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 Constructor Description Orbit()
-
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)
double
getAlpha()
java.lang.String
getProvider()
void
initialize()
void
initOrbitMetadata()
boolean
mustAddToIndex()
Whether to add this node to the indexvoid
render(LineRenderSystem renderer, ICamera camera, float alpha)
void
setBody(CelestialBody body)
void
setMultiplier(java.lang.Double multiplier)
void
setNewmethod(java.lang.Boolean newmethod)
void
setOnlybody(java.lang.Boolean onlybody)
void
setOrbit(OrbitComponent oc)
void
setPointcolor(double[] color)
void
setPointsize(java.lang.Double pointsize)
void
setPointsize(java.lang.Long pointsize)
void
setProvider(java.lang.String provider)
void
setSize(java.lang.Float size)
Sets the absolute size of this entityvoid
setTransformFunction(java.lang.String transformFunction)
void
updateLocal(ITimeFrameProvider time, ICamera camera)
Updates the local transform matrix.protected void
updateLocalTransform(java.time.Instant date)
void
updateLocalValues(ITimeFrameProvider time, ICamera camera)
This function updates all the local values before the localTransform is updated.-
Methods inherited from class gaiasky.scenegraph.Polyline
getLineWidth
-
Methods inherited from class gaiasky.scenegraph.VertsObject
addPoint, addPoints, blend, clear, depth, getColor, getCount, getGlPrimitive, getLocalTransform, getOffset, getParent, getPointCloud, getPrimitiveSize, inGpu, isClosedLoop, isEmpty, isLine, isPoint, markForUpdate, setAdditive, setBlend, setClosedLoop, setCount, setDepth, setGlPrimitive, setInGpu, setOffset, setPointCloudData, setPoints, setPrimitiveLineLoop, setPrimitiveLines, setPrimitiveLineStip, setPrimitivePoints, setPrimitiveSize
-
Methods inherited from class gaiasky.scenegraph.AbstractPositionEntity
computeFuturePosition, getAbsoluteOrientation, getAbsolutePosition, getAbsolutePosition, getDelta, getDistToCamera, getHeight, getHeight, getHeight, getHeightScale, getNext, getOctant, getPos, getPosition, getPosition, getPosSph, getPredictedPosition, getRadius, getSimpleCopy, getSize, getViewAngle, getViewAngleApparent, isCopy, mustUpdatePosition, render2DLabel, render2DLabel, render2DLabel, render2DLabel, render3DLabel, setColor, setColor, setCoordinates, setLabelcolor, setLabelcolor, setSize, setSize
-
Methods inherited from class gaiasky.scenegraph.SceneGraphNode
add, add, addChild, addChild, addFocusableObjects, addName, addNodes, addToIndex, addToRender, dispose, getAggregatedChildren, getChildByName, getChildByNameAndType, getChildrenByType, getComponentType, getCt, getFirstStarAncestor, getId, getLineCopy, getName, getNames, getNode, getNode, getOpacity, getOrientation, getRoot, getSceneGraphDepth, getStarCount, getVelocity, hasName, hasName, insert, insert, isInRender, isInRender, isValidPosition, isVisibilityOn, namesConcat, removeChild, removeFromIndex, removeFromRender, returnToPool, setComputedFlag, setCt, setCt, setId, setName, setNamekey, setNames, setParent, setParentkey, setUp, toString, update, 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.ILineRenderable
getGlPrimitive
-
Methods inherited from interface gaiasky.render.IRenderable
getComponentType, getDistToCamera, getOpacity
-
-
-
-
Field Detail
-
ANGLE_LIMIT
protected static final float ANGLE_LIMIT
Threshold angle
-
SHADER_MODEL_OVERLAP_FACTOR
protected static final float SHADER_MODEL_OVERLAP_FACTOR
Special overlap factor- See Also:
- Constant Field Values
-
body
protected CelestialBody body
-
prev
protected Vector3d prev
-
curr
protected Vector3d curr
-
alpha
public double alpha
-
localTransformD
public Matrix4d localTransformD
-
transformFunction
public Matrix4d transformFunction
-
provider
protected java.lang.String provider
-
multiplier
protected java.lang.Double multiplier
-
providerClass
protected java.lang.Class<? extends IOrbitDataProvider> providerClass
-
oc
public OrbitComponent oc
-
onlybody
protected boolean onlybody
-
newmethod
public boolean newmethod
-
refreshing
public boolean refreshing
Refreshing state
-
elemsInGpu
public boolean elemsInGpu
Orbital elements in gpu, in case there is no body
-
pointColor
public float[] pointColor
Point color
-
pointSize
public float pointSize
Point size
-
-
Method Detail
-
initialize
public void initialize()
- Overrides:
initialize
in classSceneGraphNode
-
doneLoading
public void doneLoading(com.badlogic.gdx.assets.AssetManager manager)
- Overrides:
doneLoading
in classAbstractPositionEntity
-
initOrbitMetadata
public void initOrbitMetadata()
-
updateLocal
public void updateLocal(ITimeFrameProvider time, ICamera camera)
Description copied from class:AbstractPositionEntity
Updates the local transform matrix.- Overrides:
updateLocal
in classAbstractPositionEntity
-
updateLocalTransform
protected void updateLocalTransform(java.time.Instant date)
-
updateLocalValues
public void updateLocalValues(ITimeFrameProvider time, ICamera camera)
Description copied from class:AbstractPositionEntity
This function updates all the local values before the localTransform is updated. Position, rotations and scale must be updated in here.- Overrides:
updateLocalValues
in classVertsObject
-
addToRenderLists
protected void addToRenderLists(ICamera camera)
Description copied from class:AbstractPositionEntity
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
-
render
public void render(LineRenderSystem renderer, ICamera camera, float alpha)
- Specified by:
render
in interfaceILineRenderable
- Overrides:
render
in classPolyline
-
setSize
public void setSize(java.lang.Float size)
Sets the absolute size of this entity- Parameters:
size
-
-
setPointsize
public void setPointsize(java.lang.Long pointsize)
-
setPointsize
public void setPointsize(java.lang.Double pointsize)
-
setPointcolor
public void setPointcolor(double[] color)
-
getProvider
public java.lang.String getProvider()
-
setProvider
public void setProvider(java.lang.String provider)
-
setOrbit
public void setOrbit(OrbitComponent oc)
-
setTransformFunction
public void setTransformFunction(java.lang.String transformFunction)
-
setMultiplier
public void setMultiplier(java.lang.Double multiplier)
-
setBody
public void setBody(CelestialBody body)
-
setOnlybody
public void setOnlybody(java.lang.Boolean onlybody)
-
setNewmethod
public void setNewmethod(java.lang.Boolean newmethod)
-
getAlpha
public double getAlpha()
- Specified by:
getAlpha
in interfaceIGPUVertsRenderable
- Overrides:
getAlpha
in classVertsObject
-
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.
-
-