java.lang.Object
foundry.veil.api.client.render.deferred.light.Light
foundry.veil.api.client.render.deferred.light.PointLight
All Implemented Interfaces:
EditorAttributeProvider, IndirectLight<PointLight>, InstancedLight, PositionedLight<PointLight>, Cloneable

public class PointLight extends Light implements IndirectLight<PointLight>, EditorAttributeProvider
Represents a light where all rays come from a position in space.
  • Field Details

    • position

      protected final org.joml.Vector3d position
    • radius

      protected float radius
  • Constructor Details

    • PointLight

      public PointLight()
  • Method Details

    • store

      public void store(ByteBuffer buffer)
      Description copied from interface: InstancedLight
      Stores the data of this light into the specified buffer.
      Specified by:
      store in interface InstancedLight
      Parameters:
      buffer - The buffer to fill
    • getPosition

      public org.joml.Vector3d getPosition()
      Specified by:
      getPosition in interface PositionedLight<PointLight>
      Returns:
      The position of this light
    • getRadius

      public float getRadius()
      Specified by:
      getRadius in interface IndirectLight<PointLight>
      Returns:
      The maximum distance the light can travel
    • setColor

      public PointLight setColor(float red, float green, float blue)
      Description copied from class: Light
      Sets the RGB color of this light.
      Overrides:
      setColor in class Light
      Parameters:
      red - The new red
      green - The new green
      blue - The new blue
    • setColor

      public PointLight setColor(org.joml.Vector3fc color)
      Description copied from class: Light
      Sets the RGB color of this light.
      Overrides:
      setColor in class Light
      Parameters:
      color - The new color values
    • setBrightness

      public PointLight setBrightness(float brightness)
      Description copied from class: Light
      Sets the brightness of the light. This acts as a multiplier on the light's color.
      Overrides:
      setBrightness in class Light
      Parameters:
      brightness - The new brightness of the light.
    • setPosition

      public PointLight setPosition(double x, double y, double z)
      Description copied from interface: PositionedLight
      Sets the origin position of this light.
      Specified by:
      setPosition in interface PositionedLight<PointLight>
      Parameters:
      x - The x position of the light
      y - The y position of the light
      z - The z position of the light
    • setRadius

      public PointLight setRadius(float radius)
      Description copied from interface: IndirectLight
      Sets the maximum radius the light can influence.
      Specified by:
      setRadius in interface IndirectLight<PointLight>
      Parameters:
      radius - The maximum area of influence for the light
    • setTo

      public PointLight setTo(net.minecraft.client.Camera camera)
      Description copied from class: Light
      Sets the light position/rotation to be the same as the specified camera.
      Overrides:
      setTo in class Light
      Parameters:
      camera - The camera to set relative to
    • getType

      public LightTypeRegistry.LightType<?> getType()
      Specified by:
      getType in class Light
      Returns:
      The type of light this is
    • clone

      public PointLight clone()
      Specified by:
      clone in class Light
    • renderImGuiAttributes

      public void renderImGuiAttributes()
      Description copied from interface: EditorAttributeProvider
      Renders all ImGui attributes into the current editor panel.
      Specified by:
      renderImGuiAttributes in interface EditorAttributeProvider