Class Light

java.lang.Object
nl.colorize.multimedialib.stage.Light
All Implemented Interfaces:
StageNode3D

public class Light extends Object implements StageNode3D
Light source that influences 3D graphics on the stage. Note these lights exist in addition to the ambient light, which can be changed using Stage.setAmbientLightColor(ColorRGB).
  • Constructor Details

    • Light

      public Light(ColorRGB color, float intensity)
  • Method Details

    • animate

      public void animate(Timer animationTimer)
      Description copied from interface: StageNode3D
      Called by the renderer at the end of frame updates, while rendering the stage. animationTimer contains the elapsed time since the currently active scene was started. This allows animations to display correctly, without the need to update every single node during each frame update.
      Specified by:
      animate in interface StageNode3D
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getTransform

      public Transform3D getTransform()
      Description copied from interface: StageNode3D
      Returns this node's local transform, which is interpreted relative to its parent node. The local transform can be modified by application code to modify how and where the node is displayed.
      Specified by:
      getTransform in interface StageNode3D
    • getGlobalTransform

      public Transform3D getGlobalTransform()
      Description copied from interface: StageNode3D
      Returns this node's global transform, which is interpreted relative to the stage. The global transform is updated by the renderer when drawing the stage at the end of frame updates. Recalculating the global transform is relatively expensive, and is therefore only done once per frame. This means that any changes made to a node's local transform since the last frame update may not yet been reflected in the current state of its global transform.
      Specified by:
      getGlobalTransform in interface StageNode3D
    • getColor

      public ColorRGB getColor()
    • getIntensity

      public float getIntensity()
    • setColor

      public void setColor(ColorRGB color)
    • setIntensity

      public void setIntensity(float intensity)