Package gaiasky.scene.component
Class Body
java.lang.Object
gaiasky.scene.component.Body
- All Implemented Interfaces:
com.badlogic.ashley.core.Component,ICopy
-
Field Summary
FieldsModifier and TypeFieldDescriptionfloat[]Base RGB colordoubleThe distance to the camera from the focus center.float[]Position of this entity in the local reference system and internal units.A copy of the original position, if any.booleanFlag to control whether the position of this object has been set in a script.Position in the equatorial system; ra, dec.floatBody size in internal units.booleanThis flag indicates whether the size has already been set using the correct units.booleanThis flag enables backwards-compatibility.doubleThe view angle, in radians.doubleThe view angle corrected with the field of view angle, in radians. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.badlogic.ashley.core.ComponentgetCopy(com.badlogic.ashley.core.Engine engine) voidsetColor(double[] color) Sets the object color, as an RGBA double array.voidsetColor(float[] color) Sets the object color, as an RGBA float array.voidsetDiameter(Double diameter) voidsetDiameterKm(Double diameterKm) voidsetDiameterPc(Double diameterPc) voidsetLabelcolor(double[] color) Deprecated.voidsetLabelcolor(float[] color) Deprecated.voidsetLabelColor(double[] color) Sets the label color, as an RGBA double array.voidsetLabelColor(float[] color) Sets the label color, as an RGBA float array.voidsetPos(double[] pos) voidvoidsetPosition(double[] pos) voidsetPosition(int[] pos) voidsetPositionKm(double[] pos) voidsetPositionPc(double[] pos) voidsetPosKm(double[] pos) voidsetPosPc(double[] pos) voidvoidsetRadiusKm(Double radiusKm) voidsetRadiusPc(Double radiusPc) voidvoidvoidvoidvoidvoidvoidSets the position at epoch as a copy of the position.
-
Field Details
-
pos
Position of this entity in the local reference system and internal units. This holds the position of the entity in the reference system of its parent. It is not the absolute position. If the entity has aProperMotioncomponent, the proper motion is applied for the current time. The position at epoch is kept inposEpoch. -
posEpoch
A copy of the original position, if any. If the entity has aProperMotioncomponent, this is the position at epochProperMotion.epochJd. -
posSph
Position in the equatorial system; ra, dec. -
size
public float sizeBody size in internal units. -
sizeInUnitsFlag
public boolean sizeInUnitsFlagThis flag indicates whether the size has already been set using the correct units. This is for backward compatibility with the data files. -
sizeIsRadiusFlag
public boolean sizeIsRadiusFlagThis flag enables backwards-compatibility. When true, the body size is assumed to be a radius, and will be doubled in the initialization. Setting the size using any of the setRadius() methods sets this to false. -
distToCamera
public double distToCameraThe distance to the camera from the focus center. -
solidAngle
public double solidAngleThe view angle, in radians. -
solidAngleApparent
public double solidAngleApparentThe view angle corrected with the field of view angle, in radians. -
color
public float[] colorBase RGB color -
labelColor
public float[] labelColor -
positionSetInScript
public boolean positionSetInScriptFlag to control whether the position of this object has been set in a script.
-
-
Constructor Details
-
Body
public Body()
-
-
Method Details
-
setPos
-
setPos
public void setPos(double[] pos) -
setPosition
public void setPosition(double[] pos) -
setPosKm
public void setPosKm(double[] pos) -
setPositionKm
public void setPositionKm(double[] pos) -
setPosPc
public void setPosPc(double[] pos) -
setPositionPc
public void setPositionPc(double[] pos) -
setPosition
public void setPosition(int[] pos) -
updatePosEpoch
public void updatePosEpoch()Sets the position at epoch as a copy of the position. This is usually done at initialization only. -
setSize
-
setSizeKm
-
setSizepc
-
setSizePc
-
setSizeM
-
setSizeAU
-
setRadius
-
setRadiusKm
-
setRadiusPc
-
setDiameter
-
setDiameterKm
-
setDiameterPc
-
setColor
public void setColor(double[] color) Sets the object color, as an RGBA double array.- Parameters:
color- The color.
-
setColor
public void setColor(float[] color) Sets the object color, as an RGBA float array.- Parameters:
color- The color.
-
setLabelColor
public void setLabelColor(double[] color) Sets the label color, as an RGBA double array.- Parameters:
color- The label color.
-
setLabelcolor
Deprecated. -
setLabelColor
public void setLabelColor(float[] color) Sets the label color, as an RGBA float array.- Parameters:
color- The label color.
-
setLabelcolor
Deprecated. -
getCopy
public com.badlogic.ashley.core.Component getCopy(com.badlogic.ashley.core.Engine engine)
-