Back to Filament

Builder

docs/android/dokka/filament-android/com.google.android.filament/-light-manager/-builder/index.md

1.75.05.8 KB
Original Source

//filament-android/com.google.android.filament/LightManager/Builder

Builder

[main]
open class Builder

Use Builder to construct a Light object instance

Constructors

Builder[main]
constructor(type: LightManager.Type)
Creates a light builder and set the light's Type.

Functions

NameSummary
build[main]
open fun build(engine: Engine, entity: Int)
Adds the Light component to an entity.
castLight[main]
open fun castLight(enabled: Boolean): LightManager.Builder
Whether this light casts light (enabled by default) In some situations it can be useful to have a light in the scene that doesn't actually emit light, but does cast shadows.
castShadows[main]
open fun castShadows(enable: Boolean): LightManager.Builder
Whether this Light casts shadows (disabled by default)
color[main]
open fun color(linearR: Float, linearG: Float, linearB: Float): LightManager.Builder
Sets the initial color of a light.
direction[main]
open fun direction(x: Float, y: Float, z: Float): LightManager.Builder
Sets the initial direction of a light in world space.
falloff[main]
open fun falloff(radius: Float): LightManager.Builder
Set the falloff distance for point lights and spot lights.
intensity[main]
open fun intensity(intensity: Float): LightManager.Builder
Sets the initial intensity of a light.
[main]
open fun intensity(watts: Float, efficiency: Float): LightManager.Builder
Sets the initial intensity of a light in watts.
intensityCandela[main]
open fun intensityCandela(intensity: Float): LightManager.Builder
Sets the initial intensity of a spot or point light in candela.
lightChannel[main]
open fun lightChannel(channel: Int, enable: Boolean): LightManager.Builder
Enables or disables a light channel.
position[main]
open fun position(x: Float, y: Float, z: Float): LightManager.Builder
Sets the initial position of the light in world space.
shadowOptions[main]
open fun shadowOptions(options: LightManager.ShadowOptions): LightManager.Builder
Sets the shadow map options for this light.
spotLightCone[main]
open fun spotLightCone(inner: Float, outer: Float): LightManager.Builder
Defines a spot light's angular falloff attenuation.
sunAngularRadius[main]
open fun sunAngularRadius(angularRadius: Float): LightManager.Builder
Defines the angular radius of the sun, in degrees, between 0.25° and 20.0° The Sun as seen from Earth has an angular size of 0.526° to 0.
sunHaloFalloff[main]
open fun sunHaloFalloff(haloFalloff: Float): LightManager.Builder
Defines the halo falloff of the sun.
sunHaloSize[main]
open fun sunHaloSize(haloSize: Float): LightManager.Builder
Defines the halo radius of the sun.