|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.j3d.threeD.raytracer.lighting.PointLight
public class PointLight
An PointLight object represents a light which has its source at a point in the scene. The color and intensity of the light may by specified, but by default it is white light. Also, coefficients for distance attenuation may be specified also, but by default are 0.0, 0.0, and 1.0 (no attenuation).
| Field Summary |
|---|
| Fields inherited from interface net.sf.j3d.threeD.raytracer.lighting.Light |
|---|
castShadows |
| Constructor Summary | |
|---|---|
PointLight()
Constructs a PointLight object with the default intensity and color at the origin. |
|
PointLight(double intensity)
Constructs a PointLight object with the specified intensity and default color at the origin. |
|
PointLight(double intensity,
RGB color)
Constructs a PointLight object with the specified intensity and color at the origin. |
|
PointLight(Vector location)
Constructs a PointLight object with the specified location and default intensity and color. |
|
PointLight(Vector location,
double intensity,
RGB color)
Constructs a PointLight object with the specified location, intensity, and color. |
|
| Method Summary | |
|---|---|
double[] |
getAttenuationCoefficients()
Returns the coefficients a, b, and c for the quadratic function used for distance attenuation of the light represented by this PointLight object as an array of double values. |
RGB |
getColor()
Returns the color of this PointLight object as an RGB object. |
RGB |
getColorAt(Vector point)
Returns the color of the light represented by this PointLight object at the specified point as an RGB object. |
double |
getIntensity()
Returns the intensity of this PointLight object as a double value. |
Vector |
getLocation()
Returns the location of this PointLight object as a Vector object. |
void |
setAttenuationCoefficients(double a,
double b,
double c)
Sets the coefficients a, b, and c for the quadratic function used for distance attenuation of the light represented by this PointLight object to the specified double values. |
void |
setColor(RGB color)
Sets the color of this PointLight object to the color represented by the specified RGB object. |
void |
setIntensity(double intensity)
Sets the intensity of this PointLight object to the specified double value. |
void |
setLocation(Vector location)
Sets the location of this PointLight object to the location represented by the specified Vector object. |
String |
toString()
Returns "Point Light". |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public PointLight()
public PointLight(Vector location)
public PointLight(double intensity)
public PointLight(double intensity,
RGB color)
public PointLight(Vector location,
double intensity,
RGB color)
| Method Detail |
|---|
public void setIntensity(double intensity)
setIntensity in interface Lightpublic void setColor(RGB color)
setColor in interface Lightpublic void setLocation(Vector location)
public void setAttenuationCoefficients(double a,
double b,
double c)
public double getIntensity()
getIntensity in interface Lightpublic RGB getColor()
getColor in interface Lightpublic RGB getColorAt(Vector point)
getColorAt in interface Lightpublic Vector getLocation()
public double[] getAttenuationCoefficients()
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||