// // zbuffer.h // // Handle depth buffer operations // // Copyright (c) J. Belson 1999.03.14 // #ifndef _ZBUFFER_H_ #define _ZBUFFER_H_ /** * A depth buffer for hidden surface removal during rendering */ class zbuffer { private: float *buffer; int width, height; public: zbuffer(int width, int height); ~zbuffer(); // Initialise to large -ve value void clear_buffer(void); // Write a depth to a row of pixels void set_line(int line, int x1, int x2, float depth); // Returns pointer to buffer at specified position float *get_buffer(int line, int x); }; #endif // _ZBUFFER_H_