CubeTwister 2.0alpha141 2011-10-13

idx3d
Class idx3d_LinearRasterizer

java.lang.Object
  extended by idx3d.idx3d_Rasterizer
      extended by idx3d.idx3d_LinearRasterizer

public final class idx3d_LinearRasterizer
extends idx3d_Rasterizer

Linear rasterizer stage of the render pipeline.

This rasterizer performs linear interpolation of textures. Hence the algorithm is very fast but yields distortions when faces are not parallel to the camera plane.

For surfaces with large textured triangles use idx3d_PerspectiveRasterizer.

Version:
3.2.1 2004-08-31 Werner Randelshofer: Minor bug fixes and speed improvements.
3.2 2003-12-18 Werner Randelshofer: Supports now lightmaps of different resolutions. Dependency note: This change also requires changes in class idx3d_Lightmap. Changed the idBuffer array from int[] to short[] to save memory. The idBuffer only stores triangle id's now (instead of object id's in its upper 16 bit and the triangle id in the lower 16 bits). We do not need to store the object id in the idBuffer, because all triangles know their parent object. Changed the size of the idBuffer to the size of the display area (instead of to the size of the antialias screen, which is twice as big. Dependency note: These changes also require changes in class idx3d_Math, idx3d_RenderPipeline and idx3d_Scene. Method clearReferences added to allow for better memory management by the garbage collector. Dependency note: This change also requires changes in class idx3d_RenderPipeline. Moved responsibility for texture location from class idx3d_Vertex to this class. Dependency note: This change also requires changes in idx3d_Vertex, idx3d_Triangle, idx3d_TextureProjector, idx3d_Object. Removed all OR operations with the alpha channel. As we do not produce an RGB channel, we do not have to care about the bits contained in this channel. Dependency note: This requires that the idx3d_Screen produces an image without an RGB channel.

Field Summary
 boolean ready
           
 
Constructor Summary
idx3d_LinearRasterizer(idx3d_RenderPipeline pipeline)
           
 
Method Summary
 boolean isAntialiased()
           
 void loadLightmap(idx3d_Lightmap lm)
          Lightmap loader.
 void loadMaterial(idx3d_InternalMaterial material)
          Material loader.
 void render(idx3d_Triangle tri)
          Renderer.
 void setPipeline(idx3d_RenderPipeline pipeline)
          Render pipeline.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ready

public boolean ready
Constructor Detail

idx3d_LinearRasterizer

public idx3d_LinearRasterizer(idx3d_RenderPipeline pipeline)
Method Detail

setPipeline

public void setPipeline(idx3d_RenderPipeline pipeline)
Description copied from class: idx3d_Rasterizer
Render pipeline. By convention this method is only called by idx3d_RenderPipeline.

Specified by:
setPipeline in class idx3d_Rasterizer

isAntialiased

public boolean isAntialiased()

loadLightmap

public void loadLightmap(idx3d_Lightmap lm)
Description copied from class: idx3d_Rasterizer
Lightmap loader.

Specified by:
loadLightmap in class idx3d_Rasterizer

loadMaterial

public void loadMaterial(idx3d_InternalMaterial material)
Description copied from class: idx3d_Rasterizer
Material loader.

Specified by:
loadMaterial in class idx3d_Rasterizer

render

public void render(idx3d_Triangle tri)
Description copied from class: idx3d_Rasterizer
Renderer.

Specified by:
render in class idx3d_Rasterizer

(c) Werner Randelshofer.
All rights reserved.