com.brackeen.javagamebook.graphics3D
Class ShadedTexturedPolygonRenderer

java.lang.Object
  extended bycom.brackeen.javagamebook.graphics3D.PolygonRenderer
      extended bycom.brackeen.javagamebook.graphics3D.FastTexturedPolygonRenderer
          extended bycom.brackeen.javagamebook.graphics3D.ShadedTexturedPolygonRenderer

public class ShadedTexturedPolygonRenderer
extends FastTexturedPolygonRenderer

The ShadedTexturedPolygonRenderer class is a PolygonRenderer that renders ShadedTextured dynamically with one light source. By default, the ambient light intensity is 0.5 and there is no point light.


Nested Class Summary
 
Nested classes inherited from class com.brackeen.javagamebook.graphics3D.FastTexturedPolygonRenderer
FastTexturedPolygonRenderer.Method0, FastTexturedPolygonRenderer.Method1, FastTexturedPolygonRenderer.Method2, FastTexturedPolygonRenderer.Method3, FastTexturedPolygonRenderer.PowerOf2TextureRenderer, FastTexturedPolygonRenderer.ScanRenderer, FastTexturedPolygonRenderer.ShadedSurfaceRenderer, FastTexturedPolygonRenderer.ShadedTextureRenderer
 
Field Summary
 
Fields inherited from class com.brackeen.javagamebook.graphics3D.FastTexturedPolygonRenderer
INTERP_SIZE, INTERP_SIZE_BITS, SCALE, SCALE_BITS
 
Constructor Summary
ShadedTexturedPolygonRenderer(Transform3D camera, ViewWindow viewWindow)
           
ShadedTexturedPolygonRenderer(Transform3D camera, ViewWindow viewWindow, boolean clearViewEveryFrame)
           
 
Method Summary
 float getAmbientLightIntensity()
          Gets the ambient light intensity.
 PointLight3D getLightSource()
          Gets the light source for this renderer.
 void setAmbientLightIntensity(float i)
          Sets the ambient light intensity, generally between 0 and 1.
 void setLightSource(PointLight3D lightSource)
          Sets the light source for this renderer.
 
Methods inherited from class com.brackeen.javagamebook.graphics3D.FastTexturedPolygonRenderer
endFrame, startFrame
 
Methods inherited from class com.brackeen.javagamebook.graphics3D.PolygonRenderer
draw, getCamera
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ShadedTexturedPolygonRenderer

public ShadedTexturedPolygonRenderer(Transform3D camera,
                                     ViewWindow viewWindow)

ShadedTexturedPolygonRenderer

public ShadedTexturedPolygonRenderer(Transform3D camera,
                                     ViewWindow viewWindow,
                                     boolean clearViewEveryFrame)
Method Detail

getLightSource

public PointLight3D getLightSource()
Gets the light source for this renderer.


setLightSource

public void setLightSource(PointLight3D lightSource)
Sets the light source for this renderer.


getAmbientLightIntensity

public float getAmbientLightIntensity()
Gets the ambient light intensity.


setAmbientLightIntensity

public void setAmbientLightIntensity(float i)
Sets the ambient light intensity, generally between 0 and 1.