Class DirectionalLight

java.lang.Object
foundry.veil.api.client.render.deferred.light.Light
foundry.veil.api.client.render.deferred.light.DirectionalLight
All Implemented Interfaces:
EditorAttributeProvider, Cloneable

public class DirectionalLight extends Light implements EditorAttributeProvider
Represents a light where all rays come from the same direction everywhere. (The sun)
  • Field Details

    • direction

      protected final org.joml.Vector3f direction
  • Constructor Details

    • DirectionalLight

      public DirectionalLight()
  • Method Details

    • getDirection

      public org.joml.Vector3fc getDirection()
      Returns:
      The direction this light is facing
    • setColor

      public DirectionalLight 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 DirectionalLight 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
    • setColor

      public DirectionalLight setColor(int color)
      Description copied from class: Light
      Sets the RGB color of this light.
      Overrides:
      setColor in class Light
      Parameters:
      color - THe new RGB of this light
    • setDirection

      public DirectionalLight setDirection(org.joml.Vector3fc direction)
      Sets the direction of this light.
      Parameters:
      direction - The new direction
    • setDirection

      public DirectionalLight setDirection(float x, float y, float z)
      Sets the direction of this light.
      Parameters:
      x - The new x direction
      y - The new y direction
      z - The new z direction
    • setTo

      public DirectionalLight 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 DirectionalLight 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