org.scilab.forge.scirenderer.implementation.jogl.lightning
Class JoGLLight

java.lang.Object
  extended by org.scilab.forge.scirenderer.implementation.jogl.lightning.JoGLLight
All Implemented Interfaces:
Light

public class JoGLLight
extends java.lang.Object
implements Light

Author:
Pierre Lando

Constructor Summary
JoGLLight(GL2 gl, int index)
          Default constructor.
 
Method Summary
 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(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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JoGLLight

public JoGLLight(GL2 gl,
                 int index)
Default constructor.

Parameters:
gl - the gl context.
index - the light index.
Method Detail

reload

public void reload(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.

Specified by:
isEnable in interface Light
Returns:
the status of this light.

setEnable

public void setEnable(boolean enable)
Description copied from interface: Light
Set the status of this light.

Specified by:
setEnable in interface Light
Parameters:
enable - the new status of this light.

getAmbientColor

public Color getAmbientColor()
Description copied from interface: Light
Return the ambient color of this light;

Specified by:
getAmbientColor in interface Light
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 interface Light
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 interface Light
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 interface Light
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 interface Light
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 interface Light
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 interface Light
Returns:
the light position.

setPosition

public void setPosition(Vector3d position)
Description copied from interface: Light
Set the light position.

Specified by:
setPosition in interface Light
Parameters:
position - the new position.

getSpotDirection

public Vector3d getSpotDirection()
Description copied from interface: Light
Return the spot direction.

Specified by:
getSpotDirection in interface Light
Returns:
the spot direction.

setSpotDirection

public void setSpotDirection(Vector3d spotDirection)
Description copied from interface: Light
Set the spot direction.

Specified by:
setSpotDirection in interface Light
Parameters:
spotDirection - the new spot direction.

getSpotAngle

public float getSpotAngle()
Description copied from interface: Light
Return the spot angle.

Specified by:
getSpotAngle in interface Light
Returns:
the spot angle.

setSpotAngle

public void setSpotAngle(float angle)
Description copied from interface: Light
Set the spot angle.

Specified by:
setSpotAngle in interface Light
Parameters:
angle - the new spot angle.

getIndex

public int getIndex()
Description copied from interface: Light
Return the light index.

Specified by:
getIndex in interface Light
Returns:
the light index.