Inheritance diagram for Eaagles::BasicGL::Scanline:


Public Member Functions | |
| Scanline () | |
| void | scan () |
| void | setArea (const LCreal xCenter, const LCreal yCenter, const LCreal xSize, const LCreal ySize, const LCreal zRotDeg) |
| unsigned int | getWidth () const |
| unsigned int | getHeight () const |
| void | setSize (const unsigned int width, const unsigned int height) |
| bool | addPolygon (const LcPolygon *const poly) |
| void | clear () |
Protected Member Functions | |
| virtual void | callback (const PolyData *const p, const unsigned int x, const unsigned int y)=0 |
| virtual void | reset () |
| virtual void | scanline (const int y) |
| virtual const PolyData * | step (const int x) |
| virtual void | toggleActivePolygon () |
| virtual unsigned int | reduceVert (LcPolygon *const poly) |
| virtual void | purgePolygons () |
| virtual void | setMatrix () |
| virtual void | sortEdges (Edge *tbl[], const int n, const int index) |
| virtual void | endPointCheck (Edge *tbl[], const int n) const |
| virtual void | add2EdgeTable (Edge *tbl[], const int n) |
Private Attributes | |
| Clip3D * | clipper |
| LCreal | angle |
| LCreal | cx |
| LCreal | cy |
| LCreal | sx |
| LCreal | sy |
| unsigned int | ix |
| unsigned int | iy |
| LCreal | curX |
| LCreal | curY |
| PolyData * | curPoly |
| osg::Matrix | mat |
| PolyData * | pt [MAX_POLYS] |
| unsigned int | nPT |
| PolyData * | apt [MAX_ACTIVE_POLYS] |
| unsigned int | nAPT |
| Edge * | et [MAX_EDGES] |
| unsigned int | nET |
| unsigned int | refET |
| Edge * | aet [MAX_ACTIVE_EDGES] |
| unsigned int | nAET |
| unsigned int | refAET |
Static Private Attributes | |
| static const unsigned int | MAX_EDGES = 4000 |
| static const unsigned int | MAX_ACTIVE_EDGES = 1000 |
| static const unsigned int | MAX_POLYS = 500 |
| static const unsigned int | MAX_ACTIVE_POLYS = 100 |
Classes | |
| class | Edge |
| class | PolyData |
(Abstract) 2D scan line engine.
| Eaagles::BasicGL::Scanline::Scanline | ( | ) |
| void Eaagles::BasicGL::Scanline::scan | ( | ) |
Generates one scan of the 'world'. The user defined 'callback()' function (via the derived class) is called at each x,y point in the virtual view port.
| void Eaagles::BasicGL::Scanline::setArea | ( | const LCreal | xCenter, | |
| const LCreal | yCenter, | |||
| const LCreal | xSize, | |||
| const LCreal | ySize, | |||
| const LCreal | zRotDeg | |||
| ) |
Defines the area that we're going to scan.
| unsigned int Eaagles::BasicGL::Scanline::getWidth | ( | ) | const [inline] |
Viewport (image) width -- pixels.
| unsigned int Eaagles::BasicGL::Scanline::getHeight | ( | ) | const [inline] |
viewport (image) height -- lines
| void Eaagles::BasicGL::Scanline::setSize | ( | const unsigned int | width, | |
| const unsigned int | height | |||
| ) |
Sets the viewport size.
| bool Eaagles::BasicGL::Scanline::addPolygon | ( | const LcPolygon *const | poly | ) |
adds a polygon to the 'world'
| void Eaagles::BasicGL::Scanline::clear | ( | ) |
empty all the tables
| virtual void Eaagles::BasicGL::Scanline::callback | ( | const PolyData *const | p, | |
| const unsigned int | x, | |||
| const unsigned int | y | |||
| ) | [protected, pure virtual] |
| void Eaagles::BasicGL::Scanline::reset | ( | ) | [protected, virtual] |
reset the scanline alg but keep the polygon and edge tables
| void Eaagles::BasicGL::Scanline::scanline | ( | const int | y | ) | [protected, virtual] |
select the scanline and setup the AET
| const Scanline::PolyData * Eaagles::BasicGL::Scanline::step | ( | const int | x | ) | [protected, virtual] |
step down the scan line to x
| void Eaagles::BasicGL::Scanline::toggleActivePolygon | ( | ) | [protected, virtual] |
toggle a polygon to and from the active table
| unsigned int Eaagles::BasicGL::Scanline::reduceVert | ( | LcPolygon *const | poly | ) | [protected, virtual] |
reduce the number of vertices by removing consecutive vertices that are on the same pixel
| void Eaagles::BasicGL::Scanline::purgePolygons | ( | ) | [protected, virtual] |
purge the active polygon list of polygons that have reached the seconds edge
| void Eaagles::BasicGL::Scanline::setMatrix | ( | ) | [protected, virtual] |
define the transformation matrix
| void Eaagles::BasicGL::Scanline::sortEdges | ( | Edge * | tbl[], | |
| const int | n, | |||
| const int | index | |||
| ) | [protected, virtual] |
sort the edge table; simple bubble up sort. If index == 0, sort by x. If index == 1, sort by lv[1]
| void Eaagles::BasicGL::Scanline::endPointCheck | ( | Edge * | tbl[], | |
| const int | n | |||
| ) | const [protected, virtual] |
end point check the edges
| void Eaagles::BasicGL::Scanline::add2EdgeTable | ( | Edge * | tbl[], | |
| const int | n | |||
| ) | [protected, virtual] |
add the edges to the edge table
const unsigned int Eaagles::BasicGL::Scanline::MAX_EDGES = 4000 [static, private] |
const unsigned int Eaagles::BasicGL::Scanline::MAX_ACTIVE_EDGES = 1000 [static, private] |
const unsigned int Eaagles::BasicGL::Scanline::MAX_POLYS = 500 [static, private] |
const unsigned int Eaagles::BasicGL::Scanline::MAX_ACTIVE_POLYS = 100 [static, private] |
Clip3D* Eaagles::BasicGL::Scanline::clipper [private] |
clipping object
LCreal Eaagles::BasicGL::Scanline::angle [private] |
area rotation angle (radians)
LCreal Eaagles::BasicGL::Scanline::cx [private] |
area center (x,y)
LCreal Eaagles::BasicGL::Scanline::cy [private] |
LCreal Eaagles::BasicGL::Scanline::sx [private] |
area size (x,y)
LCreal Eaagles::BasicGL::Scanline::sy [private] |
unsigned int Eaagles::BasicGL::Scanline::ix [private] |
number of pixels (x,y)
unsigned int Eaagles::BasicGL::Scanline::iy [private] |
LCreal Eaagles::BasicGL::Scanline::curX [private] |
current X value (pixel number)
LCreal Eaagles::BasicGL::Scanline::curY [private] |
current Y value (scanline number)
PolyData* Eaagles::BasicGL::Scanline::curPoly [private] |
Current polygon (one on top).
osg::Matrix Eaagles::BasicGL::Scanline::mat [private] |
matrix used by scanner
PolyData* Eaagles::BasicGL::Scanline::pt[MAX_POLYS] [private] |
Polygons Table (PT).
unsigned int Eaagles::BasicGL::Scanline::nPT [private] |
Number of polygons in PT.
PolyData* Eaagles::BasicGL::Scanline::apt[MAX_ACTIVE_POLYS] [private] |
Active Polygon Table (APT).
unsigned int Eaagles::BasicGL::Scanline::nAPT [private] |
Number of polygons in APT.
Edge* Eaagles::BasicGL::Scanline::et[MAX_EDGES] [private] |
Edge Table (ET).
unsigned int Eaagles::BasicGL::Scanline::nET [private] |
Number of edges in ET.
unsigned int Eaagles::BasicGL::Scanline::refET [private] |
Ref index for ET.
Edge* Eaagles::BasicGL::Scanline::aet[MAX_ACTIVE_EDGES] [private] |
Active Edge Table (AET).
unsigned int Eaagles::BasicGL::Scanline::nAET [private] |
Number of edges in AET.
unsigned int Eaagles::BasicGL::Scanline::refAET [private] |
Ref index for AET.
1.5.0