void FillPolygon (polygon_type &polygon, edge_list_type &list ) { int Edges , start_Edge , end_Edge , scan; LoadPolygon(polygon,list, Edges); if (Edges==2) return; scan = list.edge[1].Ymax ; start_Edge = 1 ; end_Edge = 1 ; Include(list, end_Edge, Edges, scan); while ( end_Edge != start_Edge - 1 ) { XSort(list, start_Edge, end_Edge); FillScan(list, end_Edge, start_Edge, scan); scan--; UpdateXValues(list, end_Edge, start_Edge, scan); Include(list, end_Edge, Edges, scan); } }
void PhysicsObject::LoadPolygonList(std::list<Polygon> Plist){ for(std::list<Polygon>::iterator it=Plist.begin();it!=Plist.end();it++){ LoadPolygon(*it); } }