Package gaiasky.scenegraph
Class Planet
- java.lang.Object
-
- All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable,I3DTextRenderable,IAtmosphereRenderable,ICloudRenderable,ILineRenderable,IModelRenderable,IQuadRenderable,IRenderable,IFocus,IStarContainer,IPosition
public class Planet extends ModelBody implements IAtmosphereRenderable, ICloudRenderable, ILineRenderable
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class gaiasky.scenegraph.SceneGraphNode
SceneGraphNode.RenderGroup, SceneGraphNode.TLV3, SceneGraphNode.TLV3D
-
-
Field Summary
-
Fields inherited from class gaiasky.scenegraph.ModelBody
fadeOpacity, inverseRefPlaneTransform, locThOverFactor, locVaMultiplier, mc, refPlane, refPlaneTransform, shadow, shadowMapValues, sizeScaleFactor, transformations, wikiname
-
Fields inherited from class gaiasky.scenegraph.CelestialBody
absmag, appmag, ccPale, ccTransit, colorbv, compalpha, coordinatesTimeOverflow, lastTransitIncrease, rc, TH_OVER_FACTOR, transits
-
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 Planet()
-
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.protected booleancheckClickDistance(int screenX, int screenY, com.badlogic.gdx.math.Vector3 pos, NaturalCamera camera, com.badlogic.gdx.graphics.PerspectiveCamera pcamera, double pixelSize)voiddispose()voiddoneLoading(com.badlogic.gdx.assets.AssetManager manager)protected voidforceUpdateLocalValues(ITimeFrameProvider time, boolean force)intgetGlPrimitive()floatgetLineWidth()booleanhasAtmosphere()voidinitialize()protected floatlabelFactor()voidrender(LineRenderSystem renderer, ICamera camera, float alpha)voidrender(IntModelBatch modelBatch, float alpha, double t, RenderingContext rc)Renders modelvoidrenderAtmosphere(IntModelBatch modelBatch, float alpha, double t, Vector3d vroffset)Renders the atmospherevoidrenderClouds(IntModelBatch modelBatch, float alpha, double t)Renders the cloudsvoidsetAtmosphere(AtmosphereComponent ac)voidsetCloud(CloudComponent clc)protected voidsetColor2Data()doubleTHRESHOLD_NONE()radius/distance limit for rendering at all.doubleTHRESHOLD_POINT()Angle limit for rendering as point.doubleTHRESHOLD_QUAD()radius/distance limit for rendering as shader.voidupdateLocal(ITimeFrameProvider time, ICamera camera)Updates the local transform matrix.protected voidupdateLocalTransform()Update the local transform with the transform and the rotations/scales necessary.voidupdateLocalValues(ITimeFrameProvider time, ICamera camera)This function updates all the local values before the localTransform is updated.-
Methods inherited from class gaiasky.scenegraph.ModelBody
addHit, addHit, getFuzzyRenderSize, getHeight, getHeight, getHeight, getHeightScale, getInnerRad, getPositionAboveSurface, getRadius, getSize, getThOverFactor, getThOverFactorScl, getViewAnglePow, getWikiname, isShadow, labelMax, labelSizeConcrete, prepareShadowEnvironment, render, render, renderTessellated, setLocthoverfactor, setLocvamultiplier, setModel, setRefplane, setShadowvalues, setSizescalefactor, setToLocalTransform, setToLocalTransform, setTransformations, setWikiname, textScale, withinMagLimit
-
Methods inherited from class gaiasky.scenegraph.CelestialBody
addFocusableObjects, checkHitCondition, computeViewAngle, getAbsmag, getAppmag, getCandidateId, getCandidateName, getCandidateViewAngleApparent, getClosestAbsolutePos, getClosestDistToCamera, getClosestName, getFocus, getOrientationQuaternion, getPmX, getPmY, getPmZ, getRotationComponent, getSimpleCopy, getTextOpacity, getViewAngle, isActive, isCoordinatesTimeOverflow, isLabel, isStar, isValidPosition, makeFocus, render, renderText, setAbsmag, setAltname, setAppmag, setMag, setRotation, setSize, text, textColour, textDepthBuffer, textPosition, textSize, timeCondition, update, updateTransitNumber
-
Methods inherited from class gaiasky.scenegraph.AbstractPositionEntity
computeFuturePosition, getAbsoluteOrientation, getAbsolutePosition, getAbsolutePosition, getAlpha, getDelta, getDistToCamera, getNext, getOctant, getPos, getPosition, getPosition, getPosSph, getPredictedPosition, getViewAngleApparent, isCopy, mustUpdatePosition, render2DLabel, render2DLabel, render2DLabel, render2DLabel, render3DLabel, setColor, setColor, setCoordinates, setLabelcolor, setLabelcolor, setSize
-
Methods inherited from class gaiasky.scenegraph.SceneGraphNode
add, add, addChild, addChild, addName, addNodes, addToIndex, addToRender, 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, isVisibilityOn, mustAddToIndex, namesConcat, removeChild, removeFromIndex, removeFromRender, returnToPool, setComputedFlag, setCt, setCt, setId, setName, setNamekey, setNames, setParent, setParentkey, setUp, toString, 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.scenegraph.IFocus
getAbsolutePosition, getAbsolutePosition, getAlpha, getCt, getDelta, getDistToCamera, getFirstStarAncestor, getId, getName, getNames, getNext, getOctant, getOrientation, getPos, getPosSph, getPredictedPosition, getSceneGraphDepth, getViewAngleApparent, hasName, hasName, isCopy
-
Methods inherited from interface gaiasky.render.IRenderable
getComponentType, getDistToCamera, getOpacity
-
-
-
-
Method Detail
-
THRESHOLD_NONE
public double THRESHOLD_NONE()
Description copied from class:CelestialBodyradius/distance limit for rendering at all. If angle is smaller than this quantity, no rendering happens.- Specified by:
THRESHOLD_NONEin classCelestialBody
-
THRESHOLD_POINT
public double THRESHOLD_POINT()
Description copied from class:ModelBodyAngle limit for rendering as point. If angle is any bigger, we render with shader.- Overrides:
THRESHOLD_POINTin classModelBody
-
THRESHOLD_QUAD
public double THRESHOLD_QUAD()
Description copied from class:CelestialBodyradius/distance limit for rendering as shader. If angle is any bigger, we render as a model.- Specified by:
THRESHOLD_QUADin classCelestialBody
-
initialize
public void initialize()
- Overrides:
initializein classModelBody
-
setColor2Data
protected void setColor2Data()
- Overrides:
setColor2Datain classCelestialBody
-
doneLoading
public void doneLoading(com.badlogic.gdx.assets.AssetManager manager)
- Overrides:
doneLoadingin classModelBody
-
updateLocal
public void updateLocal(ITimeFrameProvider time, ICamera camera)
Description copied from class:AbstractPositionEntityUpdates the local transform matrix.- Overrides:
updateLocalin classModelBody
-
updateLocalTransform
protected void updateLocalTransform()
Description copied from class:ModelBodyUpdate the local transform with the transform and the rotations/scales necessary. Override if your model contains more than just the position and size.- Overrides:
updateLocalTransformin classModelBody
-
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.- Specified by:
updateLocalValuesin classAbstractPositionEntity
-
forceUpdateLocalValues
protected void forceUpdateLocalValues(ITimeFrameProvider time, boolean force)
-
render
public void render(IntModelBatch modelBatch, float alpha, double t, RenderingContext rc)
Renders model- Specified by:
renderin interfaceIModelRenderable- Overrides:
renderin classModelBody
-
renderAtmosphere
public void renderAtmosphere(IntModelBatch modelBatch, float alpha, double t, Vector3d vroffset)
Renders the atmosphere- Specified by:
renderAtmospherein interfaceIAtmosphereRenderable- Parameters:
modelBatch- The model batch to use.alpha- The opacity.t- The time in seconds since the start.vroffset- Positional offset in vr mode, if any.
-
renderClouds
public void renderClouds(IntModelBatch modelBatch, float alpha, double t)
Renders the clouds- Specified by:
renderCloudsin interfaceICloudRenderable- Parameters:
modelBatch- The model batch to use.alpha- The opacity.t- The time in seconds since the start.
-
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 classModelBody
-
hasAtmosphere
public boolean hasAtmosphere()
- Specified by:
hasAtmospherein interfaceIModelRenderable- Overrides:
hasAtmospherein classCelestialBody
-
setAtmosphere
public void setAtmosphere(AtmosphereComponent ac)
-
setCloud
public void setCloud(CloudComponent clc)
-
labelFactor
protected float labelFactor()
- Specified by:
labelFactorin classCelestialBody
-
dispose
public void dispose()
-
render
public void render(LineRenderSystem renderer, ICamera camera, float alpha)
- Specified by:
renderin interfaceILineRenderable
-
getGlPrimitive
public int getGlPrimitive()
- Specified by:
getGlPrimitivein interfaceILineRenderable
-
checkClickDistance
protected boolean checkClickDistance(int screenX, int screenY, com.badlogic.gdx.math.Vector3 pos, NaturalCamera camera, com.badlogic.gdx.graphics.PerspectiveCamera pcamera, double pixelSize)- Overrides:
checkClickDistancein classCelestialBody
-
getLineWidth
public float getLineWidth()
- Specified by:
getLineWidthin interfaceILineRenderable
-
-