|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.brackeen.javagamebook.math3D.Vector3D
com.brackeen.javagamebook.math3D.PointLight3D
A PointLight3D is a point light that has an intensity (between 0 and 1) and optionally a distance falloff value, which causes the light to diminish with distance.
Field Summary | |
static float |
NO_DISTANCE_FALLOFF
|
Fields inherited from class com.brackeen.javagamebook.math3D.Vector3D |
x, y, z |
Constructor Summary | |
PointLight3D()
Creates a new PointLight3D at (0,0,0) with an intensity of 1 and no distance falloff. |
|
PointLight3D(float x,
float y,
float z,
float intensity)
Creates a new PointLight3D with the specified location and intensity. |
|
PointLight3D(float x,
float y,
float z,
float intensity,
float distanceFalloff)
Creates a new PointLight3D with the specified location. |
|
PointLight3D(PointLight3D p)
Creates a copy of the specified PointLight3D. |
Method Summary | |
float |
getDistanceFalloff()
Gets the distances falloff value. |
float |
getIntensity()
Gets the intensity of this light. |
float |
getIntensity(float distance)
Gets the intensity of this light from the specified distance. |
void |
setDistanceFalloff(float distanceFalloff)
Sets the distances falloff value. |
void |
setIntensity(float intensity)
Sets the intensity of this light. |
void |
setTo(PointLight3D p)
Sets this PointLight3D to the same location, intensity, and distance falloff as the specified PointLight3D. |
Methods inherited from class com.brackeen.javagamebook.math3D.Vector3D |
add, add, add, addRotation, divide, equals, equals, getDistance, getDistanceSq, getDotProduct, length, multiply, normalize, rotateX, rotateX, rotateY, rotateY, rotateZ, rotateZ, setLength, setTo, setTo, setToCrossProduct, subtract, subtract, subtract, subtractRotation, toString |
Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final float NO_DISTANCE_FALLOFF
Constructor Detail |
public PointLight3D()
public PointLight3D(PointLight3D p)
public PointLight3D(float x, float y, float z, float intensity)
public PointLight3D(float x, float y, float z, float intensity, float distanceFalloff)
Method Detail |
public void setTo(PointLight3D p)
public float getIntensity(float distance)
public float getIntensity()
public void setIntensity(float intensity)
public float getDistanceFalloff()
public void setDistanceFalloff(float distanceFalloff)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |