Class Light

java.lang.Object
org.collebol.engine.gui.graphics.Light

public class Light extends Object
The Light class represents a light source in a 2D space. It has a position (Vector2D), intensity (float), radius (float) and color (float array). This class provides getter methods for these properties, and it includes a LightBuilder class for the construction of a Light instance.

Building light:

     Light light = new Light(Light.LightBuilder()
         .position(new Vector2D(0, 0))
         .intensity(1f)
         .radius(10f)
         .color(new float[]{ 1.0f, 1.0f, 1.0f, 1.0f })
         //                   R     G     B
     );
 
Since:
1.0-dev
Author:
ColleBol - contact@collebol.org
  • Constructor Details

  • Method Details

    • getPosition

      public Vector2D getPosition()
    • getIntensity

      public float getIntensity()
    • getRadius

      public float getRadius()
    • getColor

      public float[] getColor()