Class PointLight
java.lang.Object
foundry.veil.render.deferred.light.Light
foundry.veil.render.deferred.light.PointLight
- All Implemented Interfaces:
InstancedLight,PositionedLight<PointLight>,Cloneable
Represents a light where all rays come from a position in space.
-
Nested Class Summary
Nested classes/interfaces inherited from class foundry.veil.render.deferred.light.Light
Light.Type -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected floatprotected final org.joml.Vector3dprotected float -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()floatorg.joml.Vector3dfloatgetType()booleanisVisible(CullFrustum frustum) Checks whether this light can be seen in the specified frustum.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.setFalloff(float falloff) Sets the additional linear falloff factor for attenuation.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.voidstore(ByteBuffer buffer) Stores the data of this light into the specified buffer.Methods inherited from class foundry.veil.render.deferred.light.Light
clean, getColor, getColorInt, isDirty, markDirty, setColorMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface foundry.veil.render.deferred.light.PositionedLight
setPosition
-
Field Details
-
position
protected final org.joml.Vector3d position -
radius
protected float radius -
falloff
protected float falloff
-
-
Constructor Details
-
PointLight
public PointLight()
-
-
Method Details
-
store
Description copied from interface:InstancedLightStores the data of this light into the specified buffer.- Specified by:
storein interfaceInstancedLight- Parameters:
buffer- The buffer to fill
-
isVisible
Description copied from class:LightChecks whether this light can be seen in the specified frustum. -
getPosition
public org.joml.Vector3d getPosition()- Specified by:
getPositionin interfacePositionedLight<PointLight>- Returns:
- The position of this light
-
getRadius
public float getRadius()- Returns:
- The maximum distance the light can travel
-
getFalloff
public float getFalloff()- Returns:
- The additional linear falloff applied to the light
-
setColor
Description copied from class:LightSets the RGB color of this light. -
setColor
Description copied from class:LightSets the RGB color of this light. -
setPosition
Description copied from interface:PositionedLightSets the origin position of this light.- Specified by:
setPositionin interfacePositionedLight<PointLight>- Parameters:
x- The x position of the lighty- The y position of the lightz- The z position of the light
-
setRadius
Sets the maximum radius the light can influence.- Parameters:
radius- The maximum area of influence for the light
-
setFalloff
Sets the additional linear falloff factor for attenuation.- Parameters:
falloff- The linear falloff factor
-
getType
-
clone
-