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
A polyline that represents a closed orbit. Contains a reference to the body and some other goodies
-
Field Summary
FieldsModifier and TypeFieldDescriptiondouble
protected CelestialBody
protected Vector3d
boolean
Orbital elements in gpu, in case there is no bodyprotected Double
boolean
protected boolean
float[]
Point colorfloat
Point sizeprotected Vector3d
protected String
protected Class<? extends IOrbitDataProvider>
boolean
Refreshing stateprotected static float
Special overlap factorprotected static float
Threshold solid angleFields 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, 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)
double
getAlpha()
void
void
boolean
Whether to add this node to the index.void
refreshOrbit(boolean force)
void
render(LineRenderSystem renderer, ICamera camera, float alpha)
void
setBody(CelestialBody body)
void
setMultiplier(Double multiplier)
void
setNewmethod(Boolean newMethod)
void
setOnlybody(Boolean onlyBody)
void
setOrbit(OrbitComponent oc)
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
setTransformFunction(String transformFunction)
void
setVisible(boolean visible, String name)
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(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, isCopy, isInRender, isInRender, isValidPosition, isVisibilityOn, isVisible, isVisible, isVisible, isVisibleGroup, 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, setVisibleGroup, 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
-
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
-
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
Sets the absolute size of this entity- Parameters:
size
-
-
setPointsize
-
setPointsize
-
setPointcolor
public void setPointcolor(double[] color) -
getProvider
-
setProvider
-
setOrbit
-
setTransformFunction
-
setMultiplier
-
setBody
-
setOnlybody
-
setNewmethod
-
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.
-