Class LightData
java.lang.Object
foundry.veil.api.client.render.light.data.LightData
- Direct Known Subclasses:
AreaLightData,DirectionalLightData,PointLightData
A source of luminance in a scene. Drawn using
LightRenderer.- Since:
- 2.0.0
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfloatgetColor()longabstract LightTypeRegistry.LightType<?> getType()abstract booleanisVisible(CullFrustum frustum) Checks if this light is visible to the camera.voidMarks this light as changed so renderer-side buffers can be refreshed lazily.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.setTo(net.minecraft.client.Camera camera) Sets the light position/rotation to be the same as the specified camera.
-
Field Details
-
color
-
brightness
protected float brightness
-
-
Constructor Details
-
LightData
public LightData()
-
-
Method Details
-
markDirty
public void markDirty()Marks this light as changed so renderer-side buffers can be refreshed lazily. -
getRevision
public long getRevision()- Returns:
- The current mutation revision of this light.
-
getColor
- Returns:
- The color of this light
-
getBrightness
public float getBrightness()- Returns:
- The brightness multiplier of the light.
-
setColor
Sets the RGB color of this light.- Parameters:
color- The new color values
-
setColor
Sets the RGB color of this light.- Parameters:
color- The new color values
-
setColor
Sets the RGB color of this light.- Parameters:
red- The new redgreen- The new greenblue- The new blue
-
setColor
Sets the RGB color of this light.- Parameters:
color- THe new RGB of this light
-
setBrightness
Sets the brightness of the light. This acts as a multiplier on the light's color.- Parameters:
brightness- The new brightness of the light.
-
isVisible
Checks if this light is visible to the camera.- Parameters:
frustum- The frustum to check against- Returns:
- Whether this light is visible
-
setTo
Sets the light position/rotation to be the same as the specified camera.- Parameters:
camera- The camera to set relative to
-
getType
- Returns:
- The type of light this is
-