Class OrbitElementsSet
java.lang.Object
gaiasky.scene.component.OrbitElementsSet
- All Implemented Interfaces:
com.badlogic.ashley.core.Component
Aggregates children entities (typically orbits) so that they are treated as one,
especially in terms of GPU draw calls.
-
Field Summary
FieldsModifier and TypeFieldDescriptioncom.badlogic.gdx.utils.Array<com.badlogic.ashley.core.Entity> protected final Vector3QintCandidate to focus.floatNoise factor for the color in [0,1].protected final Vector3Dprotected final Vector3DPointer to the data file.Reference to the current focus.doubleFOCUS_MODE attributes.intIndex of the particle acting as focus.Position of the current focus.Position in equatorial coordinates of the current focus in radians.doubleFOCUS_MODE attributes.doubleFOCUS_MODE attributes.doubleFOCUS_MODE attributes.Name to array index.booleandouble[]Particle size limits for the quad renderer (using quads as GL_TRIANGLES).Particle data.floatProfile decay of the particles in the shader, when using quads and plainParticleSet.ShadingType.Fully qualified name of data provider class.The shading type, for lighting the particles.doubleThe noise in the size determination for particles.floatControls how sharply the sphere edges darken (higher values = more pronounced sphere appearance with darker edges).com.badlogic.gdx.graphics.TextureArrayReference to the texture array containing the textures for this set, if any.The texture attribute is an attribute in the original table that points to the texture to use.String[]Texture files to use for rendering the particles, at random. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondata()Returns the list of particles.fetchPositionDouble(IParticleRecord p, Vector3Q camPos, Vector3D out, Instant t) generateIndex(List<IParticleRecord> pointData) Generates the index (maps name to array index) and computes the geometric center of this groupgetAbsolutePosition(IParticleRecord object, Instant date, Vector3Q out) Returns the position of the given object at the given date, if any, in the out vector.Returns the current focus position, if any, in the out vector.getAbsolutePosition(String name, Instant date, Vector3Q out) Returns the position of the object with the given name at the given date, if any, in the out vector.getAbsolutePosition(Instant date, Vector3Q out) Returns the current focus position at the given date, if any, in the out vector.doublegetAlpha()longdoublegetDelta()doubledoubleDefault size if not in data, 1e5 kmlonggetId()getName()String[]getNames()doubledoublegetRadius(int i) doublegetSize()doublegetSize(int i) Returns the size of the particle at index idoubledoublebooleanbooleanvoidvoidmarkForUpdate(Render render) voidRegenerates the name indexvoidsetColornoise(Double colorNoise) voidsetColorNoise(Double colorNoise) voidsetData(List<IParticleRecord> pointData, boolean regenerateIndex) voidsetDataFile(String dataFile) voidsetFocusIndex(int index) voidsetFocusIndex(String name) voidsetParticlesizelimits(double[] sizeLimits) voidsetParticleSizeLimits(double[] sizeLimits) voidsetParticleSizeLimitsDeg(double[] sizeLimits) voidsetPointData(List<IParticleRecord> pointData) voidsetProfiledecay(Double profiledecay) Deprecated.voidsetProfileDecay(Double profileDecay) voidsetShadingType(int type) voidsetShadingType(String type) voidsetSizeNoise(Double sizeNoise) Set the size noise.voidsetSphericalPower(Double power) voidsetTexture(String texture) voidsetTextureAttribute(String textureAttribute) voidsetTextures(String[] textures) voidupdateFocus(ICamera camera) Updates the parameters of the focus, if the focus is active in this groupvoid
-
Field Details
-
B31
-
D31
-
D32
-
alwaysUpdate
public com.badlogic.gdx.utils.Array<com.badlogic.ashley.core.Entity> alwaysUpdate -
initialUpdate
public boolean initialUpdate -
pointData
Particle data. -
focus
Reference to the current focus. -
focusIndex
public int focusIndexIndex of the particle acting as focus. Negative if we have no focus here. -
candidateFocusIndex
public int candidateFocusIndexCandidate to focus. -
focusPosition
Position of the current focus. -
focusPositionSph
Position in equatorial coordinates of the current focus in radians. -
focusDistToCamera
public double focusDistToCameraFOCUS_MODE attributes. -
focusSolidAngle
public double focusSolidAngleFOCUS_MODE attributes. -
focusSolidAngleApparent
public double focusSolidAngleApparentFOCUS_MODE attributes. -
focusSize
public double focusSizeFOCUS_MODE attributes. -
index
Name to array index. -
profileDecay
public float profileDecayProfile decay of the particles in the shader, when using quads and plainParticleSet.ShadingType. -
colorNoise
public float colorNoiseNoise factor for the color in [0,1]. -
provider
Fully qualified name of data provider class. -
datafile
Pointer to the data file. -
sizeNoise
public double sizeNoiseThe noise in the size determination for particles. This only has effect if particles themselves do not provide a size. In that case, the final size is computed asclamp(body.size + rand.gaussian() * body.size * sizeNoise). -
particleSizeLimits
public double[] particleSizeLimitsParticle size limits for the quad renderer (using quads as GL_TRIANGLES). This will be multiplied by the distance to the particle in the shader, so thatsize = tan(angle) * dist. -
textureAttribute
The texture attribute is an attribute in the original table that points to the texture to use. Ideally, it should be an integer value from 1 to n, where n is the number of textures. -
textureFiles
Texture files to use for rendering the particles, at random. Applies only to quads. -
textureArray
public com.badlogic.gdx.graphics.TextureArray textureArrayReference to the texture array containing the textures for this set, if any. Applies only to quads. -
shadingType
The shading type, for lighting the particles. -
sphericalPower
public float sphericalPowerControls how sharply the sphere edges darken (higher values = more pronounced sphere appearance with darker edges).
-
-
Constructor Details
-
OrbitElementsSet
public OrbitElementsSet()
-
-
Method Details
-
markForUpdate
-
data
Returns the list of particles. -
setDataFile
-
setData
-
setPointData
-
setProfileDecay
-
setProfiledecay
Deprecated. -
setColorNoise
-
setColornoise
-
setSizeNoise
Set the size noise. -
setParticleSizeLimitsDeg
public void setParticleSizeLimitsDeg(double[] sizeLimits) -
setParticleSizeLimits
public void setParticleSizeLimits(double[] sizeLimits) -
setParticlesizelimits
public void setParticlesizelimits(double[] sizeLimits) -
setTextureAttribute
-
setTexture
-
setTextures
-
setShadingType
public void setShadingType(int type) -
setShadingType
-
setSphericalPower
-
regenerateIndex
public void regenerateIndex()Regenerates the name index -
generateIndex
Generates the index (maps name to array index) and computes the geometric center of this group- Parameters:
pointData- The data- Returns:
- An map{string,int} mapping names to indices
-
setFocusIndex
-
getId
public long getId() -
getName
-
getNames
-
hasName
-
hasName
-
getLocalizedName
-
getCandidateId
public long getCandidateId() -
getCandidateName
-
getPosSph
-
getAlpha
public double getAlpha() -
getDelta
public double getDelta() -
getDistToCamera
public double getDistToCamera() -
getSolidAngle
public double getSolidAngle() -
getSolidAngleApparent
public double getSolidAngleApparent() -
fetchPositionDouble
-
getAbsolutePosition
-
getAbsolutePosition
-
getAbsolutePosition
Returns the position of the object with the given name at the given date, if any, in the out vector.- Parameters:
date- The date at which to get the position. If null, the position is given at the current simulation date.out- The out vector.
-
getAbsolutePosition
Returns the position of the given object at the given date, if any, in the out vector.- Parameters:
object- The particle record object.date- The date at which to get the position. If null, the position is given at the current simulation date.out- The out vector.
-
getSize
public double getSize() -
getSize
public double getSize(int i) Returns the size of the particle at index i- Parameters:
i- The index- Returns:
- The size
-
getRadius
public double getRadius() -
getRadius
public double getRadius(int i) -
getFocusSize
public double getFocusSize()Default size if not in data, 1e5 km- Returns:
- The size
-
updateFocus
Updates the parameters of the focus, if the focus is active in this group- Parameters:
camera- The current camera
-
updateFocusDataPos
public void updateFocusDataPos() -
setFocusIndex
public void setFocusIndex(int index) -
makeFocus
public void makeFocus()
-
setProfileDecay(Double).