Property | Type | Description | |
---|---|---|---|
_colorBuffer | Color[][] | ||
_depthBuffer | SharedDepthBuffer | ||
horRes | int |
Method | Description | |
---|---|---|
Rasterizer ( int horRes, int vertRes ) |
Creates a new Rasterizer.
|
|
draw ( GraphicsDevice device ) : void |
Called by Game1, draws the final image. This happens independent of a call to Rasterizer.render. If this method is called without calling Rasterizer.render prior to it, an empty screen appears.
|
|
loadContent ( GraphicsDevice device, ContentManager cm ) : void |
Called by Game1. Initializes textures, buffers, etc.
|
|
render ( Object3D object3D, Camera fromPerspective, int threadIndex ) : void |
Renders the sparse voxel octree stored in obj. - Viewing frustum culling - Level of detail
|
Method | Description | |
---|---|---|
traverse ( Object3D obj, uint offset, int x, int y, int z, Matrix projection, Matrix worldView, Matrix worldViewProjection, byte level, float halfDim, int threadIndex, Vector3 octreeMin ) : void |
Traverses all octree nodes and draws them. Used by Rasterizer.render.
|
public Rasterizer ( int horRes, int vertRes ) | ||
horRes | int | Horizontal screen resolution. |
vertRes | int | Vertixal screen resolution. |
public loadContent ( GraphicsDevice device, ContentManager cm ) : void | ||
device | GraphicsDevice | |
cm | ContentManager | |
return | void |
public render ( Object3D object3D, Camera fromPerspective, int threadIndex ) : void | ||
object3D | Object3D | The object to be rendered. |
fromPerspective | Camera | The camera this model shall be rendered from. |
threadIndex | int | The index of the calling thread, starting by 0. |
return | void |