Constructor and Description |
---|
JoGLLight(GL2 gl,
int index)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
Color |
getAmbientColor()
Return the ambient color of this light;
|
Color |
getDiffuseColor()
Return the diffuse color of this light;
|
Vector3d |
getDirection()
Get the light direction.
|
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 |
setDirection(Vector3d direction)
Set the light direction.
|
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.
|
public JoGLLight(GL2 gl, int index)
gl
- the gl context.index
- the light index.public void reload(GL2 gl)
gl
- the gl context.public boolean isEnable()
Light
public void setEnable(boolean enable)
Light
public Color getAmbientColor()
Light
getAmbientColor
in interface Light
public void setAmbientColor(Color color)
Light
setAmbientColor
in interface Light
color
- the new ambient color of this light.public Color getDiffuseColor()
Light
getDiffuseColor
in interface Light
public void setDiffuseColor(Color color)
Light
setDiffuseColor
in interface Light
color
- the new diffuse color of this light.public Color getSpecularColor()
Light
getSpecularColor
in interface Light
public void setSpecularColor(Color color)
Light
setSpecularColor
in interface Light
color
- the new specular color of this light.public Vector3d getPosition()
Light
getPosition
in interface Light
public void setPosition(Vector3d position)
Light
setPosition
in interface Light
position
- the new position.public Vector3d getDirection()
Light
getDirection
in interface Light
public void setDirection(Vector3d direction)
Light
setDirection
in interface Light
public Vector3d getSpotDirection()
Light
getSpotDirection
in interface Light
public void setSpotDirection(Vector3d spotDirection)
Light
setSpotDirection
in interface Light
spotDirection
- the new spot direction.public float getSpotAngle()
Light
getSpotAngle
in interface Light
public void setSpotAngle(float angle)
Light
setSpotAngle
in interface Light
angle
- the new spot angle.