Exemple #1
0
 /// <summary>
 /// Add the vertices of the given triangle to our
 /// vertex lookup dictionary and emit a triangle.
 /// </summary>
 void StoreTriangle(MeshTriangle triangle)
 {
     for (int i = 0; i < 3; ++i)
     {
         XYZ      p = triangle.get_Vertex(i);
         PointInt q = new PointInt(p);
         _triangles.Add(_vertices.AddVertex(q));
     }
 }
Exemple #2
0
 /// <summary>
 /// Emit a vertex to OBJ. The first vertex listed
 /// in the file has index 1, and subsequent ones
 /// are numbered sequentially.
 /// </summary>
 static void EmitVertex(
     StreamWriter s,
     PointInt p)
 {
     s.WriteLine("v {0} {1} {2}", p.X, p.Y, p.Z);
 }