Class JoGLLight
java.lang.Object
org.scilab.forge.scirenderer.implementation.jogl.lightning.JoGLLight
- All Implemented Interfaces:
Light
- Author:
- Pierre Lando
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturn the ambient color of this light;Return the diffuse color of this light;int
getIndex()
Return the light index.Return the light position.Return the specular color of this light;float
Return the spot angle.Return the spot direction.boolean
isEnable()
Return the status of this light.void
reload
(com.jogamp.opengl.GL2 gl) Reload this light.void
setAmbientColor
(Color color) Set the ambient color of this light.void
setDiffuseColor
(Color color) Set the diffuse color of this light.void
setEnable
(boolean enable) Set the status of this light.void
setPosition
(Vector3d position) Set the light position.void
setSpecularColor
(Color color) Set the specular color of this light.void
setSpotAngle
(float angle) Set the spot angle.void
setSpotDirection
(Vector3d spotDirection) Set the spot direction.
-
Constructor Details
-
JoGLLight
public JoGLLight(com.jogamp.opengl.GL2 gl, int index) Default constructor.- Parameters:
gl
- the gl context.index
- the light index.
-
-
Method Details
-
reload
public void reload(com.jogamp.opengl.GL2 gl) Reload this light.- Parameters:
gl
- the gl context.
-
isEnable
public boolean isEnable()Description copied from interface:Light
Return the status of this light. -
setEnable
public void setEnable(boolean enable) Description copied from interface:Light
Set the status of this light. -
getAmbientColor
Description copied from interface:Light
Return the ambient color of this light;- Specified by:
getAmbientColor
in interfaceLight
- Returns:
- the ambient color of this light;
-
setAmbientColor
Description copied from interface:Light
Set the ambient color of this light.- Specified by:
setAmbientColor
in interfaceLight
- Parameters:
color
- the new ambient color of this light.
-
getDiffuseColor
Description copied from interface:Light
Return the diffuse color of this light;- Specified by:
getDiffuseColor
in interfaceLight
- Returns:
- the diffuse color of this light;
-
setDiffuseColor
Description copied from interface:Light
Set the diffuse color of this light.- Specified by:
setDiffuseColor
in interfaceLight
- Parameters:
color
- the new diffuse color of this light.
-
getSpecularColor
Description copied from interface:Light
Return the specular color of this light;- Specified by:
getSpecularColor
in interfaceLight
- Returns:
- the specular color of this light;
-
setSpecularColor
Description copied from interface:Light
Set the specular color of this light.- Specified by:
setSpecularColor
in interfaceLight
- Parameters:
color
- the new specular color of this light.
-
getPosition
Description copied from interface:Light
Return the light position.- Specified by:
getPosition
in interfaceLight
- Returns:
- the light position.
-
setPosition
Description copied from interface:Light
Set the light position.- Specified by:
setPosition
in interfaceLight
- Parameters:
position
- the new position.
-
getSpotDirection
Description copied from interface:Light
Return the spot direction.- Specified by:
getSpotDirection
in interfaceLight
- Returns:
- the spot direction.
-
setSpotDirection
Description copied from interface:Light
Set the spot direction.- Specified by:
setSpotDirection
in interfaceLight
- Parameters:
spotDirection
- the new spot direction.
-
getSpotAngle
public float getSpotAngle()Description copied from interface:Light
Return the spot angle.- Specified by:
getSpotAngle
in interfaceLight
- Returns:
- the spot angle.
-
setSpotAngle
public void setSpotAngle(float angle) Description copied from interface:Light
Set the spot angle.- Specified by:
setSpotAngle
in interfaceLight
- Parameters:
angle
- the new spot angle.
-
getIndex
public int getIndex()Description copied from interface:Light
Return the light index.
-