void DrawPolytope(Base3D.Polytope p, Pen pen) { var points = p.points.Select(point => point * cameraMatric).ToList(); foreach (Polygon polygon in p.polygons) { DrawPolygon(polygon, points, pen); } }
void DrawPolytope(Base3D.Polytope p) { var points = new List <Base3D.Point>(p.points.Count); for (int i = 0; i < p.points.Count; ++i) { points.Add(p.points[i] * cameraMatric); } var normals = new List <Base3D.Point>(p.normals.Count); for (int i = 0; i < p.normals.Count; ++i) { normals.Add(p.normals[i] * rotationCamera); } Parallel.ForEach(p.polygons, polygon => DrawPolygon(polygon, points, normals, p.textures, p.Matreial)); }