Google

Main Page   Class Hierarchy   Compound List   File List   Compound Members  

csCBuffer Class Reference

The CBuffer. More...

#include <cbuffer.h>

Inheritance diagram for csCBuffer:

csCBufferPersp List of all members.

Public Methods

 csCBuffer (int sx, int ex, int n_lines)
 Create a new c-buffer with the given dimensions.

 ~csCBuffer ()
 Destroy the c-buffer.

void Initialize ()
 Initialize the c-buffer to empty.

bool IsFull ()
 Return true if the screen (c-buffer) is full.

bool TestPolygon (csVector2 *verts, int num_verts)
 Take a polygon and test if it would have changed the c-buffer. More...

bool InsertPolygon (csVector2 *verts, int num_verts, bool negative=false)
 Take a polygon and insert all spans in the c-buffer. More...

bool TestPoint (const csVector2 &point)
 Test if a given point is visible in the c-buffer. More...

void DumpLine (int y)
 Dump debug information for a scanline.

void GfxDump (iGraphics2D *ig2d, iGraphics3D *ig3d)
 Do a graphical dump of the c-buffer contents on screen.


Friends

class  csCBufferLine

Detailed Description

The CBuffer.

Note that all ranges specified in this class are inclusive.


Member Function Documentation

bool csCBuffer::InsertPolygon ( csVector2 * verts,
int num_verts,
bool negative = false )
 

Take a polygon and insert all spans in the c-buffer.

Returns true if the polygon is visible. Note that this function will work with both clockwise and anti- clockwise oriented polygons and will assume both orientations are visible. Backface culling needs to be done elsewhere. If 'negative' is true the polygon is inserted inverted.

bool csCBuffer::TestPoint ( const csVector2 & point )
 

Test if a given point is visible in the c-buffer.

Returns true if visible (i.e. c-buffer is empty at that point).

bool csCBuffer::TestPolygon ( csVector2 * verts,
int num_verts )
 

Take a polygon and test if it would have changed the c-buffer.

This means that the polygon is visible. Polygon vertices are converted to integer before comparing. Note that this function will work with both clockwise and anti- clockwise oriented polygons and will assume both orientations are visible. Backface culling needs to be done elsewhere.


The documentation for this class was generated from the following file:
Generated for Crystal Space by doxygen 1.2.5 written by Dimitri van Heesch, ©1997-2000