Class JoGLLight
- java.lang.Object
-
- org.scilab.forge.scirenderer.implementation.jogl.lightning.JoGLLight
-
-
Constructor Summary
Constructors Constructor Description JoGLLight(com.jogamp.opengl.GL2 gl, int index)
Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Color
getAmbientColor()
Return the ambient color of this light;Color
getDiffuseColor()
Return the diffuse color of this light;int
getIndex()
Return the light index.Vector3d
getPosition()
Return the light position.Color
getSpecularColor()
Return the specular color of this light;float
getSpotAngle()
Return the spot angle.Vector3d
getSpotDirection()
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.
-
-
-
Method Detail
-
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
public Color 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
public void setAmbientColor(Color color)
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
public Color 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
public void setDiffuseColor(Color color)
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
public Color 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
public void setSpecularColor(Color color)
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
public Vector3d getPosition()
Description copied from interface:Light
Return the light position.- Specified by:
getPosition
in interfaceLight
- Returns:
- the light position.
-
setPosition
public void setPosition(Vector3d position)
Description copied from interface:Light
Set the light position.- Specified by:
setPosition
in interfaceLight
- Parameters:
position
- the new position.
-
getSpotDirection
public Vector3d getSpotDirection()
Description copied from interface:Light
Return the spot direction.- Specified by:
getSpotDirection
in interfaceLight
- Returns:
- the spot direction.
-
setSpotDirection
public void setSpotDirection(Vector3d spotDirection)
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.
-
-