Package 

Class Skybox


  • 
    public class Skybox
    
                        

    Skybox

    When added to a Scene, the Skybox fills all untouched pixels.

    Creation and destructionA Skybox object is created using the Skybox.Builder and destroyed by calling destroySkybox.
     Engine engine = Engine.create();
    
     Scene scene = engine.createScene();
    
     Skybox skybox = new Skybox.Builder()
                 .environment(cubemap)
                 .build(engine);
    
     scene.setSkybox(skybox);
    
    Currently only Texture based sky boxes are supported.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      public class Skybox.Builder

      Use Builder to construct a Skybox object instance.

    • Constructor Summary

      Constructors 
      Constructor Description
      Skybox(long nativeSkybox)
    • Method Summary

      Modifier and Type Method Description
      void setColor(float r, float g, float b, float a) Mutates the Skybox's constant color.Ignored if an environment is set.
      void setColor(@NonNull() @Size(min = 4) Array<float> color) Mutates the Skybox's constant color.Ignored if an environment is set.
      void setLayerMask(@IntRange(from = 0, to = 255) int select, @IntRange(from = 0, to = 255) int values) Sets bits in a visibility mask.
      int getLayerMask()
      float getIntensity() Returns the Skybox's intensity in lux, or lumen/m^2.
      Texture getTexture()
      long getNativeObject()
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Skybox

        Skybox(long nativeSkybox)
    • Method Detail

      • setColor

         void setColor(float r, float g, float b, float a)

        Mutates the Skybox's constant color.Ignored if an environment is set.

      • setColor

         void setColor(@NonNull() @Size(min = 4) Array<float> color)

        Mutates the Skybox's constant color.Ignored if an environment is set.

        Parameters:
        color - an array of 4 floats
      • setLayerMask

         void setLayerMask(@IntRange(from = 0, to = 255) int select, @IntRange(from = 0, to = 255) int values)

        Sets bits in a visibility mask. By default, this is 0x1.

        This provides a simple mechanism for hiding or showing this Skybox in a Scene.

        For example, to set bit 1 and reset bits 0 and 2 while leaving all other bits unaffected,call: setLayerMask(7, 2).

        Parameters:
        select - the set of bits to affect
        values - the replacement values for the affected bits
      • getIntensity

         float getIntensity()

        Returns the Skybox's intensity in lux, or lumen/m^2.