|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.jme.util.LightStateCreator
The LightStateCreator class is used to sort lights in a scene.
The utility allows the user to place multiple lights in a single container and
the best eight lights (those lights that most directly affect a Spatial) will be
applied.
| Constructor Summary | |
LightStateCreator()
Creates a new instance of LightStateCreator |
|
| Method Summary | |
void |
addLight(Light l)
Adds a light for the controller to sort into a spatial. |
LightState |
createLightState(Spatial sp)
Creates a new LightState for a spatial placing the "best" eight lights currently maintained by the LightStateCreator. |
Light |
get(int i)
Gets the Ith light from the creator. |
protected float |
getColorValue(Light l)
|
protected float |
getValueFor(Light l,
BoundingVolume val)
|
protected float |
max(ColorRGBA a)
|
int |
numberOfLights()
Returns the number of lights in the creator. |
protected void |
quickSort(int minindex,
int maxindex,
Spatial sp)
|
void |
resortLightsFor(LightState ls,
Spatial sp)
Gives the LightState the best possible lights for the Spatial. |
protected void |
swap(int a,
int b)
Swaps point a and b in the list |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public LightStateCreator()
| Method Detail |
public void addLight(Light l)
public Light get(int i)
public int numberOfLights()
public LightState createLightState(Spatial sp)
public void resortLightsFor(LightState ls,
Spatial sp)
protected void quickSort(int minindex,
int maxindex,
Spatial sp)
protected void swap(int a,
int b)
protected float max(ColorRGBA a)
protected float getColorValue(Light l)
protected float getValueFor(Light l,
BoundingVolume val)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||