Package gaiasky.scene.component
Class Body
java.lang.Object
gaiasky.scene.component.Body
- All Implemented Interfaces:
com.badlogic.ashley.core.Component
,ICopy
-
Field Summary
Modifier and TypeFieldDescriptionfloat[]
Base RGB colordouble
The 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.boolean
Flag to control whether the position of this object has been set in a script.Position in the equatorial system; ra, dec.float
Body size in internal units.boolean
This flag indicates whether the size has already been set using the correct units.boolean
This flag enables backwards-compatibility.double
The view angle, in radians.double
The view angle corrected with the field of view angle, in radians. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncom.badlogic.ashley.core.Component
getCopy
(com.badlogic.ashley.core.Engine engine) void
setColor
(double[] color) Sets the object color, as an RGBA double array.void
setColor
(float[] color) Sets the object color, as an RGBA float array.void
setDiameter
(Double diameter) void
setDiameterKm
(Double diameterKm) void
setDiameterPc
(Double diameterPc) void
setLabelcolor
(double[] color) Deprecated.void
setLabelcolor
(float[] color) Deprecated.void
setLabelColor
(double[] color) Sets the label color, as an RGBA double array.void
setLabelColor
(float[] color) Sets the label color, as an RGBA float array.void
setPos
(double[] pos) void
void
setPosition
(double[] pos) void
setPosition
(int[] pos) void
setPositionKm
(double[] pos) void
setPositionPc
(double[] pos) void
setPosKm
(double[] pos) void
setPosPc
(double[] pos) void
void
setRadiusKm
(Double radiusKm) void
setRadiusPc
(Double radiusPc) void
void
void
void
void
void
void
Sets 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 aProperMotion
component, the proper motion is applied for the current time. The position at epoch is kept inposEpoch
. The absolute position is held atGraphNode.translation
. -
posEpoch
A copy of the original position, if any. If the entity has aProperMotion
component, 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)
-