¡@

Home 

c++ Programming Glossary: p2.x

how to use an iterator?

http://stackoverflow.com/questions/2712076/how-to-use-an-iterator

y int main vector point po point p1 p1.x 0 p1.y 0 point p2 p2.x 1 p2.y 1 po.push_back p1 po.push_back p2 vector point iterator.. distance const point p1 const point p2 return sqrt p1.x p2.x p1.x p2.x p1.y p2.y p1.y p2.y Note that the points are taken.. const point p1 const point p2 return sqrt p1.x p2.x p1.x p2.x p1.y p2.y p1.y p2.y Note that the points are taken by const..

Edges on polygon outlines not always correct

http://stackoverflow.com/questions/3039026/edges-on-polygon-outlines-not-always-correct

p1.y start.y perpoffset.y diroffset.y if i 0 temp 8 i 1 p2.x output temp 2 p2.y output temp 3 p3.x output temp 4 p3.y.. temp 3 p3.x output temp 4 p3.y output temp 5 else p2.x end.x perpoffset.x diroffset.x p2.y end.y perpoffset.y diroffset.y.. p3.y end.y perpoffset.y diroffset.y output.push_back p2.x output.push_back p2.y output.push_back p0.x output.push_back..

C++ triangle rasterization

http://stackoverflow.com/questions/7870533/c-triangle-rasterization

max X ScanLine p0.x p0.y p1.x p1.y ScanLine p1.x p1.y p2.x p2.y ScanLine p2.x p2.y p0.x p0.y for y 0 y SCREEN_HEIGHT y.. p0.x p0.y p1.x p1.y ScanLine p1.x p1.y p2.x p2.y ScanLine p2.x p2.y p0.x p0.y for y 0 y SCREEN_HEIGHT y if ContourX y 1 ContourX.. p1.x rand SCREEN_WIDTH p1.y rand SCREEN_HEIGHT p2.x rand SCREEN_WIDTH p2.y rand SCREEN_HEIGHT draw the triangle..