Class SpotLight

  • All Implemented Interfaces:
    be.yildizgames.common.gameobject.Deletable, be.yildizgames.common.util.Registerable

    public abstract class SpotLight
    extends Light
    A SpotLight is a light with a spot shape, emitting in a direction.
    Author:
    Grégory Van den Borre
    • Constructor Detail

      • SpotLight

        protected SpotLight​(String name,
                            be.yildizgames.common.geometry.Point3D lightPosition,
                            be.yildizgames.common.geometry.Point3D lightDirection)
        Full constructor.
        Parameters:
        name - Light name, must be unique.
        lightPosition - Light position.
        lightDirection - Light direction.
    • Method Detail

      • addToDirection

        public final void addToDirection​(be.yildizgames.common.geometry.Point3D add)
        Translate the direction vector.
        Parameters:
        add - Value to add.
      • getDirection

        public final be.yildizgames.common.geometry.Point3D getDirection()
        Returns:
        The light direction.
      • setDirectionImpl

        protected abstract void setDirectionImpl​(be.yildizgames.common.geometry.Point3D direction)
        Set new direction value in implementation.
        Parameters:
        direction - New direction value.