|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectgov.nasa.worldwind.render.BasicLightingModel
public class BasicLightingModel
Provides a simple lighting model with one light. This model uses only OpenGL light 0.
| Field Summary | |
|---|---|
protected long |
frameID
|
protected Vec4 |
lightDirection
|
protected OGLStackHandler |
lightingStackHandler
|
protected Material |
lightMaterial
|
| Constructor Summary | |
|---|---|
BasicLightingModel()
|
|
| Method Summary | |
|---|---|
protected void |
apply(DrawContext dc)
|
protected void |
applyStandardLightDirection(GL2 gl,
int light,
Vec4 direction)
|
protected static void |
applyStandardLightMaterial(GL2 gl,
int light,
Material material)
|
protected void |
applyStandardLightModel(GL2 gl)
|
protected void |
applyStandardShadeModel(GL2 gl)
|
void |
beginLighting(DrawContext dc)
Initializes the OpenGL state necessary to effect the lighting model. |
void |
endLighting(DrawContext dc)
Restores state set by LightingModel.beginLighting(DrawContext) to its original state. |
Vec4 |
getLightDirection()
Returns the model's light direction. |
Material |
getLightMaterial()
Returns the model's light material. |
void |
setLightDirection(Vec4 lightDirection)
Specifies the model's light direction. |
void |
setLightMaterial(Material lightMaterial)
Specifies the model's light direction. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected long frameID
protected Vec4 lightDirection
protected OGLStackHandler lightingStackHandler
protected Material lightMaterial
| Constructor Detail |
|---|
public BasicLightingModel()
| Method Detail |
|---|
protected void apply(DrawContext dc)
protected void applyStandardLightDirection(GL2 gl,
int light,
Vec4 direction)
protected static void applyStandardLightMaterial(GL2 gl,
int light,
Material material)
protected void applyStandardLightModel(GL2 gl)
protected void applyStandardShadeModel(GL2 gl)
public void beginLighting(DrawContext dc)
LightingModel
beginLighting in interface LightingModeldc - the current draw context.DrawContext.setStandardLightingModel(LightingModel),
DrawContext.endStandardLighting()public void endLighting(DrawContext dc)
LightingModelLightingModel.beginLighting(DrawContext) to its original state.
endLighting in interface LightingModeldc - the current draw context.public Vec4 getLightDirection()
public Material getLightMaterial()
public void setLightDirection(Vec4 lightDirection)
lightDirection - the model's light direction.
IllegalArgumentException - if the light direction is null.public void setLightMaterial(Material lightMaterial)
lightMaterial - the model's light material.
IllegalArgumentException - if the light material is null.
|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||