Class PointLight
java.lang.Object
foundry.veil.api.client.render.light.Light
foundry.veil.api.client.render.light.PointLight
- All Implemented Interfaces:
EditorAttributeProvider
,IndirectLight<PointLight>
,InstancedLight
,PositionedLight<PointLight>
,Cloneable
Represents a light where all rays come from a position in space.
-
Field Summary
Modifier and TypeFieldDescriptionprotected final org.joml.Vector3d
protected float
Fields inherited from class foundry.veil.api.client.render.light.Light
brightness, color
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionclone()
org.joml.Vector3d
float
getType()
void
Renders 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
(org.joml.Vector3fc color) Sets the RGB color of this light.setPosition
(double x, double y, double z) Sets the origin position of this light.setRadius
(float radius) Sets the maximum radius the light can influence.setTo
(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.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 -
radius
protected float radius
-
-
Constructor Details
-
PointLight
public PointLight()
-
-
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
-
getPosition
public org.joml.Vector3d getPosition()- Specified by:
getPosition
in interfacePositionedLight<PointLight>
- Returns:
- The position of this light
-
getRadius
public float getRadius()- Specified by:
getRadius
in interfaceIndirectLight<PointLight>
- 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<PointLight>
- Parameters:
x
- The x position of the lighty
- The y position of the lightz
- The z position of the light
-
setRadius
Description copied from interface:IndirectLight
Sets the maximum radius the light can influence.- Specified by:
setRadius
in interfaceIndirectLight<PointLight>
- Parameters:
radius
- 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. -
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
-