|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.jme.scene.state.RenderState
com.jme.scene.state.LightState
LightState maintains a collection of lights up to the set
number of maximum lights allowed. Any subclass of Light can
be added to the light state. Each light is processed and used to modify
the color of the scene.
| Field Summary | |
static int |
COMBINE_CLOSEST
Combine light states starting from the given Spatial and working towards the root. |
static int |
COMBINE_FIRST
Combine light states starting from the root node and working towards the given Spatial. |
static int |
COMBINE_RECENT_ENABLED
Similar to COMBINE_CLOSEST, but if a disabled state is encountered, it will stop combining at that point. |
static int |
INHERIT
Inherit mode from parent. |
static int |
MAX_LIGHTS_ALLOWED
defines the maximum number of lights that are allowed to be maintained at one time. |
static int |
OFF
Ignore lights. |
static int |
REPLACE
Do not combine light states, just use the most recent one. |
protected boolean |
twoSidedOn
When true, both sides of the model will be lighted. |
| Fields inherited from class com.jme.scene.state.RenderState |
RS_ALPHA, RS_ATTRIBUTE, RS_CULL, RS_DITHER, RS_FOG, RS_FRAGMENT_PROGRAM, RS_GLSL_SHADER_OBJECTS, RS_LIGHT, RS_MATERIAL, RS_MAX_STATE, RS_SHADE, RS_STENCIL, RS_TEXTURE, RS_VERTEX_PROGRAM, RS_WIREFRAME, RS_ZBUFFER |
| Constructor Summary | |
LightState()
Constructor instantiates a new LightState object. |
|
| Method Summary | |
boolean |
attach(Light light)
attach places a light in the queue to be processed. |
void |
detach(Light light)
detach removes a light from the queue for processing. |
void |
detachAll()
detachAll clears the queue of all lights to be processed. |
Light |
get(int i)
get retrieves a particular light defined by an index. |
int |
getQuantity()
getQuantity returns the number of lights currently in the
queue. |
boolean |
getTwoSidedLighting()
Returns the current state of two sided lighting for this LightState. |
int |
getType()
getType returns the type of render state this is. |
void |
setTwoSidedLighting(boolean twoSidedOn)
Sets if two sided lighting should be enabled for this LightState. |
| Methods inherited from class com.jme.scene.state.RenderState |
apply, extract, isEnabled, setEnabled |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int MAX_LIGHTS_ALLOWED
public static final int OFF
public static final int COMBINE_FIRST
public static final int COMBINE_CLOSEST
public static final int COMBINE_RECENT_ENABLED
public static final int INHERIT
public static final int REPLACE
protected boolean twoSidedOn
| Constructor Detail |
public LightState()
LightState object. Initially
there are no lights set.
| Method Detail |
public int getType()
getType returns the type of render state this is.
(RS_LIGHT).
getType in class RenderStateRenderState.getType()public boolean attach(Light light)
attach places a light in the queue to be processed. If
there are already eight lights placed in the queue, the light is
ignored and false is returned. Otherwise, true is returned to indicate
success.
light - the light to add to the queue.
public void detach(Light light)
detach removes a light from the queue for processing.
light - the light to be removed.public void detachAll()
detachAll clears the queue of all lights to be processed.
public Light get(int i)
get retrieves a particular light defined by an index.
If there exists no light at a particular index, null is returned.
i - the index to retrieve the light from the queue.
public int getQuantity()
getQuantity returns the number of lights currently in the
queue.
public void setTwoSidedLighting(boolean twoSidedOn)
twoSidedOn - If true, two sided lighting is enabled.public boolean getTwoSidedLighting()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||