public void Tessellate(IRenderPackage package, double tol = -1, int maxGridLines = 512) { for (int i = 0; i < vertices.Count; i = i + 3) { package.PushTriangleVertex( vertices[i], vertices[i + 1], vertices[i + 2]); } for (int i = 0; i < normals.Count; i = i + 3) { package.PushTriangleVertexNormal( normals[i], normals[i + 1], normals[i + 2]); } for (int i = 0; i < colors.Count; i = i + 4) { package.PushTriangleVertexColor( colors[i], colors[i + 1], colors[i + 2], colors[i + 3]); } }
private void PushTriangleVertex(IRenderPackage package, Point p, Vector n) { package.PushTriangleVertex(p.X, p.Y, p.Z); package.PushTriangleVertexColor(255, 255, 0, 255); package.PushTriangleVertexNormal(n.X, n.Y, n.Z); }