Class DirectionalLight
java.lang.Object
foundry.veil.render.deferred.light.Light
foundry.veil.render.deferred.light.DirectionalLight
- All Implemented Interfaces:
Cloneable
Represents a light where all rays come from the same direction everywhere. (The sun)
-
Nested Class Summary
Nested classes/interfaces inherited from class foundry.veil.render.deferred.light.Light
Light.Type -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()org.joml.Vector3fcgetType()booleanisVisible(CullFrustum frustum) Checks whether this light can be seen in the specified frustum.setColor(float red, float green, float blue) Sets the RGB color of this light.setColor(int color) Sets the RGB color of this light.setColor(org.joml.Vector3fc color) Sets the RGB color of this light.setDirection(float x, float y, float z) Sets the direction of this light.setDirection(org.joml.Vector3fc direction) Sets the direction of this light.
-
Field Details
-
direction
protected final org.joml.Vector3f direction
-
-
Constructor Details
-
DirectionalLight
public DirectionalLight()
-
-
Method Details
-
isVisible
Description copied from class:LightChecks whether this light can be seen in the specified frustum. -
getDirection
public org.joml.Vector3fc getDirection()- Returns:
- The direction this light is facing
-
setColor
Description copied from class:LightSets the RGB color of this light. -
setColor
Description copied from class:LightSets the RGB color of this light. -
setColor
Description copied from class:LightSets the RGB color of this light. -
setDirection
Sets the direction of this light.- Parameters:
direction- The new direction
-
setDirection
Sets the direction of this light.- Parameters:
x- The new x directiony- The new y directionz- The new z direction
-
getType
-
clone
-