Class BillboardDataset
java.lang.Object
gaiasky.scene.record.BillboardDataset
A dataset composed of a single set of billboard-like particles.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumChannel types.static enumParticle distributions.static enumVertical dispersion profile, withheightScaleas base. -
Field Summary
FieldsModifier and TypeFieldDescriptionfloatStandard deviation across arm.floatBar aspect ratio, e.g.floatSpiral arm pitch angle in degrees.float[]Base color(s) for the particles of this dataset.floatBase radius of this dataset.The blending mode.floatColor randomness to apply to the base colors to generate the final particle colors.float[]Array with completion rate per texture quality (to skip data).List of particle records with the particles of this dataset.booleanWhether to allow depth writes when rendering.Probability distribution, for procedural datasets.float[]Eccentricities for density wave [1] and ellipsoid [2].Path to the file containing the particle data.Unpacked file path.Current CPU generation status for this dataset.Height (vertical) profile.floatHeight scale.floatThe intensity factor.int[]Texture layers to use.double[]Maximum particle size for each texture quality mode.floatMinimum radius to generate particles.intNumber of spiral arms.intNumber of particles to generate with procedural generation.com.badlogic.gdx.math.Vector3Euler rotations for the particles of this dataset.com.badlogic.gdx.math.Vector3Scale vector for the particles of this dataset.floatRender particle size scale factor.booleanUse FBM perlin noise to mask size generation.floatUsed to compute the size.float[]Displacement of the ellipses in theBillboardDataset.Distribution.SPIRALmode.com.badlogic.gdx.math.Vector3Translation vector for the particles of this dataset.Type of particle.floatStrength of the warp, for flat distributions. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfloat[]getColorRGBA(int i) booleaninitialize(PointDataProvider provider, boolean reload) voidsetArmSigma(Double armSigma) voidsetArmSigma(Long armSigma) voidvoidvoidsetBaseAngle(Double baseAngle) voidsetBaseAngle(Long baseAngle) voidsetBaseColor(double[] baseColors) voidsetBaseColors(double[] baseColors) Sets the base colors.voidsetBaseColors(float[] baseColors) voidsetBaseRadius(Double baseRadius) voidsetBaseRadius(Long baseRadius) voidsetBlending(BlendMode blending) voidsetBlending(String blending) voidsetColorNoise(Double colorNoise) voidsetColorRGBA(float[] rgba, int i) voidsetCompletion(double[] completion) Sets the completion rate array per graphics quality.voidsetCompletion(Double completion) Sets the completion rate to skip particles, in [0..1].voidsetDepthmask(Boolean depthMask) voidsetDepthMask(Boolean depthMask) voidvoidsetDistribution(BillboardDataset.Distribution distribution) voidsetDistribution(String distribution) voidsetEccentricity(double[] eccentricity) voidsetEccentricity(Double eccentricity) voidsetEccentricity(Long eccentricity) voidsetEccentricityX(Double eccentricity) voidsetEccentricityX(Long eccentricity) voidsetEccentricityY(Double eccentricity) voidsetEccentricityY(Long eccentricity) voidvoidsetGenStatus(GenStatus genStatus) voidsetHeightParameters(Double warpStrength, Double heightScale, BillboardDataset.HeightProfile profile) voidvoidsetHeightProfile(String profile) voidsetHeightScale(Double heightScale) voidsetHeightScale(Long heightScale) voidsetIntensity(Double intensity) voidsetIntensity(Long intensity) voidsetLayers(int[] layers) Sets the texture layers of this dataset.voidsetMaxsize(Double maxSize) Deprecated.voidsetMaxSize(Double maxSize) Set the maximum size as a solid angle [deg].voidsetMaxsizes(double[] maxSizes) Deprecated.UsesetMaxSizes(double[])instead.voidsetMaxSizes(double[] maxSizes) Set the maximum size as a list of solid angles [deg], one for each of the graphics qualities [LOW, MED, HIGH, ULTRA].voidsetMinRadius(Double minRadius) voidsetMinRadius(Long minRadius) voidsetNumArms(Long numArms) voidvoidsetRotation(double[] r) voidsetRotation(int[] r) voidsetRotationX(double r) voidsetRotationY(double r) voidsetRotationZ(double r) voidsetScale(double[] s) voidsetScale(int[] s) voidsetScaleX(double s) voidsetScaleY(double s) voidsetScaleZ(double s) voidvoidvoidsetSizeNoise(Double sizeNoise) voidsetSizeNoiseScale(Double scale) voidsetSpiralArms(Long spiralArms) voidsetSpiralData(double baseAngle, double ec, double[] deltaPos, long numArms, double armSigma) Sets the spiral parameters all in one go.voidsetSpiralDeltaPos(double[] d) voidsetSpiralDeltaPos(int[] d) voidsetTranslation(double[] d) voidsetTranslation(int[] d) voidvoidvoidsetWarpStrength(Double warpStrength) voidsetWarpStrength(Long warpStrength)
-
Field Details
-
particleCount
public int particleCountNumber of particles to generate with procedural generation. -
file
Path to the file containing the particle data. Ignored if this dataset is in a procedural billboard group. -
fileUnpack
Unpacked file path. Ignored if this dataset is in a procedural billboard group. -
data
List of particle records with the particles of this dataset. Ignored if this dataset is in a procedural billboard group. -
type
Type of particle. -
distribution
Probability distribution, for procedural datasets. -
baseColors
public float[] baseColorsBase color(s) for the particles of this dataset. These colors will be used as base to generate the particle colors.MAX_COLORSRGBA colors are supported, so the size of this array must beMAX_COLORS* 3. -
colorNoise
public float colorNoiseColor randomness to apply to the base colors to generate the final particle colors. -
layers
public int[] layersTexture layers to use. -
completion
public float[] completionArray with completion rate per texture quality (to skip data). -
baseRadius
public float baseRadiusBase radius of this dataset. 1 is the default radius, but you can make this component spread out wider or thinner by changing this. -
minRadius
public float minRadiusMinimum radius to generate particles. Only available for spiral and density wave distributions. Must be in [0,1], where 0 is the very center, and 1 is baseRadius. -
size
public float sizeRender particle size scale factor. -
sizeMask
public boolean sizeMaskUse FBM perlin noise to mask size generation. -
sizeNoise
public float sizeNoiseUsed to compute the size.- ≥ 0 — sizeMask false, randomness of sizes
- < 0 — sizeMask true, scale of FBM perlin noise
-
translation
public com.badlogic.gdx.math.Vector3 translationTranslation vector for the particles of this dataset. -
scale
public com.badlogic.gdx.math.Vector3 scaleScale vector for the particles of this dataset. -
rotation
public com.badlogic.gdx.math.Vector3 rotationEuler rotations for the particles of this dataset. -
warpStrength
public float warpStrengthStrength of the warp, for flat distributions. -
heightScale
public float heightScaleHeight scale. -
heightProfile
Height (vertical) profile. -
eccentricity
public float[] eccentricityEccentricities for density wave [1] and ellipsoid [2]. -
aspect
public float aspectBar aspect ratio, e.g. 0.3 = short bar, 1.0 = long bar. -
baseAngle
public float baseAngleSpiral arm pitch angle in degrees.When using
BillboardDataset.Distribution.SPIRAL_LOG, this controls how tightly the spiral arms wind around the galactic center. Lower values (≈5–10°) produce tightly wound Sa-type spirals, while higher values (≈25–40°) yield open Sc–Sd morphologies. This parameter maps directly to the logarithmic spiral pitch angle used in the compute shader.When using
BillboardDataset.Distribution.SPIRAL, this controls the total rotation of the concentric ellipses. -
spiralDeltaPos
public float[] spiralDeltaPosDisplacement of the ellipses in theBillboardDataset.Distribution.SPIRALmode. -
numArms
public int numArmsNumber of spiral arms. -
armSigma
public float armSigmaStandard deviation across arm. -
intensity
public float intensityThe intensity factor. -
depthMask
public boolean depthMaskWhether to allow depth writes when rendering. -
blending
The blending mode. -
maxSizes
public double[] maxSizesMaximum particle size for each texture quality mode. It has 4 entries, from LOW to ULTRA. SeeSettings.GraphicsQuality. -
genStatus
Current CPU generation status for this dataset.
-
-
Constructor Details
-
BillboardDataset
public BillboardDataset()
-
-
Method Details
-
getGenStatus
-
setGenStatus
-
initialize
-
setParticleCount
-
setFile
-
setSize
-
setSizeMask
-
setSizeNoise
-
setSizeNoiseScale
-
setIntensity
-
setIntensity
-
setBaseRadius
-
setBaseRadius
-
setMinRadius
-
setMinRadius
-
setTranslation
public void setTranslation(double[] d) -
setTranslation
public void setTranslation(int[] d) -
setScale
public void setScale(double[] s) -
setScale
public void setScale(int[] s) -
setScaleX
public void setScaleX(double s) -
setScaleY
public void setScaleY(double s) -
setScaleZ
public void setScaleZ(double s) -
setRotation
public void setRotation(double[] r) -
setRotation
public void setRotation(int[] r) -
setRotationX
public void setRotationX(double r) -
setRotationY
public void setRotationY(double r) -
setRotationZ
public void setRotationZ(double r) -
setEccentricity
-
setEccentricity
-
setEccentricityX
-
setEccentricityX
-
setEccentricityY
-
setEccentricityY
-
setEccentricity
public void setEccentricity(double[] eccentricity) -
setWarpStrength
-
setWarpStrength
-
setHeightScale
-
setHeightScale
-
setHeightProfile
-
setHeightProfile
-
setHeightParameters
public void setHeightParameters(Double warpStrength, Double heightScale, BillboardDataset.HeightProfile profile) -
setBaseAngle
-
setBaseAngle
-
setNumArms
-
setSpiralArms
-
setArmSigma
-
setArmSigma
-
setAspect
-
setAspect
-
setType
-
setType
-
setDistribution
-
setDistribution
-
setSpiralDeltaPos
public void setSpiralDeltaPos(double[] d) -
setSpiralDeltaPos
public void setSpiralDeltaPos(int[] d) -
setDisplacement
-
setBaseColors
public void setBaseColors(float[] baseColors) -
setBaseColors
public void setBaseColors(double[] baseColors) Sets the base colors. Four RGB colors are supported, so the size of the array must be one of [3, 6, 9, 12].- Parameters:
baseColors- The base colors.
-
setBaseColor
public void setBaseColor(double[] baseColors) -
getColorRGBA
public float[] getColorRGBA(int i) -
setColorRGBA
public void setColorRGBA(float[] rgba, int i) -
setColorNoise
-
setLayers
public void setLayers(int[] layers) Sets the texture layers of this dataset.- Parameters:
layers- The layers.
-
setCompletion
Sets the completion rate to skip particles, in [0..1].- Parameters:
completion- The completion rate, applied to all graphics qualities.
-
setCompletion
public void setCompletion(double[] completion) Sets the completion rate array per graphics quality.- Parameters:
completion- Array with the completion rate for each quality setting.
-
setDepthMask
-
setDepthmask
-
setBlending
-
setBlending
-
setMaxSize
Set the maximum size as a solid angle [deg]. The same setting is used for all graphics quality settings.- Parameters:
maxSize- The maximum size in degrees.
-
setMaxsize
Deprecated.UsesetMaxSize(Double)instead.Alias tosetMaxSize(Double).- Parameters:
maxSize- The maximum size in degrees.
-
setMaxSizes
public void setMaxSizes(double[] maxSizes) Set the maximum size as a list of solid angles [deg], one for each of the graphics qualities [LOW, MED, HIGH, ULTRA].- Parameters:
maxSizes- The maximum size per graphics quality, in degrees.
-
setMaxsizes
Deprecated.UsesetMaxSizes(double[])instead.Alias tosetMaxSizes(double[]).- Parameters:
maxSizes- The maximum size per graphics quality, in degrees.
-
setSpiralData
public void setSpiralData(double baseAngle, double ec, double[] deltaPos, long numArms, double armSigma) Sets the spiral parameters all in one go.- Parameters:
baseAngle- The base angle.ec- The eccentricity.deltaPos- The delta pos.numArms- The number of arms.armSigma- The arm spread.
-
setMaxSize(Double)instead.