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
,IGPUVertsRenderable
,ILineRenderable
,IRenderable
,IStarContainer
,IVisibilitySwitch
,IPosition
- Direct Known Subclasses:
EclipticOrbit
,HeliotropicOrbit
public class Orbit extends Polyline
A polyline that represents a closed orbit. Contains a reference to the body and some other goodies
-
Field Summary
Fields Modifier and Type Field Description double
alpha
protected 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 factorprotected static float
SOLID_ANGLE_THRESHOLD
Threshold solid angleMatrix4d
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.SceneGraphNode
aux3b1, aux3b2, aux3b3, aux3b4, aux3d1, aux3d2, aux3d3, aux3d4, aux3f1, aux3f2, aux3f3, aux3f4, cc, children, computed, coordinates, copy, ct, distToCamera, id, lastStateChangeTimeMs, localTransform, namekey, names, numChildren, octant, octantId, opacity, orientation, parent, parentkey, parentName, pos, posSph, ROOT_NAME, sg, size, translation, viewAngle, viewAngleApparent, visible
-
Constructor Summary
Constructors Constructor Description Orbit()
-
Method Summary
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
refreshOrbit(boolean force)
void
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
setPointCloudData(PointCloudData pcd)
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 entitystatic void
setSolidAngleThreshold(float angleDeg)
void
setTransformFunction(java.lang.String transformFunction)
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.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, setArrowCap
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, setPoints, setPrimitiveLineLoop, setPrimitiveLines, setPrimitiveLineStip, setPrimitivePoints, setPrimitiveSize
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, getCt, getDelta, getDescription, 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, getVisibilityOpacityFactor, hasCt, hasName, hasName, insert, insert, isCopy, isInRender, isInRender, isValidPosition, isVisibilityOn, isVisible, isVisible, msSinceStateChange, mustUpdatePosition, namesConcat, removeChild, removeFromIndex, removeFromRender, render2DLabel, render2DLabel, render2DLabel, render2DLabel, render3DLabel, render3DLabel, returnToPool, setColor, setColor, setComputedFlag, setCoordinates, setCt, setCt, setDescription, setId, setLabelcolor, setLabelcolor, setName, setNamekey, setNames, setParent, setParentkey, setSize, setSize, setUp, setVisible, shouldRender, 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 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:
- Constant Field Values
-
body
-
prev
-
curr
-
alpha
public double alpha -
localTransformD
-
transformFunction
-
provider
protected java.lang.String provider -
multiplier
protected java.lang.Double multiplier -
providerClass
-
oc
-
onlyBody
protected boolean onlyBody -
newMethod
public boolean newMethod -
refreshing
public boolean refreshingRefreshing state -
elemsInGpu
public boolean elemsInGpuOrbital elements in gpu, in case there is no body -
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
-
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
protected void updateLocalTransform(java.time.Instant date) -
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 classVertsObject
-
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
-
render
- Specified by:
render
in interfaceILineRenderable
- Overrides:
render
in classPolyline
-
refreshOrbit
public void refreshOrbit(boolean force) -
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
-
setTransformFunction
public void setTransformFunction(java.lang.String transformFunction) -
setMultiplier
public void setMultiplier(java.lang.Double multiplier) -
setBody
-
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.
-