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 TypeMethodDescriptionfloat
getColor()
abstract LightTypeRegistry.LightType
<?> getType()
abstract boolean
isVisible
(CullFrustum frustum) Checks if this light is visible to the camera.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
-
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
-