#include <cbuffer.h>
Inheritance diagram for csCBuffer:

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 |
Note that all ranges specified in this class are inclusive.
|
|
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. |
|
|
Test if a given point is visible in the c-buffer. Returns true if visible (i.e. c-buffer is empty at that point). |
|
|
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. |