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 doublealphaprotected static floatANGLE_LIMITThreshold angleprotected CelestialBodybodyprotected Vector3dcurrbooleanelemsInGpuOrbital elements in gpu, in case there is no bodyMatrix4dlocalTransformDprotected java.lang.DoublemultiplierbooleannewmethodOrbitComponentocprotected booleanonlybodyfloat[]pointColorPoint colorfloatpointSizePoint sizeprotected Vector3dprevprotected java.lang.Stringproviderprotected java.lang.Class<? extends IOrbitDataProvider>providerClassbooleanrefreshingRefreshing stateprotected static floatSHADER_MODEL_OVERLAP_FACTORSpecial overlap factorMatrix4dtransformFunction-
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 voidaddToRenderLists(ICamera camera)Adds this entity to the necessary render lists after the distance to the camera and the view angle have been determined.voiddoneLoading(com.badlogic.gdx.assets.AssetManager manager)doublegetAlpha()java.lang.StringgetProvider()voidinitialize()voidinitOrbitMetadata()booleanmustAddToIndex()Whether to add this node to the indexvoidrender(LineRenderSystem renderer, ICamera camera, float alpha)voidsetBody(CelestialBody body)voidsetMultiplier(java.lang.Double multiplier)voidsetNewmethod(java.lang.Boolean newmethod)voidsetOnlybody(java.lang.Boolean onlybody)voidsetOrbit(OrbitComponent oc)voidsetPointcolor(double[] color)voidsetPointsize(java.lang.Double pointsize)voidsetPointsize(java.lang.Long pointsize)voidsetProvider(java.lang.String provider)voidsetSize(java.lang.Float size)Sets the absolute size of this entityvoidsetTransformFunction(java.lang.String transformFunction)voidupdateLocal(ITimeFrameProvider time, ICamera camera)Updates the local transform matrix.protected voidupdateLocalTransform(java.time.Instant date)voidupdateLocalValues(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:
initializein classSceneGraphNode
-
doneLoading
public void doneLoading(com.badlogic.gdx.assets.AssetManager manager)
- Overrides:
doneLoadingin classAbstractPositionEntity
-
initOrbitMetadata
public void initOrbitMetadata()
-
updateLocal
public void updateLocal(ITimeFrameProvider time, ICamera camera)
Description copied from class:AbstractPositionEntityUpdates the local transform matrix.- Overrides:
updateLocalin classAbstractPositionEntity
-
updateLocalTransform
protected void updateLocalTransform(java.time.Instant date)
-
updateLocalValues
public void updateLocalValues(ITimeFrameProvider time, ICamera camera)
Description copied from class:AbstractPositionEntityThis function updates all the local values before the localTransform is updated. Position, rotations and scale must be updated in here.- Overrides:
updateLocalValuesin classVertsObject
-
addToRenderLists
protected void addToRenderLists(ICamera camera)
Description copied from class:AbstractPositionEntityAdds this entity to the necessary render lists after the distance to the camera and the view angle have been determined.- Overrides:
addToRenderListsin classPolyline
-
render
public void render(LineRenderSystem renderer, ICamera camera, float alpha)
- Specified by:
renderin interfaceILineRenderable- Overrides:
renderin 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:
getAlphain interfaceIGPUVertsRenderable- Overrides:
getAlphain classVertsObject
-
mustAddToIndex
public boolean mustAddToIndex()
Description copied from class:SceneGraphNodeWhether to add this node to the index- Overrides:
mustAddToIndexin classSceneGraphNode- Returns:
- True if the node needs to be added to the index.
-
-