- java.lang.Object
-
- be.yildizgames.common.util.BaseRegisterable
-
- be.yildizgames.module.graphic.light.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.DeletableCommon abstract class for all light types, ensure that only one name is used.- Author:
- Grégory Van den Borre
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidattachLensFlare(LensFlare lens)Attach a lens flare to follow this light moves.voiddelete()Delete the light and all associated lens flares.protected abstract voiddeleteImpl()Call specific implementation delete code.List<LensFlare>getLensFlareList()be.yildizgames.common.geometry.Point3DgetPosition()voidmove(be.yildizgames.common.geometry.Point3D toMove)Move the light.voidsetPosition(be.yildizgames.common.geometry.Point3D position)Update the light position.protected abstract voidsetPositionImpl(be.yildizgames.common.geometry.Point3D position)Set the position in implementation.
-
-
-
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:
deletein interfacebe.yildizgames.common.gameobject.Deletable
-
deleteImpl
protected abstract void deleteImpl()
Call specific implementation delete code.
-
-