Class DirectionalLight
java.lang.Object
foundry.veil.api.client.render.light.Light
foundry.veil.api.client.render.light.DirectionalLight
- All Implemented Interfaces:
EditorAttributeProvider
,Cloneable
Represents a light where all rays come from the same direction everywhere. (The sun)
-
Field Summary
Fields inherited from class foundry.veil.api.client.render.light.Light
brightness, color
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionclone()
org.joml.Vector3fc
getType()
void
Renders all ImGui attributes into the current editor panel.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.setTo
(net.minecraft.client.Camera camera) Sets the light position/rotation to be the same as the specified camera.Methods inherited from class foundry.veil.api.client.render.light.Light
clean, getBrightness, getColor, getColorInt, isDirty, markDirty, setBrightness
-
Field Details
-
direction
protected final org.joml.Vector3f direction
-
-
Constructor Details
-
DirectionalLight
public DirectionalLight()
-
-
Method Details
-
getDirection
public org.joml.Vector3fc getDirection()- Returns:
- The direction this light is facing
-
setColor
Description copied from class:Light
Sets the RGB color of this light. -
setColor
Description copied from class:Light
Sets the RGB color of this light. -
setColor
Description copied from class:Light
Sets 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
-
setTo
Description copied from class:Light
Sets the light position/rotation to be the same as the specified camera. -
getType
-
clone
-
renderImGuiAttributes
public void renderImGuiAttributes()Description copied from interface:EditorAttributeProvider
Renders all ImGui attributes into the current editor panel.- Specified by:
renderImGuiAttributes
in interfaceEditorAttributeProvider
-