|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object vmm.core3D.LightSettings
public class LightSettings
This class encapsulates the data associated with a lighting environment that will be used to implement Phong Lighting to illuminate a surface, using either Flat Shading (each patch has a constant color) or Phong Shading (each pixel gets its own color). There is a point source light0 located at ViewPoint and three directional lights. Also provided is an ambient light color, a Specular Ratio, and a Specular Exponent.
Field Summary | |
---|---|
static int |
DEFAULTS
To be used as a parameter to the one-parameter constructor, representing default light settings. |
static int |
DISTICTLY_COLORED_SIDES_DEFAULT
To be used as a parameter to the one-parameter constructor, representing settings appropriate for "distinctly colored sides". |
static int |
HIGH_SPECULARITY_DEFAULT
To be used as a parameter to the one-parameter constructor, representing light settings which are the same as the default settings, except for the value of specular exponent and specular ratio and a small increase in ambient light. |
static int |
WHITE_LIGHT
To be used as a parameter to the one-parameter constructor, representing a light setting in which all lights are white. |
Constructor Summary | |
---|---|
LightSettings()
This constructor creates a default LightSettings object that agrees with the one used by 3D-XplorMath. |
|
LightSettings(float R0,
float G0,
float B0,
float R1,
float G1,
float B1,
float R2,
float G2,
float B2,
float R3,
float G3,
float B3,
float RA,
float GA,
float BA,
double x1,
double y1,
double z1,
double x2,
double y2,
double z2,
double x3,
double y3,
double z3,
float specRatio,
int specExponent)
This constructor creates a new LightSettings from a list of RGB components of the light colors and direction cosines for the directions the lights are coming from, and finally the specular exponent and ratio |
|
LightSettings(int code)
Create one of the default light settings. |
Method Summary | |
---|---|
java.awt.Color |
getAmbientLight()
|
DirectionalLight |
getDirectionalLight1()
|
DirectionalLight |
getDirectionalLight2()
|
DirectionalLight |
getDirectionalLight3()
|
java.awt.Color |
getLight0()
|
int |
getSpecularExponent()
|
float |
getSpecularRatio()
|
void |
setAmbientLight(java.awt.Color ambientLight)
|
void |
setDirectionalLight1(DirectionalLight directionalLight1)
|
void |
setDirectionalLight2(DirectionalLight directionalLight2)
|
void |
setDirectionalLight3(DirectionalLight directionalLight3)
|
void |
setLight0(java.awt.Color light0)
|
void |
setSpecularExponent(int specularExponent)
|
void |
setSpecularRatio(float specularRatio)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int DEFAULTS
public static final int DISTICTLY_COLORED_SIDES_DEFAULT
public static final int WHITE_LIGHT
public static final int HIGH_SPECULARITY_DEFAULT
Constructor Detail |
---|
public LightSettings(float R0, float G0, float B0, float R1, float G1, float B1, float R2, float G2, float B2, float R3, float G3, float B3, float RA, float GA, float BA, double x1, double y1, double z1, double x2, double y2, double z2, double x3, double y3, double z3, float specRatio, int specExponent)
public LightSettings()
public LightSettings(int code)
Method Detail |
---|
public java.awt.Color getAmbientLight()
public void setAmbientLight(java.awt.Color ambientLight)
public DirectionalLight getDirectionalLight1()
public void setDirectionalLight1(DirectionalLight directionalLight1)
public DirectionalLight getDirectionalLight2()
public void setDirectionalLight2(DirectionalLight directionalLight2)
public DirectionalLight getDirectionalLight3()
public void setDirectionalLight3(DirectionalLight directionalLight3)
public java.awt.Color getLight0()
public void setLight0(java.awt.Color light0)
public int getSpecularExponent()
public void setSpecularExponent(int specularExponent)
public float getSpecularRatio()
public void setSpecularRatio(float specularRatio)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |