Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- times(U, V, R1);
- times(R1, T, R);
- mat3D F3D;
- frame(Wx, Wy, Wcx, Wcy, F3D);
- System::Collections::Generic::List<polygon3D^> ^processedPolygons = gcnew System::Collections::Generic::List<polygon3D^>;
- for (int i = 0; i < polygons.Count; i++) {
- polygon3D^ p = polygons[i];
- polygon^ p1 = gcnew polygon(0);
- polygon3D^ p2 = gcnew polygon3D(0);
- point3D A;
- point A1, A2, c;
- vec3D a, a1;
- vec a2, a3;
- for (int j = 0; j < p->Count; j++) {
- point2vec(p[j], a);
- timesMatVec(R, a, a1);
- timesMatVec(F3D, a1, a1);
- vec2point(a1, A);
- p2->Add(A);
- }
- processedPolygons->Add(p2);
- }
- if (fill) {
- Warnock(processedPolygons, Rectangle(Pmin.x + 1, Pmin.y + 1, Wx - 4, Wy - 4), g, colors, Form::BackColor);
- } else {
- for (int i = 0; i < processedPolygons->Count; i++) {
- System::Collections::Generic::List<PointF> ^toDraw = gcnew System::Collections::Generic::List<PointF>;
- for (int j = 0; j < processedPolygons[i]->Count; j++) {
- toDraw->Add(PointF(processedPolygons[i][j].x, processedPolygons[i][j].y));
- }
- g->DrawPolygon(gcnew Pen(colors[i]), toDraw->ToArray());
- }
- }
- g->DrawString(prOrtho? "Ortho" : "Perspective", textFont, textBrush, Wx - 80, top + 5);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement