Exemplo n.º 1
0
 public override void WrtieBodyToStream(CTextWriter writer)
 {
     writer.WriteKeyVal("numTris", Elements.Count);
     foreach (var t in Elements)
     {
         writer.BeginWriteLine();
         writer.Write("t");
         var v = t.Vertex0;
         writer.Write(string.Format(" {{{0},{1},{2},{3},{4}}}", v.pos,v.n,v.uv0,v.uv1,v.color));
         v = t.Vertex1;
         writer.Write(string.Format(" {{{0},{1},{2},{3},{4}}}", v.pos, v.n, v.uv0, v.uv1, v.color));
         v = t.Vertex2;
         writer.Write(string.Format(" {{{0},{1},{2},{3},{4}}}", v.pos, v.n, v.uv0, v.uv1, v.color));
         writer.EndWriteLine();
     }
 }