|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.rico.engine.effect.light.ogllight.AbstractLight
de.rico.engine.effect.light.ogllight.PositionalLight
public class PositionalLight
This class represents a positional OpenGL light.
Constructor Summary | |
---|---|
PositionalLight(int lightNumber)
Creates a positional light with the specified number |
Method Summary | |
---|---|
void |
bind(javax.media.opengl.GL gl)
Starts using the light. |
float |
getConstAttenuation()
Returns the constant attenuation factor of the light |
float |
getLinearAttenuation()
Returns the linear attenuation factor. |
Point3D |
getPosition()
Returns the position of the light as new Point3D object |
float |
getQuadraticAttenuation()
Returns the quadric attenuation factor. |
void |
setConstAttenuation(float constAttenuation)
Sets the constant attenuation factor [0,1]. |
void |
setLinearAttenuation(float linearAttenuation)
Sets the linear attenuation factor [0,1]. |
void |
setPosition(float x,
float y,
float z)
Sets the position of the light |
void |
setPosition(Point3D pos)
Sets the position of the light |
void |
setQuadraticAttenuation(float quadraticAttenuation)
Sets the quadric attenuation factor [0,1]. |
void |
setShowLightPosition(boolean show)
Determines whether the light's position will be symbolized by a little solid cube. |
void |
setX(float x)
Sets the x-position of the light |
void |
setY(float y)
Sets the y-position of the light |
void |
setZ(float z)
Sets the z-position of the light |
Methods inherited from class de.rico.engine.effect.light.ogllight.AbstractLight |
---|
destroy, getAmbient, getDiffuse, getLightNr, getLightNrOGLConst, getSpecular, isEnabled, release, setAmbient, setAmbient, setDiffuse, setDiffuse, setEnabled, setSpecular, setSpecular |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface de.rico.engine.effect.light.LightIface |
---|
destroy, release, setEnabled |
Constructor Detail |
---|
public PositionalLight(int lightNumber)
lightNumber
- light number from 0 to 7Method Detail |
---|
public void setShowLightPosition(boolean show)
show
- Symbolize light position? --> true = yes, false = nopublic void bind(javax.media.opengl.GL gl)
LightIface
bind
in interface LightIface
bind
in class AbstractLight
public void setPosition(float x, float y, float z)
PositionalLightIface
setPosition
in interface PositionalLightIface
x
- x-coordinatey
- y-coordinatez
- z-coordinatepublic void setPosition(Point3D pos)
PositionalLightIface
setPosition
in interface PositionalLightIface
pos
- light positionpublic void setX(float x)
PositionalLightIface
setX
in interface PositionalLightIface
x
- new x-coordinatepublic void setY(float y)
PositionalLightIface
setY
in interface PositionalLightIface
y
- new y-coordinatepublic void setZ(float z)
PositionalLightIface
setZ
in interface PositionalLightIface
z
- new z-coordinatepublic Point3D getPosition()
PositionalLightIface
getPosition
in interface PositionalLightIface
public float getConstAttenuation()
public void setConstAttenuation(float constAttenuation)
constAttenuation
- constant attenuationpublic float getLinearAttenuation()
public void setLinearAttenuation(float linearAttenuation)
linearAttenuation
- linear attenuationpublic float getQuadraticAttenuation()
public void setQuadraticAttenuation(float quadraticAttenuation)
quadraticAttenuation
- quadric attenuation
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |