-
public class Skybox.BuilderUse
Builderto construct aSkyboxobject instance.
-
-
Constructor Summary
Constructors Constructor Description Skybox.Builder()Use Builderto construct aSkyboxobject instance.
-
Method Summary
Modifier and Type Method Description Skybox.Builderenvironment(@NonNull() Texture cubemap)Set the environment map (i.e. Skybox.BuildershowSun(boolean show)Indicates whether the sun should be rendered. Skybox.Builderintensity(float envIntensity)Sets the Skyboxintensity when no IndirectLight is set on the Scene.Skybox.Buildercolor(float r, float g, float b, float a)Sets the Skyboxto a constant color.Skybox.Buildercolor(@NonNull() @Size(min = 4) Array<float> color)Sets the Skyboxto a constant color.Skyboxbuild(@NonNull() Engine engine)Creates a Skyboxobject-
-
Method Detail
-
environment
@NonNull() Skybox.Builder environment(@NonNull() Texture cubemap)
Set the environment map (i.e. the skybox content).
The
Skyboxis 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
cmgentool 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-trueif the sun should be rendered,falseotherwise
-
intensity
@NonNull() Skybox.Builder intensity(float envIntensity)
Sets the
Skyboxintensity when no IndirectLight is set on the Scene.This call is ignored when an IndirectLight is set on the Scene, andthe intensity of the IndirectLight is used instead.
- Parameters:
envIntensity- Scale factor applied to the skybox texel values such thatthe result is in lux, or lumen/m^2 (default = 30000)
-
color
@NonNull() Skybox.Builder color(float r, float g, float b, float a)
Sets the
Skyboxto 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
Skyboxto a constant color. Default is opaque black.Ignored if an environment is set.- Parameters:
color- an array of 4 floats
-
-
-
-