Class BillboardDataset

java.lang.Object
gaiasky.scene.record.BillboardDataset

public class BillboardDataset extends Object
A dataset composed of a single set of billboard-like particles.
  • Field Details

    • particleCount

      public int particleCount
      Number of particles to generate with procedural generation.
    • file

      public String file
      Path to the file containing the particle data. Ignored if this dataset is in a procedural billboard group.
    • fileUnpack

      public String fileUnpack
      Unpacked file path. Ignored if this dataset is in a procedural billboard group.
    • data

      public List<IParticleRecord> 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

      public BillboardDataset.Distribution distribution
      Probability distribution, for procedural datasets.
    • baseColors

      public float[] baseColors
      Base color(s) for the particles of this dataset. These colors will be used as base to generate the particle colors. MAX_COLORS RGBA colors are supported, so the size of this array must be MAX_COLORS * 3.
    • colorNoise

      public float colorNoise
      Color randomness to apply to the base colors to generate the final particle colors.
    • layers

      public int[] layers
      Texture layers to use.
    • completion

      public float[] completion
      Array with completion rate per texture quality (to skip data).
    • baseRadius

      public float baseRadius
      Base 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 minRadius
      Minimum 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 size
      Render particle size scale factor.
    • sizeMask

      public boolean sizeMask
      Use FBM perlin noise to mask size generation.
    • sizeNoise

      public float sizeNoise
      Used 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 translation
      Translation vector for the particles of this dataset.
    • scale

      public com.badlogic.gdx.math.Vector3 scale
      Scale vector for the particles of this dataset.
    • rotation

      public com.badlogic.gdx.math.Vector3 rotation
      Euler rotations for the particles of this dataset.
    • warpStrength

      public float warpStrength
      Strength of the warp, for flat distributions.
    • heightScale

      public float heightScale
      Height scale.
    • heightProfile

      public BillboardDataset.HeightProfile heightProfile
      Height (vertical) profile.
    • eccentricity

      public float[] eccentricity
      Eccentricities for density wave [1] and ellipsoid [2].
    • aspect

      public float aspect
      Bar aspect ratio, e.g. 0.3 = short bar, 1.0 = long bar.
    • baseAngle

      public float baseAngle
      Spiral 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[] spiralDeltaPos
      Displacement of the ellipses in the BillboardDataset.Distribution.SPIRAL mode.
    • numArms

      public int numArms
      Number of spiral arms.
    • armSigma

      public float armSigma
      Standard deviation across arm.
    • intensity

      public float intensity
      The intensity factor.
    • depthMask

      public boolean depthMask
      Whether to allow depth writes when rendering.
    • blending

      public BlendMode blending
      The blending mode.
    • maxSizes

      public double[] maxSizes
      Maximum particle size for each texture quality mode. It has 4 entries, from LOW to ULTRA. See Settings.GraphicsQuality.
    • genStatus

      public AtomicReference<GenStatus> genStatus
      Current CPU generation status for this dataset.
  • Constructor Details

    • BillboardDataset

      public BillboardDataset()
  • Method Details

    • getGenStatus

      public GenStatus getGenStatus()
    • setGenStatus

      public void setGenStatus(GenStatus genStatus)
    • initialize

      public boolean initialize(PointDataProvider provider, boolean reload)
    • setParticleCount

      public void setParticleCount(Long n)
    • setFile

      public void setFile(String file)
    • setSize

      public void setSize(Double size)
    • setSizeMask

      public void setSizeMask(Boolean b)
    • setSizeNoise

      public void setSizeNoise(Double sizeNoise)
    • setSizeNoiseScale

      public void setSizeNoiseScale(Double scale)
    • setIntensity

      public void setIntensity(Double intensity)
    • setIntensity

      public void setIntensity(Long intensity)
    • setBaseRadius

      public void setBaseRadius(Double baseRadius)
    • setBaseRadius

      public void setBaseRadius(Long baseRadius)
    • setMinRadius

      public void setMinRadius(Double minRadius)
    • setMinRadius

      public void setMinRadius(Long minRadius)
    • 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

      public void setEccentricity(Double eccentricity)
    • setEccentricity

      public void setEccentricity(Long eccentricity)
    • setEccentricityX

      public void setEccentricityX(Double eccentricity)
    • setEccentricityX

      public void setEccentricityX(Long eccentricity)
    • setEccentricityY

      public void setEccentricityY(Double eccentricity)
    • setEccentricityY

      public void setEccentricityY(Long eccentricity)
    • setEccentricity

      public void setEccentricity(double[] eccentricity)
    • setWarpStrength

      public void setWarpStrength(Double warpStrength)
    • setWarpStrength

      public void setWarpStrength(Long warpStrength)
    • setHeightScale

      public void setHeightScale(Double heightScale)
    • setHeightScale

      public void setHeightScale(Long heightScale)
    • setHeightProfile

      public void setHeightProfile(String profile)
    • setHeightProfile

      public void setHeightProfile(BillboardDataset.HeightProfile p)
    • setHeightParameters

      public void setHeightParameters(Double warpStrength, Double heightScale, BillboardDataset.HeightProfile profile)
    • setBaseAngle

      public void setBaseAngle(Double baseAngle)
    • setBaseAngle

      public void setBaseAngle(Long baseAngle)
    • setNumArms

      public void setNumArms(Long numArms)
    • setSpiralArms

      public void setSpiralArms(Long spiralArms)
    • setArmSigma

      public void setArmSigma(Double armSigma)
    • setArmSigma

      public void setArmSigma(Long armSigma)
    • setAspect

      public void setAspect(Double aspect)
    • setAspect

      public void setAspect(Long aspect)
    • setType

      public void setType(BillboardDataset.ChannelType type)
    • setType

      public void setType(String type)
    • setDistribution

      public void setDistribution(BillboardDataset.Distribution distribution)
    • setDistribution

      public void setDistribution(String distribution)
    • setSpiralDeltaPos

      public void setSpiralDeltaPos(double[] d)
    • setSpiralDeltaPos

      public void setSpiralDeltaPos(int[] d)
    • setDisplacement

      public void setDisplacement(Double d)
    • 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

      public void setColorNoise(Double colorNoise)
    • setLayers

      public void setLayers(int[] layers)
      Sets the texture layers of this dataset.
      Parameters:
      layers - The layers.
    • setCompletion

      public void setCompletion(Double completion)
      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

      public void setDepthMask(Boolean depthMask)
    • setDepthmask

      public void setDepthmask(Boolean depthMask)
    • setBlending

      public void setBlending(BlendMode blending)
    • setBlending

      public void setBlending(String blending)
    • setMaxSize

      public void setMaxSize(Double maxSize)
      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 public void setMaxsize(Double maxSize)
      Deprecated.
      Use setMaxSize(Double) instead.
      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 public void setMaxsizes(double[] maxSizes)
      Deprecated.
      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.