Skip to main content

Light

class Light

Class responsible for manipulating the scene lights, its types are, "Sun", "Point" and "Spot".


public class Light
extends Component

— Constructors (2) —

ConstructorDescription
Light()Creates a new light.
Light(int type)Creates a new light, with its type defined to be argument "type"(0 for "Sun", 1 for "Point", and 2 for "Spot").

— Methods (13) —

NameDescription
float getIntensity()Returns the light intensity.
void setIntensity(float value)Sets the intensity to be "value" argument.
float getDiameter()Returns the diameter of the light.
void setDiameter(float value)Sets the diameter of the light to be "value" argument.
float getDistance()Returns the distance of light.
void setDistance(float value)Sets the light distance to be "value" argument.
Color getColor()Returns the light color.
void setColor(Color value)Sets the light color to be "value" argument.
boolean isShadowEnabled()Returns true if the light is shadowed, false if not.
void setShadowEnabled(boolean value)Defines whether the shadow will be enabled or disabled to be "value" argument.
void forcePriority(int idx)Sets the light priority in the scene to be "idx" argument.
[CustomLightShadowViewCalculator] getCustomLightShadowViewCalculator()Returns the custom interface that calculated the light's view matrix.
void setCustomLightShadowViewCalculator([CustomLightShadowViewCalculator] listener)Defines a custom interface to calculate the light view matrix to be "listener" argument.