public class PointLight extends Light
The attenuation of the point light is proportional to
1/(A0+A1*d+A2*d*d) where d is the distant of the
illuminated point from the light.
Set these attenuation factors using setFalloff(double, double, double).
TODO: Somebody needs to document what the shadow map settings are for.
| Constructor and Description |
|---|
PointLight() |
PointLight(String name) |
| Modifier and Type | Method and Description |
|---|---|
void |
accept(SceneGraphVisitor v)
The accept method for a SceneGraphVisitor.
|
double |
getFalloffA0() |
double |
getFalloffA1() |
double |
getFalloffA2() |
String |
getShadowMap() |
int |
getShadowMapX() |
int |
getShadowMapY() |
boolean |
isUseShadowMap() |
void |
setFalloff(double[] atten)
Deprecated.
do we need that method?
|
void |
setFalloff(double a0,
double a1,
double a2) |
void |
setFalloffA0(double falloffA0)
Sets the falloffA0.
|
void |
setFalloffA1(double falloffA1)
Sets the falloffA1.
|
void |
setFalloffA2(double falloffA2)
Sets the falloffA2.
|
void |
setShadowMap(String shadowMap)
Sets the shadowMap.
|
void |
setShadowMapX(int shadowMapX)
Sets the shadowMapX.
|
void |
setShadowMapY(int shadowMapY)
Sets the shadowMapY.
|
void |
setUseShadowMap(boolean useShadowMap)
Sets the useShadowMap.
|
addLightListener, getColor, getIntensity, getScaledColorAsFloat, isAmbientFake, isGlobal, removeLightListener, setAmbientFake, setColor, setGlobal, setIntensitygetName, getOwner, getThreadSafe, isReadOnly, setName, setOwner, setReadOnly, setThreadSafe, toStringpublic PointLight()
public PointLight(String name)
public double getFalloffA0()
public double getFalloffA1()
public double getFalloffA2()
public void setFalloffA0(double falloffA0)
falloffA0 - The falloffA0 to setpublic void setFalloffA1(double falloffA1)
falloffA1 - The falloffA1 to setpublic void setFalloffA2(double falloffA2)
falloffA2 - The falloffA2 to setpublic void setFalloff(double a0,
double a1,
double a2)
public void setFalloff(double[] atten)
atten - public String getShadowMap()
public boolean isUseShadowMap()
public void setShadowMap(String shadowMap)
shadowMap - The shadowMap to setpublic void setUseShadowMap(boolean useShadowMap)
useShadowMap - The useShadowMap to setpublic int getShadowMapX()
public int getShadowMapY()
public void setShadowMapX(int shadowMapX)
shadowMapX - The shadowMapX to setpublic void setShadowMapY(int shadowMapY)
shadowMapY - The shadowMapY to setpublic void accept(SceneGraphVisitor v)
SceneGraphNode