Package com.luciad.maps.effects
Class DirectionalLightModel.Builder
java.lang.Object
com.luciad.maps.effects.DirectionalLightModel.Builder
- All Implemented Interfaces:
AutoCloseable
- Enclosing class:
DirectionalLightModel
Builder for a DirectionalLightModel.- Since:
- 2026.1
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionambientColor(android.graphics.Color color) Sets the ambient color of the light.build()Builds the directional light.voidclose()diffuseColor(android.graphics.Color color) Sets the diffuse color of the light.direction(Coordinate direction) Sets the vector pointing towards the light source.protected voidfinalize()
-
Constructor Details
-
Builder
Copy constructor.- Parameters:
other- the builder to copy.
-
-
Method Details
-
finalize
protected void finalize() -
close
public void close()- Specified by:
closein interfaceAutoCloseable
-
ambientColor
Sets the ambient color of the light.The default is a dark gray (64, 64, 64).
- Parameters:
color- the ambient color of the light.- Returns:
- this builder.
-
diffuseColor
Sets the diffuse color of the light.The default is white.
- Parameters:
color- the diffuse color of the light.- Returns:
- this builder.
-
direction
Sets the vector pointing towards the light source.This is mandatory. It does not need to be normalized.
- Parameters:
direction- the vector pointing towards the light source.- Returns:
- this builder.
-
build
Builds the directional light.- Returns:
- the built directional light.
- Throws:
IllegalStateException- when the direction was not set.
-