Class Light
java.lang.Object
foundry.veil.render.deferred.light.Light
- All Implemented Interfaces:
Cloneable
- Direct Known Subclasses:
DirectionalLight,PointLight
A source of luminance in a scene. Drawn using
LightRenderer.-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclean()Removes the dirty flag after this light has been uploaded.abstract Lightclone()org.joml.Vector3fcgetColor()intabstract Light.TypegetType()booleanisDirty()abstract booleanisVisible(CullFrustum frustum) Checks whether this light can be seen in the specified frustum.voidMarks the data in this light as dirty and needing re-uploading.setColor(float red, float green, float blue) Sets the RGB color of this light.setColor(int color) Sets the RGB color of this light.setColor(org.joml.Vector3fc color) Sets the RGB color of this light.
-
Field Details
-
color
protected final org.joml.Vector3f color
-
-
Constructor Details
-
Light
public Light()
-
-
Method Details
-
isVisible
Checks whether this light can be seen in the specified frustum.- Parameters:
frustum- The frustum to check visibility with- Returns:
- Whether that light is visible
-
markDirty
public void markDirty()Marks the data in this light as dirty and needing re-uploading. -
clean
public void clean()Removes the dirty flag after this light has been uploaded. -
getColor
public org.joml.Vector3fc getColor()- Returns:
- The color of this light
-
getColorInt
public int getColorInt()- Returns:
- An integer representing the RGB of this light
-
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
-
isDirty
public boolean isDirty()- Returns:
- If this light needs to be re-uploaded to the renderer
-
getType
- Returns:
- The type of light this is
-
clone
-