Module gpuFlux

Class SpectralSkyDome

All Implemented Interfaces:
Transformation, Pickable, Renderable, Manageable, PersistenceCapable, Shareable, UserFields, XObject, Map, Serializable

public class SpectralSkyDome extends SkyDome
A SkyDome node with a user-defined spectral power distribution (SPD).

The same SPD is applied to all 72 sky-element DirectionalLights by wrapping each in a SpectralLight. The totalPower field inherited from SkyDome continues to control the total diffuse horizontal irradiance [W m⁻²]; the SPD shape is given by the supplied SpectralCurve.

The default SPD is CIE D65, the standard daylight illuminant representing average daylight as received at Earth's surface (CCT ≈ 6504 K).

Usage example in RGG:

   SpectralSkyDome sky = new SpectralSkyDome(2000f, 15f, 0f);
   // default is already CIE D65; override if needed:
   sky.setSpectrum(new CIENormSpectralCurve(Attributes.CIE_NORM_D55));
 

Author:
MH at YNL 2026
See Also:
  • Field Details

  • Constructor Details

    • SpectralSkyDome

      public SpectralSkyDome()
      Creates a spectral sky dome with default parameters (CIE D65 SPD).
    • SpectralSkyDome

      public SpectralSkyDome(float totalPower, float distance, float jitter)
      Parameters:
      totalPower - total diffuse sky irradiance [W m⁻²]
      distance - hemisphere radius [m]
      jitter - azimuth jitter [degrees, 0–15]
  • Method Details

    • wrapLight

      protected Light wrapLight(DirectionalLight dl)
      Description copied from class: SkyDome
      Hook for subclasses to wrap each DirectionalLight before it is stored in a SkyDome.LightEntry. The default returns dl unchanged; override in e.g. SpectralSkyDome (GPUFlux module) to return a SpectralLight carrying a custom SPD.
      Overrides:
      wrapLight in class SkyDome
    • setSpectrum

      public void setSpectrum(SpectralCurve curve)
      sets the spectral distribution
      Parameters:
      curve - is the spectral distribution
    • setSpectrum

      public void setSpectrum(SPDIF spd)
      sets the spectral distribution
      Parameters:
      curve - is the spectral distribution
    • getNTypeImpl

      protected Node.NType getNTypeImpl()
      Description copied from class: Node
      This method returns the Node.NType which describes the managed fields of the class of this node. This method has to be implemented in every concrete subclass.
      Overrides:
      getNTypeImpl in class SkyDome
      Returns:
      type describing the managed fields of the class of this node
    • newInstance

      protected Node newInstance()
      Description copied from class: Node
      This method returns a new instance of the class of this node. This method has to be implemented in every concrete subclass.
      Overrides:
      newInstance in class SkyDome
      Returns:
      new instance of class of this node
    • getSpectrum

      public SpectralLightMap getSpectrum()
    • setSpectrum

      public void setSpectrum(SpectralLightMap value)