Class AreaLightData
java.lang.Object
foundry.veil.api.client.render.light.data.LightData
foundry.veil.api.client.render.light.data.AreaLightData
- All Implemented Interfaces:
EditorAttributeProvider
,InstancedLightData
Represents a light emitting quad in the world.
- Since:
- 2.0.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected float
protected float
protected final org.joml.Quaternionf
protected final org.joml.Vector3d
protected final org.joml.Vector2f
Fields inherited from class foundry.veil.api.client.render.light.data.LightData
brightness, color
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfloat
getAngle()
float
org.joml.Quaternionf
org.joml.Vector3d
org.joml.Vector2f
getSize()
getType()
boolean
isVisible
(CullFrustum frustum) Checks if this light is visible to the camera.void
Renders all ImGui attributes into the current editor panel.setAngle
(float angle) Sets the maximum angle the light can influence.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.setDistance
(float distance) Sets the maximum distance the light can influence.setSize
(double x, double y) Sets the size of the light's surfacesetTo
(net.minecraft.client.Camera camera) Sets the light position/rotation to be the same as the specified camera.void
store
(ByteBuffer buffer) Stores the data of this light into the specified buffer.protected void
Methods inherited from class foundry.veil.api.client.render.light.data.LightData
getBrightness, getColor
-
Field Details
-
position
protected final org.joml.Vector3d position -
orientation
protected final org.joml.Quaternionf orientation -
size
protected final org.joml.Vector2f size -
angle
protected float angle -
distance
protected float distance
-
-
Constructor Details
-
AreaLightData
public AreaLightData()
-
-
Method Details
-
updateMatrix
protected void updateMatrix() -
getType
-
getPosition
public org.joml.Vector3d getPosition()- Returns:
- The XYZ position of this light in the world
-
getOrientation
public org.joml.Quaternionf getOrientation()- Returns:
- The current orientation of the light
-
getSize
public org.joml.Vector2f getSize()- Returns:
- The size of the light's surface
-
getAngle
public float getAngle()- Returns:
- The maximum angle of the light from the plane's surface.
-
getDistance
public float getDistance()- Returns:
- The maximum distance the light can travel
-
setSize
Sets the size of the light's surface- Parameters:
x
- The length, in blocks, of the light's surface.y
- The width, in blocks, of the light's surface.
-
setAngle
Sets the maximum angle the light can influence.- Parameters:
angle
- The maximum angle of the light's influence in radians
-
setDistance
Sets the maximum distance the light can influence.- Parameters:
distance
- The maximum area of influence for the light
-
setColor
Description copied from class:LightData
Sets the RGB color of this light. -
setColor
Description copied from class:LightData
Sets the RGB color of this light. -
setColor
Description copied from class:LightData
Sets the RGB color of this light. -
setColor
Description copied from class:LightData
Sets the RGB color of this light. -
setBrightness
Description copied from class:LightData
Sets the brightness of the light. This acts as a multiplier on the light's color.- Overrides:
setBrightness
in classLightData
- Parameters:
brightness
- The new brightness of the light.
-
store
Description copied from interface:InstancedLightData
Stores the data of this light into the specified buffer.- Specified by:
store
in interfaceInstancedLightData
- Parameters:
buffer
- The buffer to fill
-
isVisible
Description copied from class:LightData
Checks if this light is visible to the camera. -
setTo
Description copied from class:LightData
Sets the light position/rotation to be the same as the specified camera. -
renderImGuiAttributes
public void renderImGuiAttributes()Description copied from interface:EditorAttributeProvider
Renders all ImGui attributes into the current editor panel.- Specified by:
renderImGuiAttributes
in interfaceEditorAttributeProvider
-