Helper class to perform Bresenham and Scanline algorithm. More...
Static Public Member Functions | |
| static std::vector< pixel_interp > | bresenham (const p2d &u1, const p2d &u2) |
| Bresenham algorithm between pixels u1 and u2. | |
| static void | scanline_buffer (const std::vector< pixel_interp > &vec, const int &line_number, const int &x_min, std::vector< std::pair< scanline_data, scanline_data > > *buffer) |
| fill the scanline data buffer for a given pixel_interp vector | |
Helper class to perform Bresenham and Scanline algorithm.
| std::vector< pixel_interp > cpe::algorithm::bresenham | ( | const p2d & | u1, | |
| const p2d & | u2 | |||
| ) | [static] |
Bresenham algorithm between pixels u1 and u2.
| p2d | u1: starting pixel coordinates of the segment | |
| p2d | u1: ending pixel coordinates of the segment |
Referenced by cpe::image_drawable::line().
| void cpe::algorithm::scanline_buffer | ( | const std::vector< pixel_interp > & | vec, | |
| const int & | line_number, | |||
| const int & | x_min, | |||
| std::vector< std::pair< scanline_data, scanline_data > > * | buffer | |||
| ) | [static] |
fill the scanline data buffer for a given pixel_interp vector
| std::vector<pixel_interp> | vec: vector of pixel positions+relative position: given by the output of bresenham algorithm | |
| int | line_number: edge number of the corresponding triangle | |
| int | x_min: offset position for minimal x-position of the triangle | |
| std::vector<pair<scanline_data,scanline_data> | >* buffer: pointer to the scanline data for y_min/y_max value |
1.6.3