cpe::triangle_scanline Struct Reference
+ Collaboration diagram for cpe::triangle_scanline:

Public Member Functions

 triangle_scanline (const pos2 &u0, const pos2 &u1, const pos2 &u2)
 Direct construction from 3 positions (u0,u1,u2) More...
 
const pos2get_coordinate (const line_pointer &p)
 Get coordinate of the discrete line pointed by p. More...
 
int size ()
 Size of triangle in x direction. More...
 

Public Attributes

std::vector< line_pointerfirst_point
 storage of the pointer for the first point More...
 
std::vector< line_pointerlast_point
 storage of the pointer for the last point More...
 
line_discrete line [3]
 storage for the 3 discrete lines of the border of the triangle More...
 

Detailed Description

Structure for triangle scanline

Constructor & Destructor Documentation

cpe::triangle_scanline::triangle_scanline ( const pos2 u0,
const pos2 u1,
const pos2 u2 
)

Direct construction from 3 positions (u0,u1,u2)

References cpe::compute_line(), cpe::line_discrete::coordinate, first_point, get_coordinate(), last_point, line, cpe::line_discrete::size(), cpe::pos2::x(), and cpe::pos2::y().

+ Here is the call graph for this function:

Member Function Documentation

const pos2 & cpe::triangle_scanline::get_coordinate ( const line_pointer p)

Get coordinate of the discrete line pointed by p.

References cpe::line_discrete::coordinate, cpe::line_pointer::index, line, cpe::line_pointer::line_number, and cpe::line_discrete::size().

Referenced by triangle_scanline().

+ Here is the call graph for this function:

int cpe::triangle_scanline::size ( )

Size of triangle in x direction.

References first_point.

Referenced by cpe::draw_triangle().

Member Data Documentation

std::vector<line_pointer> cpe::triangle_scanline::first_point

storage of the pointer for the first point

Referenced by cpe::draw_triangle(), size(), and triangle_scanline().

std::vector<line_pointer> cpe::triangle_scanline::last_point

storage of the pointer for the last point

Referenced by cpe::draw_triangle(), and triangle_scanline().

line_discrete cpe::triangle_scanline::line[3]

storage for the 3 discrete lines of the border of the triangle

Referenced by get_coordinate(), and triangle_scanline().


The documentation for this struct was generated from the following files: