Package gaiasky.scenegraph
Class Planet
java.lang.Object
gaiasky.scenegraph.SceneGraphNode
gaiasky.scenegraph.CelestialBody
gaiasky.scenegraph.ModelBody
gaiasky.scenegraph.Planet
- All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable
,I3DTextRenderable
,ILineRenderable
,IModelRenderable
,IQuadRenderable
,IRenderable
,IFocus
,IStarContainer
,IVisibilitySwitch
,IPosition
-
Field Summary
Fields inherited from class gaiasky.scenegraph.ModelBody
fadeOpacity, inverseRefPlaneTransform, locThresholdLabel, locVaMultiplier, mc, randomize, refPlane, refPlaneTransform, seed, shadow, shadowMapValues, sizeScaleFactor, transformations
Fields inherited from class gaiasky.scenegraph.CelestialBody
absmag, appmag, ccPale, colorbv, compalpha, coordinatesTimeOverflow, labelFactor, labelMax, primitiveRenderScale, rc, textScale, thresholdLabel, thresholdNone, thresholdPoint, thresholdQuad, wikiname
Fields inherited from class gaiasky.scenegraph.SceneGraphNode
B31, B32, B33, B34, cc, children, computed, coordinates, copy, ct, D31, D32, D33, D34, distToCamera, F31, F32, F33, F34, forceLabel, id, labelcolor, lastStateChangeTimeMs, localizedNameIndex, localTransform, names, numChildren, octant, octantId, opacity, orientation, parent, 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.protected boolean
checkClickDistance
(int screenX, int screenY, com.badlogic.gdx.math.Vector3 pos, NaturalCamera camera, com.badlogic.gdx.graphics.PerspectiveCamera pcamera, double pixelSize) void
dispose()
void
doneLoading
(com.badlogic.gdx.assets.AssetManager manager) protected void
int
float
boolean
void
void
initializeAtmosphere
(com.badlogic.gdx.assets.AssetManager manager) void
initializeClouds
(com.badlogic.gdx.assets.AssetManager manager) void
render
(LineRenderSystem renderer, ICamera camera, float alpha) void
render
(IntModelBatch modelBatch, float alpha, double t, RenderingContext rc, SceneGraphRenderer.RenderGroup group) Renders modelvoid
renderAtmosphere
(IntModelBatch modelBatch, float alpha, RenderingContext rc) Renders the atmospherevoid
renderClouds
(IntModelBatch modelBatch, float alpha, double t) Renders the cloudsvoid
void
setCloud
(CloudComponent clc) protected void
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
Update the local transform with the transform and the rotations/scales necessary.void
updateLocalValues
(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, getMaterialComponent, getModelComponent, getPositionAboveSurface, getRadius, getSeed, getSize, getViewAnglePow, isRandomizeAtmosphere, isRandomizeCloud, isRandomizeModel, isShadow, labelSizeConcrete, prepareShadowEnvironment, render, render, renderTessellated, setLocthoverfactor, setLocThresholdLabel, setLocvamultiplier, setLocViewAngleMultiplier, setModel, setRandomize, setRandomize, setRefplane, setSeed, setSeed, setShadowvalues, setSizescalefactor, setToLocalTransform, setToLocalTransform, setTransformations, textScale
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, getWikiname, isActive, isCoordinatesTimeOverflow, isLabel, isStar, isValidPosition, makeFocus, render, renderText, setAbsmag, setAltname, setAppmag, setColorbv, setLabelFactor, setLabelMax, setMag, setPrimitiveRenderScale, setRotation, setSize, setTextScale, setThresholdNone, setThresholdPoint, setThresholdQuad, setWikiname, text, textColour, textDepthBuffer, textPosition, textSize
Methods inherited from class gaiasky.scenegraph.SceneGraphNode
add, add, addChild, addChild, addName, addNodes, addToIndex, addToRender, computeFuturePosition, getAbsoluteOrientation, getAbsolutePosition, getAbsolutePosition, getAggregatedChildren, getAlpha, getChildByName, getChildByNameAndType, getChildrenByComponentType, getChildrenByType, getColor, getComponentType, getCoordinates, getCt, getDelta, getDescription, getDistToCamera, getFirstStarAncestor, getId, getLabelcolor, getLineCopy, getLocalizedName, getName, getNames, getNext, getNode, getNode, getOctant, getOpacity, getOrientation, getPos, getPosition, getPosition, getPosSph, getPredictedPosition, getRoot, getSceneGraphDepth, getStarCount, getUnrotatedPos, getVelocity, getViewAngleApparent, getVisibilityOpacityFactor, hasCt, hasName, hasName, insert, isCopy, isForceLabel, isForceLabel, isInRender, isInRender, isVisibilityOn, isVisible, isVisible, isVisible, isVisibleGroup, isVisibleGroup, msSinceStateChange, mustAddToIndex, mustUpdatePosition, namesConcat, removeChild, removeFromIndex, removeFromRender, render2DLabel, render2DLabel, render2DLabel, render2DLabel, render3DLabel, render3DLabel, returnToPool, setColor, setColor, setComputedFlag, setCoordinates, setCt, setCt, setDescription, setForcelabel, setForceLabel, setForceLabel, setId, setLabelcolor, setLabelcolor, setLabelcolor, setName, setName, setNames, setParent, setPos, setSize, setUp, setVisible, setVisible, setVisibleGroup, shouldRender, toString, update, update, updateLocalizedName, updateLocalizedNameRecursive
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, getColor, getCt, getDelta, getDistToCamera, getFirstStarAncestor, getId, getLocalizedName, getName, getNames, getNext, getOctant, getOrientation, getPos, getPosSph, getPredictedPosition, getSceneGraphDepth, getViewAngleApparent, hasName, hasName, isCopy
Methods inherited from interface gaiasky.render.IRenderable
getComponentType, getDistToCamera, getOpacity
-
Constructor Details
-
Planet
public Planet()
-
-
Method Details
-
initialize
public void initialize()- Overrides:
initialize
in classModelBody
-
setColor2Data
protected void setColor2Data()- Overrides:
setColor2Data
in classCelestialBody
-
doneLoading
public void doneLoading(com.badlogic.gdx.assets.AssetManager manager) - Overrides:
doneLoading
in classModelBody
-
initializeAtmosphere
public void initializeAtmosphere(com.badlogic.gdx.assets.AssetManager manager) -
initializeClouds
public void initializeClouds(com.badlogic.gdx.assets.AssetManager manager) -
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 classModelBody
-
updateLocalTransform
protected void updateLocalTransform()Description copied from class:ModelBody
Update the local transform with the transform and the rotations/scales necessary. Override if your model contains more than just the position and size.- Overrides:
updateLocalTransform
in classModelBody
-
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 classSceneGraphNode
-
forceUpdateLocalValues
-
render
public void render(IntModelBatch modelBatch, float alpha, double t, RenderingContext rc, SceneGraphRenderer.RenderGroup group) Renders model- Specified by:
render
in interfaceIModelRenderable
- Overrides:
render
in classModelBody
-
renderAtmosphere
Renders the atmosphere -
renderClouds
Renders the clouds -
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 classModelBody
-
hasAtmosphere
public boolean hasAtmosphere()- Specified by:
hasAtmosphere
in interfaceIModelRenderable
- Overrides:
hasAtmosphere
in classCelestialBody
-
setAtmosphere
-
setCloud
-
dispose
public void dispose() -
render
- Specified by:
render
in interfaceILineRenderable
-
getGlPrimitive
public int getGlPrimitive()- Specified by:
getGlPrimitive
in 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:
checkClickDistance
in classCelestialBody
-
getLineWidth
public float getLineWidth()- Specified by:
getLineWidth
in interfaceILineRenderable
-
getCloudComponent
-
getAtmosphereComponent
-