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;intgetIndex()Return the light index.Return the light position.Return the specular color of this light;floatReturn the spot angle.Return the spot direction.booleanisEnable()Return the status of this light.voidreload(com.jogamp.opengl.GL2 gl) Reload this light.voidsetAmbientColor(Color color) Set the ambient color of this light.voidsetDiffuseColor(Color color) Set the diffuse color of this light.voidsetEnable(boolean enable) Set the status of this light.voidsetPosition(Vector3d position) Set the light position.voidsetSpecularColor(Color color) Set the specular color of this light.voidsetSpotAngle(float angle) Set the spot angle.voidsetSpotDirection(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:LightReturn the status of this light. -
setEnable
public void setEnable(boolean enable) Description copied from interface:LightSet the status of this light. -
getAmbientColor
Description copied from interface:LightReturn the ambient color of this light;- Specified by:
getAmbientColorin interfaceLight- Returns:
- the ambient color of this light;
-
setAmbientColor
Description copied from interface:LightSet the ambient color of this light.- Specified by:
setAmbientColorin interfaceLight- Parameters:
color- the new ambient color of this light.
-
getDiffuseColor
Description copied from interface:LightReturn the diffuse color of this light;- Specified by:
getDiffuseColorin interfaceLight- Returns:
- the diffuse color of this light;
-
setDiffuseColor
Description copied from interface:LightSet the diffuse color of this light.- Specified by:
setDiffuseColorin interfaceLight- Parameters:
color- the new diffuse color of this light.
-
getSpecularColor
Description copied from interface:LightReturn the specular color of this light;- Specified by:
getSpecularColorin interfaceLight- Returns:
- the specular color of this light;
-
setSpecularColor
Description copied from interface:LightSet the specular color of this light.- Specified by:
setSpecularColorin interfaceLight- Parameters:
color- the new specular color of this light.
-
getPosition
Description copied from interface:LightReturn the light position.- Specified by:
getPositionin interfaceLight- Returns:
- the light position.
-
setPosition
Description copied from interface:LightSet the light position.- Specified by:
setPositionin interfaceLight- Parameters:
position- the new position.
-
getSpotDirection
Description copied from interface:LightReturn the spot direction.- Specified by:
getSpotDirectionin interfaceLight- Returns:
- the spot direction.
-
setSpotDirection
Description copied from interface:LightSet the spot direction.- Specified by:
setSpotDirectionin interfaceLight- Parameters:
spotDirection- the new spot direction.
-
getSpotAngle
public float getSpotAngle()Description copied from interface:LightReturn the spot angle.- Specified by:
getSpotAnglein interfaceLight- Returns:
- the spot angle.
-
setSpotAngle
public void setSpotAngle(float angle) Description copied from interface:LightSet the spot angle.- Specified by:
setSpotAnglein interfaceLight- Parameters:
angle- the new spot angle.
-
getIndex
public int getIndex()Description copied from interface:LightReturn the light index.
-