Package gaiasky.scenegraph
Class Star
java.lang.Object
gaiasky.scenegraph.SceneGraphNode
gaiasky.scenegraph.CelestialBody
gaiasky.scenegraph.Particle
gaiasky.scenegraph.Star
- All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable
,I3DTextRenderable
,ILineRenderable
,IModelRenderable
,IQuadRenderable
,IRenderable
,IFocus
,IProperMotion
,IStarContainer
,IStarFocus
,IVisibilitySwitch
,IPosition
Represents a single star. Used for star systems with single star objects having
children nodes.
-
Nested Class Summary
Nested classes/interfaces inherited from class gaiasky.scenegraph.Particle
Particle.ParamUpdater
-
Field Summary
FieldsFields inherited from class gaiasky.scenegraph.Particle
catalogSource, computedSize, DISC_FACTOR, fovFactor, innerRad, paramUpdater, pm, pmSph, thdownOverFovfactor, thpointTimesFovfactor, thupOverFovfactor
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
ConstructorsConstructorDescriptionStar()
Star
(Vector3b pos, float appMag, float absMag, float colorBV, String[] names, float ra, float dec, long starID) Creates a new Star objectStar
(Vector3b pos, float appMag, float absMag, float colorBV, String[] names, float ra, float dec, long starID, int hip, byte source) Creates a new Star objectStar
(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) Creates a new Star objectStar
(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, int hip, byte source) Creates a new Star object -
Method Summary
Modifier and TypeMethodDescriptionvoid
addHit
(int screenX, int screenY, int w, int h, int minPixDist, NaturalCamera camera, com.badlogic.gdx.utils.Array<IFocus> hits) Adds this focus to the hits list if it is hit by the [screenX, screenY] position.protected void
addToIndex
(Map<String, SceneGraphNode> map) Special actions to be taken for this object when adding to the index.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 double
computeViewAngle
(float fovFactor) void
doneLoading
(com.badlogic.gdx.assets.AssetManager manager) int
getHip()
Returns the HIP number of this star, or negative if it has no HIP numberdouble
getPmX()
double
getPmY()
double
getPmZ()
void
protected void
Special actions to be taken for this object when removing from the index.void
render
(IntModelBatch modelBatch, float alpha, double t, RenderingContext renderContext, SceneGraphRenderer.RenderGroup group) Model renderingprotected void
toString()
Methods inherited from class gaiasky.scenegraph.Particle
addToRender, checkHitCondition, forceUpdateLocalValues, getCatalogSource, getClosestAbsolutePos, getClosestCol, getClosestDistToCamera, getClosestName, getClosestPos, getClosestSize, getFuzzyRenderSize, getGlPrimitive, getInnerRad, getLineWidth, getMuAlpha, getMuDelta, getRadialVelocity, getRadius, getSimpleCopy, getStarCount, getThOverFactorScl, isStar, labelSizeConcrete, render, renderText, setBillboardRenderGroup, setRGB, update, update, updateLocalValues
Methods inherited from class gaiasky.scenegraph.CelestialBody
addFocusableObjects, addHit, checkClickDistance, getAbsmag, getAppmag, getCandidateId, getCandidateName, getCandidateViewAngleApparent, getFocus, getOrientationQuaternion, 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, 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, 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, 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, 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
-
hip
public int hipHIP number, negative if non-existent
-
-
Constructor Details
-
Star
public Star() -
Star
-
Star
public Star(Vector3b pos, float appMag, float absMag, float colorBV, String[] names, float ra, float dec, long starID) Creates a new Star object- Parameters:
pos
- The position of the star in equatorial cartesian coordinatesappMag
- The apparent magnitudeabsMag
- The absolute magnitudecolorBV
- The B-V color indexnames
- The proper names of the star, if anyra
- in degreesdec
- in degreesstarID
- The star id
-
Star
public Star(Vector3b pos, float appMag, float absMag, float colorBV, String[] names, float ra, float dec, long starID, int hip, byte source) Creates a new Star object- Parameters:
pos
- The position of the star in equatorial cartesian coordinatesappMag
- The apparent magnitudeabsMag
- The absolute magnitudecolorBV
- The B-V color indexnames
- The proper names of the star, if anyra
- in degreesdec
- in degreesstarID
- The star idhip
- The HIP identifiersource
- Catalog source. 1: Gaia, 2: HIP, 3: TYC, -1: Unknown
-
Star
public Star(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) Creates a new Star object- Parameters:
pos
- The position of the star in equatorial cartesian coordinatespm
- The proper motion of the star in equatorial cartesian coordinatespmSph
- The proper motion with muAlpha, muDelta, radVel.appMag
- The apparent magnitudeabsMag
- The absolute magnitudecolorBV
- The B-V color indexnames
- The proper names of the star, if anyra
- in degreesdec
- in degreesstarID
- The star id
-
Star
public Star(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, int hip, byte source) Creates a new Star object- Parameters:
pos
- The position of the star in equatorial cartesian coordinatespm
- The proper motion of the star in equatorial cartesian coordinatespmSph
- The proper motion with muAlpha, muDelta, radVel.appMag
- The apparent magnitudeabsMag
- The absolute magnitudecolorBV
- The B-V color indexnames
- The proper names of the star, if anyra
- in degreesdec
- in degreesstarID
- The star idhip
- HIP number, if anysource
- Catalog source. 1: Gaia, 2: HIP, 3: TYC, -1: Unknown
-
-
Method Details
-
initialize
public void initialize()- Overrides:
initialize
in classParticle
-
setDerivedAttributes
protected void setDerivedAttributes()- Overrides:
setDerivedAttributes
in classParticle
-
doneLoading
public void doneLoading(com.badlogic.gdx.assets.AssetManager manager) - Overrides:
doneLoading
in classParticle
-
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 classParticle
-
render
public void render(IntModelBatch modelBatch, float alpha, double t, RenderingContext renderContext, SceneGraphRenderer.RenderGroup group) Description copied from class:Particle
Model rendering- Specified by:
render
in interfaceIModelRenderable
- Overrides:
render
in classParticle
-
addHit
public void addHit(int screenX, int screenY, int w, int h, int minPixDist, NaturalCamera camera, com.badlogic.gdx.utils.Array<IFocus> hits) Description copied from interface:IFocus
Adds this focus to the hits list if it is hit by the [screenX, screenY] position.- Specified by:
addHit
in interfaceIFocus
- Overrides:
addHit
in classCelestialBody
- Parameters:
screenX
- The x position of the hit.screenY
- The y position of the hit.w
- The viewport width.h
- The viewport height.minPixDist
- The minimum pixel distance to consider as hit.camera
- The camera.hits
- The list where to add the element.
-
toString
- Overrides:
toString
in classSceneGraphNode
-
getPmX
public double getPmX()- Overrides:
getPmX
in classCelestialBody
-
getPmY
public double getPmY()- Overrides:
getPmY
in classCelestialBody
-
getPmZ
public double getPmZ()- Overrides:
getPmZ
in classCelestialBody
-
computeViewAngle
protected double computeViewAngle(float fovFactor) - Overrides:
computeViewAngle
in classCelestialBody
-
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
- Overrides:
getHip
in classParticle
- Returns:
- The HIP number
-
addToIndex
Description copied from class:SceneGraphNode
Special actions to be taken for this object when adding to the index.- Overrides:
addToIndex
in classSceneGraphNode
- Parameters:
map
- The index.
-
removeFromIndex
Description copied from class:SceneGraphNode
Special actions to be taken for this object when removing from the index. Must implement if addToIndex is implemented.- Overrides:
removeFromIndex
in classSceneGraphNode
- Parameters:
map
- The index.
-