|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Light
This interface describes a Light. Default Light
instances
may be created with the Lights
class. Lights may be added
to the LightSetup
that usually is part of a
SwoglApplication
.
All methods will store copies of the given arguments, or return
copies of the internal state, respectively.
Nested Class Summary | |
---|---|
static class |
Light.Type
The type of a Light |
Method Summary | |
---|---|
void |
addLightListener(LightListener lightListener)
Add the given LightListener to be informed about
modifications of this Light . |
javax.vecmath.Color4f |
getAmbientColor()
Return the ambient color of this Light . |
float |
getConstantAttenuation()
Return the constant attenuation of this Light . |
javax.vecmath.Color4f |
getDiffuseColor()
Return the diffuse color of this Light . |
javax.vecmath.Vector3f |
getDirection()
Return the direction of this Light . |
float |
getLinearAttenuation()
Return the linear attenuation of this Light . |
javax.vecmath.Point3f |
getPosition()
Return the position of this Light . |
float |
getQuadraticAttenuation()
Return the quadratic attenuation of this Light . |
javax.vecmath.Color4f |
getSpecularColor()
Return the specular color of this Light . |
float |
getSpotCutoff()
Return the cutoff angle of this Light , in degrees. |
float |
getSpotExponent()
Return the spot light attenuation exponent. |
Light.Type |
getType()
Returns the Light.Type of this Light |
void |
removeLightListener(LightListener lightListener)
Remove the given LightListener |
void |
setAmbientColor(float r,
float g,
float b,
float a)
Set the ambient color of this Light |
void |
setAmbientColor(javax.vecmath.Tuple4f ambient)
Set the ambient color of this Light |
void |
setConstantAttenuation(float constant)
Set the constant attenuation of this Light |
void |
setDiffuseColor(float r,
float g,
float b,
float a)
Set the diffuse color of this Light |
void |
setDiffuseColor(javax.vecmath.Tuple4f diffuse)
Set the diffuse color of this Light |
void |
setDirection(float x,
float y,
float z)
Set the direction of this Light
For point lights,
this value has no effect. |
void |
setDirection(javax.vecmath.Tuple3f direction)
Set the direction of this Light
For point lights,
this value has no effect. |
void |
setLinearAttenuation(float linear)
Set the linear attenuation of this Light |
void |
setPosition(float x,
float y,
float z)
Set the position of this Light . |
void |
setPosition(javax.vecmath.Tuple3f position)
Set the position of this Light . |
void |
setQuadraticAttenuation(float quadratic)
Set the quadratic attenuation of this Light |
void |
setSpecularColor(float r,
float g,
float b,
float a)
Set the specular color of this Light |
void |
setSpecularColor(javax.vecmath.Tuple4f specular)
Set the specular color of this Light |
void |
setSpotCutoff(float cutoff)
Set the spot cutoff angle of this Light , in degrees. |
void |
setSpotExponent(float spotExponent)
Set the spot exponent of this Light . |
Method Detail |
---|
Light.Type getType()
Light.Type
of this Light
Light.Type
void setAmbientColor(javax.vecmath.Tuple4f ambient)
Light
ambient
- The ambient colorvoid setAmbientColor(float r, float g, float b, float a)
Light
r
- The red componentg
- The green componentb
- The blue componenta
- The alpha componentjavax.vecmath.Color4f getAmbientColor()
Light
.
void setDiffuseColor(javax.vecmath.Tuple4f diffuse)
Light
diffuse
- The diffuse colorvoid setDiffuseColor(float r, float g, float b, float a)
Light
r
- The red componentg
- The green componentb
- The blue componenta
- The alpha componentjavax.vecmath.Color4f getDiffuseColor()
Light
.
void setSpecularColor(javax.vecmath.Tuple4f specular)
Light
specular
- The specular colorvoid setSpecularColor(float r, float g, float b, float a)
Light
r
- The red componentg
- The green componentb
- The blue componenta
- The alpha componentjavax.vecmath.Color4f getSpecularColor()
Light
.
void setPosition(javax.vecmath.Tuple3f position)
Light
.
For directional
lights,
this value has no effect.
position
- The positionvoid setPosition(float x, float y, float z)
Light
.
For directional
lights,
this value has no effect.
x
- The x coordinatey
- The y coordinatez
- The z coordinatejavax.vecmath.Point3f getPosition()
Light
.
void setDirection(javax.vecmath.Tuple3f direction)
Light
For point
lights,
this value has no effect.
direction
- The directionvoid setDirection(float x, float y, float z)
Light
For point
lights,
this value has no effect.
x
- The x coordinatey
- The y coordinatez
- The z coordinatejavax.vecmath.Vector3f getDirection()
Light
.
void setConstantAttenuation(float constant)
Light
constant
- The attenuationfloat getConstantAttenuation()
Light
.
void setLinearAttenuation(float linear)
Light
linear
- The attenuationfloat getLinearAttenuation()
Light
.
void setQuadraticAttenuation(float quadratic)
Light
quadratic
- The attenuationfloat getQuadraticAttenuation()
Light
.
void setSpotCutoff(float cutoff)
Light
, in degrees.
The given value will be clamped to be in the range [0,90].
This value will only be used for
spot
lights.
cutoff
- The cutofffloat getSpotCutoff()
Light
, in degrees. The
value will be in the range [0,90]
void setSpotExponent(float spotExponent)
Light
. The light is
attenuated from the center to the edge of the spot cone.
Higher exponents result in more focused lights.
This value will only be used for
spot
lights.
spotExponent
- The spot exponentfloat getSpotExponent()
void addLightListener(LightListener lightListener)
LightListener
to be informed about
modifications of this Light
.
lightListener
- The listener to addvoid removeLightListener(LightListener lightListener)
LightListener
lightListener
- The listener to remove
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |