lonkaars / liehjuck

Simple software rasterizer (school project)
3 stars 0 forks source link

Triangle filling algorithm #46

Open amieleg opened 4 years ago

amieleg commented 4 years ago

Create an algorithm that takes a std::array<std::vector<jdscn::Position2D> ,3> and fills a triangle with the object's material color. Discussion below for return type :tada:

lonkaars commented 4 years ago

I think we should add

using point = std::pair<jdscn::Position2D, jdscn::Color>
using rasterizedShape = std::vector<point>

and have both the line algorithm and the filling algorithm return rasterizedShape