Package 

Class Skybox.Builder


  • 
    public class Skybox.Builder
    
                        

    Use Builder to construct a Skybox object instance.

    • Constructor Detail

      • Skybox.Builder

        Skybox.Builder()
        Use Builder to construct a Skybox object instance.
    • Method Detail

      • environment

        @NonNull() Skybox.Builder environment(@NonNull() Texture cubemap)

        Set the environment map (i.e. the skybox content).

        The Skybox is rendered as though it were an infinitely large cube with thecamera inside it. This means that the cubemap which is mapped onto the cube's exteriorwill appear mirrored. This follows the OpenGL conventions.

        The cmgen tool generates reflection maps by default which are thereforeideal to use as skyboxes.

        Parameters:
        cubemap - A cubemap Texture
      • showSun

        @NonNull() Skybox.Builder showSun(boolean show)

        Indicates whether the sun should be rendered. The sun can only berendered if there is at least one light of type SUN inthe Scene. The default value is false.

        Parameters:
        show - true if the sun should be rendered, false otherwise
      • color

        @NonNull() Skybox.Builder color(float r, float g, float b, float a)

        Sets the Skybox to a constant color. Default is opaque black.Ignored if an environment is set.

      • color

        @NonNull() Skybox.Builder color(@NonNull() @Size(min = 4) Array<float> color)

        Sets the Skybox to a constant color. Default is opaque black.Ignored if an environment is set.

        Parameters:
        color - an array of 4 floats