Class Light

  • All Implemented Interfaces:
    be.yildizgames.common.gameobject.Deletable, be.yildizgames.common.util.Registerable
    Direct Known Subclasses:
    DirectionalLight, PointLight, SpotLight

    public abstract class Light
    extends be.yildizgames.common.util.BaseRegisterable
    implements be.yildizgames.common.gameobject.Deletable
    Common abstract class for all light types, ensure that only one name is used.
    Author:
    Grégory Van den Borre
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected Light​(String name, be.yildizgames.common.geometry.Point3D lightPosition)
      Full constructor.
    • Constructor Detail

      • Light

        protected Light​(String name,
                        be.yildizgames.common.geometry.Point3D lightPosition)
        Full constructor.
        Parameters:
        name - Unique name to be used by the Registerer.
        lightPosition - Light position.
    • Method Detail

      • move

        public final void move​(be.yildizgames.common.geometry.Point3D toMove)
        Move the light.
        Parameters:
        toMove - Translation value.
      • attachLensFlare

        public final void attachLensFlare​(LensFlare lens)
        Attach a lens flare to follow this light moves.
        Parameters:
        lens - Lens flare to attach to this light.
      • setPosition

        public final void setPosition​(be.yildizgames.common.geometry.Point3D position)
        Update the light position.
        Parameters:
        position - New position.
      • getPosition

        public final be.yildizgames.common.geometry.Point3D getPosition()
      • setPositionImpl

        protected abstract void setPositionImpl​(be.yildizgames.common.geometry.Point3D position)
        Set the position in implementation.
        Parameters:
        position - New position.
      • delete

        public final void delete()
        Delete the light and all associated lens flares.
        Specified by:
        delete in interface be.yildizgames.common.gameobject.Deletable
      • deleteImpl

        protected abstract void deleteImpl()
        Call specific implementation delete code.
      • getLensFlareList

        public final List<LensFlare> getLensFlareList()
        Returns:
        The list of associated lens flares.