Package gaiasky.scenegraph
Class Particle
java.lang.Object
gaiasky.scenegraph.SceneGraphNode
gaiasky.scenegraph.CelestialBody
gaiasky.scenegraph.Particle
- All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable,I3DTextRenderable,ILineRenderable,IModelRenderable,IQuadRenderable,IRenderable,IFocus,IProperMotion,IStarContainer,IStarFocus,IVisibilitySwitch,IPosition
- Direct Known Subclasses:
Star
A single point particle.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionbyteSource of this star: -1: Unknown 1: Gaia 2: Hipparcos (HYG) 3: Tychodoubleprotected static final floatprotected static floatprotected static floatprotected static Particle.ParamUpdatercom.badlogic.gdx.math.Vector3Proper motion in cartesian coordinates [U/yr]com.badlogic.gdx.math.Vector3MuAlpha [mas/yr], Mudelta [mas/yr], radvel [km/s]protected static floatprotected static floatprotected static floatFields inherited from class gaiasky.scenegraph.CelestialBody
absmag, appmag, ccPale, colorbv, compalpha, coordinatesTimeOverflow, labelFactor, labelMax, primitiveRenderScale, rc, textScale, thresholdLabel, thresholdNone, thresholdPoint, thresholdQuad, wikinameFields 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
ConstructorsConstructorDescriptionParticle()Particle(double thNone, double thPoint, double thQuad, float textScale, float labelFactor, float labelMax, float primitiveRenderScale, SceneGraphRenderer.RenderGroup bbRenderGroup) Particle(Vector3b pos, float appmag, float absmag, float colorbv, String[] names, float ra, float dec, long starid) Particle(Vector3b pos, float appmag, float absmag, float colorbv, String[] names, float ra, float dec, long starid, double thNone, double thPoint, double thQuad, float textScale, float labelFactor, float labelMax, float primitiveRenderScale, SceneGraphRenderer.RenderGroup bbRenderGroup) Creates a new star.Particle(Vector3b pos, com.badlogic.gdx.math.Vector3 pm, com.badlogic.gdx.math.Vector3 pmSph, float appmag, float absmag, float colorbv, String[] names, float ra, float dec, long starid) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanaddToRender(IRenderable renderable, SceneGraphRenderer.RenderGroup rg) Adds the given renderable to the given render group list.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 booleanvoiddoneLoading(com.badlogic.gdx.assets.AssetManager manager) protected voidforceUpdateLocalValues(ITimeFrameProvider time, boolean force) intGets the catalog source of this star.Same asIFocus.getAbsolutePosition(Vector3b).float[]Returns the color of the closest stardoubleSame asIFocus.getDistToCamera().Same asIFocus.getName().getClosestPos(Vector3d out) Returns the position of the closest star in camera coordinatesdoubleReturns the size of the closest starfloatgetFuzzyRenderSize(ICamera camera) intintgetHip()Returns the HIP number of this star, or negative if it has no HIP numberfloatfloatdoubleReturns the mu alpha in mas/yrdoubleReturns the mu delta in mas/yrdoubleReturns the radial velocity in km/sdoubleReturns the radius in internal units<T extends SceneGraphNode>
TGets a copy of this object but does not copy its parent or children.intprotected floatvoidbooleanisStar()floatvoidrender(LineRenderSystem renderer, ICamera camera, float alpha) Line renderer.voidrender(IntModelBatch modelBatch, float alpha, double t, RenderingContext rc, SceneGraphRenderer.RenderGroup group) Model renderingbooleanTells whether the text must be rendered or not for this entityvoidprotected voidprotected voidsetRGB(float bv) Sets the colorvoidupdate(ITimeFrameProvider time, Vector3b parentTransform, ICamera camera) voidupdate(ITimeFrameProvider time, Vector3b parentTransform, ICamera camera, float opacity) Re-implementation of update method ofCelestialBodyandSceneGraphNode.voidupdateLocalValues(ITimeFrameProvider time, ICamera camera) This function updates all the local values before the localTransform is updated.Methods inherited from class gaiasky.scenegraph.CelestialBody
addFocusableObjects, addHit, addHit, checkClickDistance, computeViewAngle, getAbsmag, getAppmag, getCandidateId, getCandidateName, getCandidateViewAngleApparent, getFocus, getOrientationQuaternion, getPmX, getPmY, getPmZ, getRotationComponent, getTextOpacity, getViewAngle, getViewAnglePow, getWikiname, hasAtmosphere, isActive, isCoordinatesTimeOverflow, isLabel, isValidPosition, makeFocus, render, render, setAbsmag, setAltname, setAppmag, setColor2Data, setColorbv, setLabelFactor, setLabelMax, setMag, setPrimitiveRenderScale, setRotation, setSize, setTextScale, setThresholdNone, setThresholdPoint, setThresholdQuad, setWikiname, text, textColour, textDepthBuffer, textPosition, textScale, textSizeMethods inherited from class gaiasky.scenegraph.SceneGraphNode
add, add, addChild, addChild, addName, addNodes, addToIndex, computeFuturePosition, dispose, getAbsoluteOrientation, getAbsolutePosition, getAbsolutePosition, getAggregatedChildren, getAlpha, getChildByName, getChildByNameAndType, getChildrenByComponentType, getChildrenByType, getColor, getComponentType, getCoordinates, getCt, getDelta, getDescription, getDistToCamera, getFirstStarAncestor, getHeight, getHeight, getHeight, getHeightScale, getId, getLabelcolor, getLineCopy, getLocalizedName, getName, getNames, getNext, getNode, getNode, getOctant, getOpacity, getOrientation, getPos, getPosition, getPosition, getPosSph, getPredictedPosition, getRoot, getSceneGraphDepth, getSize, 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, updateLocal, updateLocalizedName, updateLocalizedNameRecursiveMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface gaiasky.scenegraph.IFocus
addHit, addHit, getAbsmag, getAbsolutePosition, getAbsolutePosition, getAlpha, getAppmag, getCandidateId, getCandidateName, getCandidateViewAngleApparent, getColor, getCt, getDelta, getDistToCamera, getFirstStarAncestor, getFocus, getHeight, getHeight, getHeight, getHeightScale, getLocalizedName, getName, getNames, getNext, getOctant, getOrientation, getOrientationQuaternion, getPos, getPosSph, getPredictedPosition, getRotationComponent, getSceneGraphDepth, getSize, getViewAngle, getViewAngleApparent, hasName, hasName, isActive, isCoordinatesTimeOverflow, isCopy, makeFocusMethods inherited from interface gaiasky.render.IRenderable
getComponentType, getDistToCamera, getOpacityMethods inherited from interface gaiasky.scenegraph.IStarFocus
getId
-
Field Details
-
DISC_FACTOR
protected static final float DISC_FACTOR- See Also:
-
thpointTimesFovfactor
protected static float thpointTimesFovfactor -
thupOverFovfactor
protected static float thupOverFovfactor -
thdownOverFovfactor
protected static float thdownOverFovfactor -
innerRad
protected static float innerRad -
fovFactor
protected static float fovFactor -
paramUpdater
-
pm
public com.badlogic.gdx.math.Vector3 pmProper motion in cartesian coordinates [U/yr] -
pmSph
public com.badlogic.gdx.math.Vector3 pmSphMuAlpha [mas/yr], Mudelta [mas/yr], radvel [km/s] -
catalogSource
public byte catalogSourceSource of this star:- -1: Unknown
- 1: Gaia
- 2: Hipparcos (HYG)
- 3: Tycho
-
computedSize
public double computedSize
-
-
Constructor Details
-
Particle
public Particle() -
Particle
public Particle(double thNone, double thPoint, double thQuad, float textScale, float labelFactor, float labelMax, float primitiveRenderScale, SceneGraphRenderer.RenderGroup bbRenderGroup) -
Particle
public Particle(Vector3b pos, float appmag, float absmag, float colorbv, String[] names, float ra, float dec, long starid, double thNone, double thPoint, double thQuad, float textScale, float labelFactor, float labelMax, float primitiveRenderScale, SceneGraphRenderer.RenderGroup bbRenderGroup) -
Particle
public Particle(Vector3b pos, float appmag, float absmag, float colorbv, String[] names, long starid) Creates a new star.- Parameters:
pos- Cartesian position, in equatorial coordinates and in internal units.appmag- Apparent magnitude.absmag- Absolute magnitude.colorbv- The B-V color index.names- The labels or names.starid- The star unique id.
-
Particle
-
Particle
-
-
Method Details
-
initialize
public void initialize()- Overrides:
initializein classSceneGraphNode
-
setDerivedAttributes
protected void setDerivedAttributes() -
update
- Overrides:
updatein classSceneGraphNode
-
update
public void update(ITimeFrameProvider time, Vector3b parentTransform, ICamera camera, float opacity) Re-implementation of update method ofCelestialBodyandSceneGraphNode.- Overrides:
updatein classSceneGraphNode
-
addToRenderLists
Description copied from class:SceneGraphNodeAdds this entity to the necessary render lists after the distance to the camera and the view angle have been determined.- Overrides:
addToRenderListsin classSceneGraphNode
-
addToRender
Description copied from class:SceneGraphNodeAdds the given renderable to the given render group list.- Overrides:
addToRenderin classSceneGraphNode- Parameters:
renderable- The renderable to add.rg- The render group that identifies the renderable list.- Returns:
- True if added, false otherwise.
-
render
public void render(IntModelBatch modelBatch, float alpha, double t, RenderingContext rc, SceneGraphRenderer.RenderGroup group) Model rendering- Specified by:
renderin interfaceIModelRenderable
-
setRGB
protected void setRGB(float bv) Sets the color- Parameters:
bv- B-V color index
-
getInnerRad
public float getInnerRad()- Specified by:
getInnerRadin classCelestialBody
-
getRadius
public double getRadius()Description copied from class:SceneGraphNodeReturns the radius in internal units- Specified by:
getRadiusin interfaceIFocus- Overrides:
getRadiusin classSceneGraphNode- Returns:
- The radius of the object, in internal units
-
isStar
public boolean isStar()- Overrides:
isStarin classCelestialBody
-
renderText
public boolean renderText()Description copied from interface:I3DTextRenderableTells whether the text must be rendered or not for this entity- Specified by:
renderTextin interfaceI3DTextRenderable- Overrides:
renderTextin classCelestialBody- Returns:
- True if text must be rendered
-
labelSizeConcrete
public float labelSizeConcrete()- Overrides:
labelSizeConcretein classCelestialBody
-
getFuzzyRenderSize
- Overrides:
getFuzzyRenderSizein classCelestialBody
-
doneLoading
public void doneLoading(com.badlogic.gdx.assets.AssetManager manager) - Overrides:
doneLoadingin classSceneGraphNode
-
updateLocalValues
Description copied from class:SceneGraphNodeThis function updates all the local values before the localTransform is updated. Position, rotations and scale must be updated in here.- Overrides:
updateLocalValuesin classSceneGraphNode
-
forceUpdateLocalValues
-
getStarCount
public int getStarCount()- Specified by:
getStarCountin interfaceIStarContainer- Overrides:
getStarCountin classSceneGraphNode
-
getSimpleCopy
Description copied from class:SceneGraphNodeGets a copy of this object but does not copy its parent or children.- Overrides:
getSimpleCopyin classCelestialBody- Returns:
- The copied object.
-
render
Line renderer. Renders proper motions- Specified by:
renderin interfaceILineRenderable
-
getGlPrimitive
public int getGlPrimitive()- Specified by:
getGlPrimitivein interfaceILineRenderable
-
getThOverFactorScl
protected float getThOverFactorScl() -
checkHitCondition
protected boolean checkHitCondition()- Overrides:
checkHitConditionin classCelestialBody
-
getCatalogSource
public int getCatalogSource()Description copied from interface:IStarFocusGets the catalog source of this star. Possible values are:- -1: Unknown
- 1: Gaia
- 2: Hipparcos (HYG)
- 3: Tycho
- 4: Other
- Specified by:
getCatalogSourcein interfaceIStarFocus- Returns:
- The catalog source number
-
getHip
public int getHip()Description copied from interface:IStarFocusReturns the HIP number of this star, or negative if it has no HIP number- Specified by:
getHipin interfaceIStarFocus- Returns:
- The HIP number
-
getClosestDistToCamera
public double getClosestDistToCamera()Description copied from interface:IFocusSame asIFocus.getDistToCamera().- Specified by:
getClosestDistToCamerain interfaceIFocus- Specified by:
getClosestDistToCamerain interfaceIStarFocus- Overrides:
getClosestDistToCamerain classCelestialBody- Returns:
- The distance to the camera in internal units.
-
getClosestName
Description copied from interface:IFocusSame asIFocus.getName().- Specified by:
getClosestNamein interfaceIFocus- Specified by:
getClosestNamein interfaceIStarFocus- Overrides:
getClosestNamein classCelestialBody- Returns:
- The name.
-
getClosestPos
Description copied from interface:IStarFocusReturns the position of the closest star in camera coordinates- Specified by:
getClosestPosin interfaceIStarFocus- Parameters:
out- The out vector- Returns:
- The out vector with the position
-
getClosestAbsolutePos
Description copied from interface:IFocusSame asIFocus.getAbsolutePosition(Vector3b).- Specified by:
getClosestAbsolutePosin interfaceIFocus- Specified by:
getClosestAbsolutePosin interfaceIStarFocus- Overrides:
getClosestAbsolutePosin classCelestialBody- Parameters:
out- Vector3d where to put the return value.- Returns:
- The absolute position, same as aux.
-
getClosestCol
public float[] getClosestCol()Description copied from interface:IStarFocusReturns the color of the closest star- Specified by:
getClosestColin interfaceIStarFocus- Returns:
- The color in rgb
-
getClosestSize
public double getClosestSize()Description copied from interface:IStarFocusReturns the size of the closest star- Specified by:
getClosestSizein interfaceIStarFocus- Returns:
- The size of the closest star
-
getMuAlpha
public double getMuAlpha()Description copied from interface:IProperMotionReturns the mu alpha in mas/yr- Specified by:
getMuAlphain interfaceIProperMotion- Returns:
- The mu alpha in mas/yr
-
getMuDelta
public double getMuDelta()Description copied from interface:IProperMotionReturns the mu delta in mas/yr- Specified by:
getMuDeltain interfaceIProperMotion- Returns:
- The mu delta in mas/yr
-
getRadialVelocity
public double getRadialVelocity()Description copied from interface:IProperMotionReturns the radial velocity in km/s- Specified by:
getRadialVelocityin interfaceIProperMotion- Returns:
- The radial velocity in km/s
-
getLineWidth
public float getLineWidth()- Specified by:
getLineWidthin interfaceILineRenderable
-
setBillboardRenderGroup
-