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 TypeFieldDescriptionbyte
Source of this star: -1: Unknown 1: Gaia 2: Hipparcos (HYG) 3: Tychodouble
protected static final float
protected static float
protected static float
protected static Particle.ParamUpdater
com.badlogic.gdx.math.Vector3
Proper motion in cartesian coordinates [U/yr]com.badlogic.gdx.math.Vector3
MuAlpha [mas/yr], Mudelta [mas/yr], radvel [km/s]protected static float
protected static float
protected static float
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
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 boolean
addToRender
(IRenderable renderable, SceneGraphRenderer.RenderGroup rg) Adds the given renderable to the given render group list.protected 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
void
doneLoading
(com.badlogic.gdx.assets.AssetManager manager) protected void
forceUpdateLocalValues
(ITimeFrameProvider time, boolean force) int
Gets the catalog source of this star.Same asIFocus.getAbsolutePosition(Vector3b)
.float[]
Returns the color of the closest stardouble
Same asIFocus.getDistToCamera()
.Same asIFocus.getName()
.getClosestPos
(Vector3d out) Returns the position of the closest star in camera coordinatesdouble
Returns the size of the closest starfloat
getFuzzyRenderSize
(ICamera camera) int
int
getHip()
Returns the HIP number of this star, or negative if it has no HIP numberfloat
float
double
Returns the mu alpha in mas/yrdouble
Returns the mu delta in mas/yrdouble
Returns the radial velocity in km/sdouble
Returns the radius in internal units<T extends SceneGraphNode>
TGets a copy of this object but does not copy its parent or children.int
protected float
void
boolean
isStar()
float
void
render
(LineRenderSystem renderer, ICamera camera, float alpha) Line renderer.void
render
(IntModelBatch modelBatch, float alpha, double t, RenderingContext rc, SceneGraphRenderer.RenderGroup group) Model renderingboolean
Tells whether the text must be rendered or not for this entityvoid
protected void
protected void
setRGB
(float bv) Sets the colorvoid
update
(ITimeFrameProvider time, Vector3b parentTransform, ICamera camera) void
update
(ITimeFrameProvider time, Vector3b parentTransform, ICamera camera, float opacity) Re-implementation of update method ofCelestialBody
andSceneGraphNode
.void
updateLocalValues
(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, textSize
Methods 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, 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
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, makeFocus
Methods inherited from interface gaiasky.render.IRenderable
getComponentType, getDistToCamera, getOpacity
Methods 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:
initialize
in classSceneGraphNode
-
setDerivedAttributes
protected void setDerivedAttributes() -
update
- Overrides:
update
in classSceneGraphNode
-
update
public void update(ITimeFrameProvider time, Vector3b parentTransform, ICamera camera, float opacity) Re-implementation of update method ofCelestialBody
andSceneGraphNode
.- Overrides:
update
in classSceneGraphNode
-
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 classSceneGraphNode
-
addToRender
Description copied from class:SceneGraphNode
Adds the given renderable to the given render group list.- Overrides:
addToRender
in 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:
render
in interfaceIModelRenderable
-
setRGB
protected void setRGB(float bv) Sets the color- Parameters:
bv
- B-V color index
-
getInnerRad
public float getInnerRad()- Specified by:
getInnerRad
in classCelestialBody
-
getRadius
public double getRadius()Description copied from class:SceneGraphNode
Returns the radius in internal units- Specified by:
getRadius
in interfaceIFocus
- Overrides:
getRadius
in classSceneGraphNode
- Returns:
- The radius of the object, in internal units
-
isStar
public boolean isStar()- Overrides:
isStar
in classCelestialBody
-
renderText
public boolean renderText()Description copied from interface:I3DTextRenderable
Tells whether the text must be rendered or not for this entity- Specified by:
renderText
in interfaceI3DTextRenderable
- Overrides:
renderText
in classCelestialBody
- Returns:
- True if text must be rendered
-
labelSizeConcrete
public float labelSizeConcrete()- Overrides:
labelSizeConcrete
in classCelestialBody
-
getFuzzyRenderSize
- Overrides:
getFuzzyRenderSize
in classCelestialBody
-
doneLoading
public void doneLoading(com.badlogic.gdx.assets.AssetManager manager) - Overrides:
doneLoading
in classSceneGraphNode
-
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
-
getStarCount
public int getStarCount()- Specified by:
getStarCount
in interfaceIStarContainer
- Overrides:
getStarCount
in classSceneGraphNode
-
getSimpleCopy
Description copied from class:SceneGraphNode
Gets a copy of this object but does not copy its parent or children.- Overrides:
getSimpleCopy
in classCelestialBody
- Returns:
- The copied object.
-
render
Line renderer. Renders proper motions- Specified by:
render
in interfaceILineRenderable
-
getGlPrimitive
public int getGlPrimitive()- Specified by:
getGlPrimitive
in interfaceILineRenderable
-
getThOverFactorScl
protected float getThOverFactorScl() -
checkHitCondition
protected boolean checkHitCondition()- Overrides:
checkHitCondition
in classCelestialBody
-
getCatalogSource
public int getCatalogSource()Description copied from interface:IStarFocus
Gets the catalog source of this star. Possible values are:- -1: Unknown
- 1: Gaia
- 2: Hipparcos (HYG)
- 3: Tycho
- 4: Other
- Specified by:
getCatalogSource
in interfaceIStarFocus
- Returns:
- The catalog source number
-
getHip
public int getHip()Description copied from interface:IStarFocus
Returns the HIP number of this star, or negative if it has no HIP number- Specified by:
getHip
in interfaceIStarFocus
- Returns:
- The HIP number
-
getClosestDistToCamera
public double getClosestDistToCamera()Description copied from interface:IFocus
Same asIFocus.getDistToCamera()
.- Specified by:
getClosestDistToCamera
in interfaceIFocus
- Specified by:
getClosestDistToCamera
in interfaceIStarFocus
- Overrides:
getClosestDistToCamera
in classCelestialBody
- Returns:
- The distance to the camera in internal units.
-
getClosestName
Description copied from interface:IFocus
Same asIFocus.getName()
.- Specified by:
getClosestName
in interfaceIFocus
- Specified by:
getClosestName
in interfaceIStarFocus
- Overrides:
getClosestName
in classCelestialBody
- Returns:
- The name.
-
getClosestPos
Description copied from interface:IStarFocus
Returns the position of the closest star in camera coordinates- Specified by:
getClosestPos
in interfaceIStarFocus
- Parameters:
out
- The out vector- Returns:
- The out vector with the position
-
getClosestAbsolutePos
Description copied from interface:IFocus
Same asIFocus.getAbsolutePosition(Vector3b)
.- Specified by:
getClosestAbsolutePos
in interfaceIFocus
- Specified by:
getClosestAbsolutePos
in interfaceIStarFocus
- Overrides:
getClosestAbsolutePos
in 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:IStarFocus
Returns the color of the closest star- Specified by:
getClosestCol
in interfaceIStarFocus
- Returns:
- The color in rgb
-
getClosestSize
public double getClosestSize()Description copied from interface:IStarFocus
Returns the size of the closest star- Specified by:
getClosestSize
in interfaceIStarFocus
- Returns:
- The size of the closest star
-
getMuAlpha
public double getMuAlpha()Description copied from interface:IProperMotion
Returns the mu alpha in mas/yr- Specified by:
getMuAlpha
in interfaceIProperMotion
- Returns:
- The mu alpha in mas/yr
-
getMuDelta
public double getMuDelta()Description copied from interface:IProperMotion
Returns the mu delta in mas/yr- Specified by:
getMuDelta
in interfaceIProperMotion
- Returns:
- The mu delta in mas/yr
-
getRadialVelocity
public double getRadialVelocity()Description copied from interface:IProperMotion
Returns the radial velocity in km/s- Specified by:
getRadialVelocity
in interfaceIProperMotion
- Returns:
- The radial velocity in km/s
-
getLineWidth
public float getLineWidth()- Specified by:
getLineWidth
in interfaceILineRenderable
-
setBillboardRenderGroup
-