-
public class SkyboxSkybox
When added to a Scene, the
Creation and destructionASkyboxfills all untouched pixels.Skyboxobject is created using the Skybox.Builder and destroyed by calling destroySkybox.
Currently only Texture based sky boxes are supported.Engine engine = Engine.create(); Scene scene = engine.createScene(); Skybox skybox = new Skybox.Builder() .environment(cubemap) .build(engine); scene.setSkybox(skybox);
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classSkybox.BuilderUse
Builderto construct aSkyboxobject instance.
-
Constructor Summary
Constructors Constructor Description Skybox(long nativeSkybox)
-
Method Summary
Modifier and Type Method Description voidsetColor(float r, float g, float b, float a)Mutates the Skybox's constant color.Ignored if an environment is set.voidsetColor(@NonNull() @Size(min = 4) Array<float> color)Mutates the Skybox's constant color.Ignored if an environment is set.voidsetLayerMask(@IntRange(from = 0, to = 255) int select, @IntRange(from = 0, to = 255) int values)Sets bits in a visibility mask. intgetLayerMask()floatgetIntensity()Returns the Skybox's intensity in lux, or lumen/m^2.TexturegetTexture()longgetNativeObject()-
-
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
Skyboxin 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 affectvalues- the replacement values for the affected bits
-
getLayerMask
int getLayerMask()
-
getIntensity
float getIntensity()
Returns the
Skybox's intensity in lux, or lumen/m^2.
-
getTexture
@Nullable() Texture getTexture()
-
getNativeObject
long getNativeObject()
-
-
-
-