public class LightModel extends java.lang.Object implements CCRenderState.IVertexOperation
| Modifier and Type | Class and Description |
|---|---|
static class |
LightModel.Light |
| Modifier and Type | Field and Description |
|---|---|
static int |
operationIndex |
static LightModel |
standardLightModel |
| Constructor and Description |
|---|
LightModel() |
| Modifier and Type | Method and Description |
|---|---|
LightModel |
addLight(LightModel.Light light) |
int |
apply(int colour,
Vector3 normal) |
boolean |
load()
Load any required references and add dependencies to the pipeline based on the current model (may be null)
Return false if this operation is redundant in the pipeline with the given model
|
void |
operate()
Perform the operation on the current render state
|
int |
operationID()
Get the unique id representing this type of operation.
|
PlanarLightModel |
reducePlanar() |
LightModel |
setAmbient(Vector3 vec) |
public static final int operationIndex
public static LightModel standardLightModel
public LightModel addLight(LightModel.Light light)
public LightModel setAmbient(Vector3 vec)
public int apply(int colour,
Vector3 normal)
colour - The pre-lighting vertex colour. RGBA formatnormal - The normal at the vertexpublic boolean load()
CCRenderState.IVertexOperationload in interface CCRenderState.IVertexOperationpublic void operate()
CCRenderState.IVertexOperationoperate in interface CCRenderState.IVertexOperationpublic int operationID()
CCRenderState.IVertexOperationoperationID in interface CCRenderState.IVertexOperationpublic PlanarLightModel reducePlanar()