Example #1
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(_mtl_vertex,
                 ObjExportUtil.RealString(p.X),
                 ObjExportUtil.RealString(p.Y),
                 ObjExportUtil.RealString(p.Z));
 }
Example #2
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));
     }
 }
Example #3
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(_mtl_vertex, p.X, p.Y, p.Z);
 }