Class StarSet
java.lang.Object
gaiasky.scene.component.ParticleSet
gaiasky.scene.component.StarSet
- All Implemented Interfaces:
com.badlogic.ashley.core.Component, IDisposable
Contains the parameters for star sets. These are groups of stars that are rendered together.
-
Nested Class Summary
Nested classes/interfaces inherited from class ParticleSet
ParticleSet.RenderTarget, ParticleSet.ShadingStyle, ParticleSet.ShadingTypeModifier and TypeClassDescriptionstatic enumstatic enumControls whether the brightness twinkles.static enumShading type, for lighting the particles. -
Field Summary
FieldsModifier and TypeFieldDescriptiondoubleintNumber of particles to render as a billboard for this group.doubleEpoch for the times in the light curves in julian days.booleanDoes this contain variable stars?Fields inherited from class ParticleSet
addedToMainIndex, allowStreaks, ambientLight, B31, B32, candidateFocusIndex, ccMax, ccMin, colorFromTexture, colorNoise, columnInfoList, cPosD, currDeltaYears, D31, D32, datafile, disposed, entity, epochJd, factor, fixedAngularSize, focus, focusDistToCamera, focusIndex, focusPosition, focusPositionSph, focusSize, focusSolidAngle, focusSolidAngleApparent, generateIndex, index, indices, invisibilityArray, isElements, isExtended, isStars, labelColors, labelDisplayAlways, labelDisplayNever, lastSortCameraPos, lastSortTime, mat, maxDistance, meanDistance, meanPosition, metadata, minDistance, model, modelFile, modelParams, modelPrimitive, modelType, numLabels, particleSizeLimits, pointData, profileDecay, provider, providerParams, proximity, proximityDescriptorsLocation, proximityDescriptorsPath, proximityLoaded, proximityLoadingFlag, proximityLoadOnFocus, proximityMissing, proximityThreshold, renderParticleLabels, renderParticles, renderSetLabel, renderTarget, shadingStyle, shadingType, sizeNoise, sphericalPower, textureArray, textureAttribute, textureFiles, updaterTaskModifier and TypeFieldDescriptionbooleanFlag that flips when the particle set has been added to the main index.booleanWhether to allow the star streaks effect, where particles get stretched in the direction of motion when the camera moves.floatAmbient light for billboard and spherical lighting.protected final Vector3Qprotected final Vector3QintCandidate to focus.float[]Mapping colors.float[]Mapping colors.booleanAssign a different color to each texture.floatNoise factor for the color in [0,1].List<uk.ac.starlink.table.ColumnInfo> List ofColumnInfoobjects for the data in this set.Last sort position.doubleCurrent computed epoch time.protected final Vector3Dprotected final Vector3DPath of data file.booleanSet has been disposed.com.badlogic.ashley.core.EntityReference to the entity.doubleEpoch for positions/proper motions in julian days.Factor to apply to the data points, usually to normalize distances.doubleFixed angular size for all particles in this set, in radians.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.booleanWhether to generate an index or not.Name to array index.int[]Indices buffer.com.badlogic.gdx.utils.IntSetIndices of stars that are not visible.booleanFlag indicating whether the particle set holds Keplerian elements particles (typeParticleKepler).booleanFlag indicating whether the particle set holds extended particles.booleanFlag indicating whether the particle set holds stars or particles (extended or not).com.badlogic.gdx.utils.IntMap<float[]> Particles with special label colors.com.badlogic.gdx.utils.IntSetIndices of particles for whichlabelDisplayis set toLabel.LabelDisplay.ALWAYS.com.badlogic.gdx.utils.IntSetIndices of particles for whichlabelDisplayis set toLabel.LabelDisplay.NEVER.Last sort position.doubleStores the time when the last sort operation finished, in seconds.protected final Matrix4DAuxiliary matrix.doubledoubleThe mean distance from the origin of all points in this group.Temporary storage for the mean position of this particle set, if it is given externally.double[]Metadata, for sorting - holds distances from each particle to the camera, squared.doubleThe loaded model pointed by modelFile.Model file to use (obj,g3db,g3dj,gltf,glb).Parameters for the model, in case 'modelType' is used.intRender primitive.Default model type to use for the particles of this set.intNumber of labels to render for this group.double[]Particle size limits for the quad renderer (using quads as GL_TRIANGLES).List that contains the point data.floatProfile decay of the particles in the shader, when using quads and plainParticleSet.ShadingType.Fully qualified name of data provider class.Parameters for the data provider.Proximity particles.Proximity loading location, the location of the directory that contains descriptor JSON files with the name of objects in the dataset.The path for proximity loading.com.badlogic.gdx.utils.IntSetSet that contains the indexes of the particles whose descriptors have already been loaded.booleanFlag that indicates whether this particle set has proximity loading.booleanFlag that indicates whether loading should also happen on focus.com.badlogic.gdx.utils.IntSetContains the indices of the particles whose descriptors are not present.doubleThreshold solid angle when loading happens.booleanWhether to render particle labels at all for this set.booleanThis flag enables muting particle rendering.booleanWhether to render the global set label or not.Render target for the particles of this set.Shading style to use for this set.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.Updater task. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoublefloat[]doublegetClosestPos(Vector3D out) doubleintgetHip()doublegetSolidAngleApparent(int index) Returns the apparent solid angle of the star with the given index.voidmarkForUpdate(Render render) voidsetVariabilityEpoch(Double epochJd) Sets the light curve epoch to use for the stars in this group.voidsetVariabilityEpochJd(Double epochJd) Sets the light curve epoch to use for the stars in this group.voidupdateFocus(ICamera camera) Updates the parameters of the focus, if the focus is active in this group.Methods inherited from class ParticleSet
canSelect, data, dispose, fetchPosition, fetchPositionDouble, generateIndex, get, getAbsolutePosition, getAbsolutePosition, getAbsolutePosition, getAbsolutePosition, getAbsolutePosition, getAbsolutePosition, getAlpha, getCandidateBean, getCandidateId, getCandidateName, getClosestLocalizedName, getClosestName, getColorMax, getColorMin, getDelta, getDeltaYears, getDistToCamera, getFirstParticleName, getFocusSize, getId, getLocalizedName, getMaxDistance, getMeanDistance, getMinDistance, getName, getNames, getNextSequence, getPosSph, getRadius, getRadius, getSize, getSize, getSolidAngle, getSolidAngleApparent, getTEff, hasName, hasName, isBillboard, isForceLabel, isModel, isRenderLabel, isRenderLabel, isVisible, isWireframe, makeFocus, regenerateIndex, setAmbientLight, setColorFromTexture, setColorMax, setColorMax, setColorMin, setColorMin, setColornoise, setColorNoise, setColumnInfoList, setData, setData, setDatafile, setDataFile, setDescriptorsLocation, setEpoch, setEpochJd, setExtended, setFactor, setFixedAngularSize, setFixedAngularSizeDeg, setFixedAngularSizeRad, setFocusIndex, setFocusIndex, setForceLabel, setGenerateIndex, setLabelColor, setLabelDisplay, setMeanPosition, setMeanPositionKm, setMeanPositionPc, setModelParams, setModelPrimitive, setModelType, setNumLabels, setParticlesizelimits, setParticleSizeLimits, setParticleSizeLimitsDeg, setPosition, setPosition, setPositionKm, setPositionPc, setPosKm, setPosPc, setProfiledecay, setProfileDecay, setProviderparams, setProviderParams, setProximityDescriptors, setProximityDescriptorsLocation, setProximityLoadOnFocus, setProximityThreshold, setProximityThresholdDeg, setProximityThresholdRad, setRenderLabel, setRenderParticles, setRenderSetLabel, setRenderTarget, setRenderTarget, setShadingStyle, setShadingType, setShadingType, setSizeNoise, setSphericalPower, setTexture, setTextureAttribute, setTextures, setUniformEpoch, setVisible, setVisible, updateFocusDataPos, updateNumLabelsValueModifier and TypeMethodDescriptionbooleancanSelect(FilterView view) data()Returns the list of particles.voiddispose(com.badlogic.ashley.core.Entity entity) fetchPosition(IParticleRecord pb, Vector3Q camPos, Vector3Q out, double deltaYears) Fetches the real position of the particle.fetchPositionDouble(IParticleRecord pb, Vector3Q camPos, Vector3D out, double deltaYears) Fetches the real position of the particle.generateIndex(List<IParticleRecord> pointData) Generates the index (maps name to array index) and computes the geometric center of this groupget(int index) getAbsolutePosition(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, Vector3D out) Returns the absolute position of the particle with the given name.getAbsolutePosition(String name, Vector3Q out) Returns the absolute position of the particle with the given name.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()longfloat[]float[]doublegetDelta()doubleReturns the delta years to integrate the proper motion.doubleGets the name of a random particle in this groupdoubleDefault size if not in data, 1e5 kmlonggetId()doubledoubledoublegetName()String[]getNames()static longdoubledoublegetRadius(int i) doublegetSize()doublegetSize(int i) Returns the size of the particle at index idoubledoubledoublegetTEff()booleanbooleanbooleanbooleanisForceLabel(String name) booleanisModel()booleanisRenderLabel(int idx) booleanisRenderLabel(String name) booleanisVisible(int index) Checks whether the particle with the given index is visiblebooleanvoidvoidRegenerates the name indexvoidsetAmbientLight(Double ambient) voidsetColorFromTexture(boolean colorFromTexture) voidsetColorMax(double[] colorMax) voidsetColorMax(float[] colorMax) voidsetColorMin(double[] colorMin) voidsetColorMin(float[] colorMin) voidsetColornoise(Double colorNoise) Deprecated.voidsetColorNoise(Double colorNoise) voidsetColumnInfoList(List<uk.ac.starlink.table.ColumnInfo> columnInfoList) voidsetData(List<IParticleRecord> pointData) voidsetData(List<IParticleRecord> pointData, boolean regenerateIndex) voidsetDatafile(String dataFile) voidsetDataFile(String dataFile) voidvoidSets the epoch to use for the stars in this set.voidsetEpochJd(Double epochJd) Sets the epoch to use for the stars in this set.voidsetExtended(Boolean extended) voidvoidsetFixedAngularSize(Double fixedAngularSize) Set fixed angular size, in radians.voidsetFixedAngularSizeDeg(Double fixedAngularSizeDeg) Set fixed angular size, in degrees.voidsetFixedAngularSizeRad(Double fixedAngularSizeRad) Set fixed angular size, in radians.voidsetFocusIndex(int index) voidsetFocusIndex(String name) voidsetForceLabel(Boolean forceLabel, String name) voidsetGenerateIndex(boolean generateIndex) voidsetLabelColor(float[] color, String name) voidsetLabelDisplay(Label.LabelDisplay state, String name) voidsetMeanPosition(double[] pos) voidsetMeanPositionKm(double[] pos) voidsetMeanPositionPc(double[] pos) voidsetModelParams(Map<String, Object> params) voidsetModelPrimitive(String modelPrimitive) voidsetModelType(String modelType) voidsetNumLabels(Long numLabels) voidsetParticlesizelimits(double[] sizeLimits) voidsetParticleSizeLimits(double[] sizeLimits) voidsetParticleSizeLimitsDeg(double[] sizeLimits) voidsetPosition(double[] pos) voidsetPosition(int[] pos) voidsetPositionKm(double[] pos) voidsetPositionPc(double[] pos) voidsetPosKm(double[] pos) voidsetPosPc(double[] pos) voidsetProfiledecay(Double profiledecay) Deprecated.voidsetProfileDecay(Double profileDecay) voidsetProviderparams(Map<String, Object> params) voidsetProviderParams(Map<String, Object> params) voidvoidvoidsetProximityLoadOnFocus(Boolean proxLoadOnFocus) voidsetProximityThreshold(Double thRadians) voidsetProximityThresholdDeg(Double thDegrees) voidsetProximityThresholdRad(Double thRadians) voidsetRenderLabel(Boolean renderLabel, String name) voidsetRenderParticles(Boolean renderParticles) voidsetRenderSetLabel(Boolean renderSetLabel) voidsetRenderTarget(Long renderTarget) voidsetRenderTarget(String renderTarget) voidsetShadingStyle(String style) 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) voidsetUniformEpoch(boolean uniformEpoch) voidsetVisible(boolean visible, String name, Render render) voidsetVisible(int index, boolean visible, Render render) Sets the visibility of the particle with the given index.voidvoidupdateNumLabelsValue(int n, com.badlogic.ashley.core.Entity e)
-
Field Details
-
variabilityEpochJd
public double variabilityEpochJdEpoch for the times in the light curves in julian days. -
modelDist
public double modelDist -
variableStars
public boolean variableStarsDoes this contain variable stars? -
numBillboards
public int numBillboardsNumber of particles to render as a billboard for this group.
-
-
Constructor Details
-
StarSet
public StarSet()
-
-
Method Details
-
updateFocus
Updates the parameters of the focus, if the focus is active in this group. This version is special for star sets, and uses the double-precision version of fetchPosition() for speed.- Overrides:
updateFocusin classParticleSet- Parameters:
camera- The current camera
-
setVariabilityEpoch
Sets the light curve epoch to use for the stars in this group.- Parameters:
epochJd- The light curve epoch in julian days (days since January 1, 4713 BCE).
-
setVariabilityEpochJd
Sets the light curve epoch to use for the stars in this group.- Parameters:
epochJd- The light curve epoch in julian days (days since January 1, 4713 BCE).
-
getHip
public int getHip() -
getCandidateSolidAngleApparent
public double getCandidateSolidAngleApparent()- Overrides:
getCandidateSolidAngleApparentin classParticleSet
-
getSolidAngleApparent
public double getSolidAngleApparent(int index) Returns the apparent solid angle of the star with the given index.- Overrides:
getSolidAngleApparentin classParticleSet- Parameters:
index- The index in the star list.- Returns:
- The apparent solid angle.
-
getClosestDistToCamera
public double getClosestDistToCamera() -
getClosestSize
public double getClosestSize() -
getClosestPos
-
getClosestAbsolutePos
-
getClosestCol
public float[] getClosestCol() -
markForUpdate
- Overrides:
markForUpdatein classParticleSet
-
ParticleSet.setColorNoise(Double).