Interface LightAPI

All Known Implementing Classes:
StandardLight

public interface LightAPI
An interface for managing lights in the lighting engine.

  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    advance(float amount)
    Runs once per frame.
    float
    The end of the current visible arc of the light, in degrees.
    float
    The start of the current visible arc of the light, in degrees.
    org.lwjgl.util.vector.Vector3f
    Gets the light's color.
    org.lwjgl.util.vector.Vector3f
    Gets the light's directional vector.
    float
    Gets the height of the light, in world-space units.
    float
    Gets the light's intensity.
    org.lwjgl.util.vector.Vector2f
    Gets the current location of the light.
    org.lwjgl.util.vector.Vector2f
    Gets the current location of the light's secondary endpoint.
    float
    Gets the light's size.
    float
    Gets the specular intensity of the light.
    float
    Gets the specular multiplier of the light.
    int
    Gets the light's type.
  • Method Details

    • getLocation

      org.lwjgl.util.vector.Vector2f getLocation()
      Gets the current location of the light.

      Returns:
      The current location of the light.
    • getLocation2

      org.lwjgl.util.vector.Vector2f getLocation2()
      Gets the current location of the light's secondary endpoint. Only used for line-type lights.

      Returns:
      The current location of the light's secondary endpoint.
    • getArcStart

      float getArcStart()
      The start of the current visible arc of the light, in degrees. Only used for cone-type lights.

      Returns:
      The start of the current visible arc of the light, in degrees.

      Since:
      Alpha 1.4
    • getArcEnd

      float getArcEnd()
      The end of the current visible arc of the light, in degrees. Only used for cone-type lights.

      Returns:
      The current facing direction of the light.

      Since:
      Alpha 1.4
    • getDirection

      org.lwjgl.util.vector.Vector3f getDirection()
      Gets the light's directional vector. Only used for directional-type lights.

      Returns:
      The light's directional vector.

      Since:
      Alpha 1.4
    • getSpecularIntensity

      float getSpecularIntensity()
      Gets the specular intensity of the light. Only used for directional-type lights.

      Returns:
      The specular intensity of the light.

      Since:
      Alpha 1.4
    • getSpecularMult

      float getSpecularMult()
      Gets the specular multiplier of the light. Only used for point-type lights.

      Returns:
      The specular multiplier of the light.

      Since:
      1.4.0
    • getHeight

      float getHeight()
      Gets the height of the light, in world-space units. Only used for the purposes of normal maps.

      Returns:
      The world-space height of the light.

      Since:
      Alpha 1.4
    • getColor

      org.lwjgl.util.vector.Vector3f getColor()
      Gets the light's color.

      Returns:
      An object whose xyz components correspond to rgb, in terms of values between 0.0 and 1.0.
    • getSize

      float getSize()
      Gets the light's size.

      Returns:
      The light's size, in units.
    • getIntensity

      float getIntensity()
      Gets the light's intensity.

      Returns:
      The light's intensity, in terms of lumens at the center of the light.
    • getType

      int getType()
      Gets the light's type.

      Returns:
      The light's current type. Type 0: point light (default). Type 1: line light. Type 2: cone light. Type 3: directional light.
    • advance

      boolean advance(float amount)
      Runs once per frame.

      Parameters:
      amount - Seconds since last frame.

      Returns:
      True if the light should be destroyed this frame, false if it should not be destroyed this frame.

      Since:
      Alpha 1.2