Class DirectionalLightData
java.lang.Object
foundry.veil.api.client.render.light.data.LightData
foundry.veil.api.client.render.light.data.DirectionalLightData
- All Implemented Interfaces:
EditorAttributeProvider,DDALightData
public class DirectionalLightData
extends LightData
implements EditorAttributeProvider, DDALightData
Represents a light where all rays come from the same direction everywhere. (The sun)
- Since:
- 2.0.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final org.joml.Vector3fprotected booleanFields inherited from class foundry.veil.api.client.render.light.data.LightData
brightness, color -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.joml.Vector3forg.joml.Vector3fAllows the value to be safely modified.getType()booleanbooleanisVisible(CullFrustum frustum) Checks if this light is visible to the camera.voidRenders all ImGui attributes into the current editor panel.setBrightness(float brightness) Sets the brightness of the light.setColor(float red, float green, float blue) Sets the RGB color of this light.setColor(int color) Sets the RGB color of this light.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.setOcclusionEnabled(boolean occlusionEnabled) 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.data.LightData
getBrightness, getColor, getColorMutable, getRevision, markDirty
-
Field Details
-
direction
protected final org.joml.Vector3f direction -
occlusionEnabled
protected boolean occlusionEnabled
-
-
Constructor Details
-
DirectionalLightData
public DirectionalLightData()
-
-
Method Details
-
getDirection
public org.joml.Vector3f getDirection()- Returns:
- The direction this light is facing
-
getDirectionMutable
public org.joml.Vector3f getDirectionMutable()Allows the value to be safely modified.- Returns:
- The direction this light is facing
- Since:
- 4.3.0
-
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
-
setColor
Description copied from class:LightDataSets the RGB color of this light. -
setColor
Description copied from class:LightDataSets the RGB color of this light. -
setColor
Description copied from class:LightDataSets the RGB color of this light. -
setColor
Description copied from class:LightDataSets the RGB color of this light. -
setBrightness
Description copied from class:LightDataSets the brightness of the light. This acts as a multiplier on the light's color.- Overrides:
setBrightnessin classLightData- Parameters:
brightness- The new brightness of the light.
-
setOcclusionEnabled
- Since:
- 4.4.0
-
isVisible
Description copied from class:LightDataChecks if this light is visible to the camera. -
setTo
Description copied from class:LightDataSets the light position/rotation to be the same as the specified camera. -
getType
-
renderImGuiAttributes
public void renderImGuiAttributes()Description copied from interface:EditorAttributeProviderRenders all ImGui attributes into the current editor panel.- Specified by:
renderImGuiAttributesin interfaceEditorAttributeProvider
-
isOcclusionEnabled
public boolean isOcclusionEnabled()- Specified by:
isOcclusionEnabledin interfaceDDALightData- Returns:
- Whether occlusion is enabled
-