Class AreaLight
java.lang.Object
foundry.veil.api.client.render.light.Light
foundry.veil.api.client.render.light.AreaLight
- All Implemented Interfaces:
EditorAttributeProvider
,InstancedLight
,PositionedLight<AreaLight>
,Cloneable
public class AreaLight
extends Light
implements InstancedLight, PositionedLight<AreaLight>, EditorAttributeProvider
-
Field Summary
Modifier 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.Light
brightness, color
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionclone()
float
getAngle()
float
org.joml.Quaternionf
org.joml.Vector3d
org.joml.Vector2f
getSize()
getType()
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
(org.joml.Vector3fc color) Sets the RGB color of this light.setDistance
(float distance) Sets the maximum distance the light can influence.setOrientation
(org.joml.Quaternionfc orientation) Sets the orientation of the light's surfacesetPosition
(double x, double y, double z) Sets the origin position of this light.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.Light
clean, getBrightness, getColor, getColorInt, isDirty, markDirty, setColor
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface foundry.veil.api.client.render.light.PositionedLight
setPosition
-
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
-
AreaLight
public AreaLight()
-
-
Method Details
-
store
Description copied from interface:InstancedLight
Stores the data of this light into the specified buffer.- Specified by:
store
in interfaceInstancedLight
- Parameters:
buffer
- The buffer to fill
-
getType
-
getPosition
public org.joml.Vector3d getPosition()- Specified by:
getPosition
in interfacePositionedLight<AreaLight>
- Returns:
- The position of this light
-
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
-
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. -
setBrightness
Description copied from class:Light
Sets the brightness of the light. This acts as a multiplier on the light's color.- Overrides:
setBrightness
in classLight
- Parameters:
brightness
- The new brightness of the light.
-
setPosition
Description copied from interface:PositionedLight
Sets the origin position of this light.- Specified by:
setPosition
in interfacePositionedLight<AreaLight>
- Parameters:
x
- The x position of the lighty
- The y position of the lightz
- The z position of the light
-
setOrientation
Sets the orientation of the light's surface- Parameters:
orientation
- The orientation of the light's surface.
-
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
-
setTo
Description copied from class:Light
Sets the light position/rotation to be the same as the specified camera. -
updateMatrix
protected void updateMatrix() -
clone
-
renderImGuiAttributes
public void renderImGuiAttributes()Description copied from interface:EditorAttributeProvider
Renders all ImGui attributes into the current editor panel.- Specified by:
renderImGuiAttributes
in interfaceEditorAttributeProvider
-