Exemple #1
0
 public override void WrtieBodyToStream(CTextWriter writer)
 {
     writer.WriteKeyVal("setID", SetID);
     writer.WriteKeyVal("numUVs", UVs.Count);
     foreach (var p in UVs)
         writer.WriteVec2Fixed("uv", p);
 }
 public override void WrtieBodyToStream(CTextWriter writer)
 {
     base.WrtieBodyToStream(writer);
     writer.WriteKeyVal("vertexbuffer", VertexBuffer);
     writer.WriteKeyVal("num_subclusters", Subclusters.Count);
     foreach (var i in Subclusters)
         i.WrtieToStream(writer);
 }
 public override void WrtieBodyToStream(CTextWriter writer)
 {
     base.WrtieBodyToStream(writer);
     writer.WriteString("texture0", Texture);
     writer.WriteString("texture1", Lightmap);
     if (Sky)
         writer.WriteKeyVal("sky", Sky);
     if (Transparent)
         writer.WriteKeyVal("transparent", Transparent);
 }
 public override void WrtieBodyToStream(CTextWriter writer)
 {
     base.WrtieBodyToStream(writer);
     writer.WriteKeyVal("material", Material);
     writer.WriteVec3("mins", Mins);
     writer.WriteVec3("maxs", Maxs);
     writer.WriteKeyVal("vb", VertexBuffer);
     IList<int> res = Indices;
     //res = BuildStrip(Indices);
     writer.WriteKeyVal("num_indices", res.Count);
     foreach (var i in res)
         writer.WriteKeyVal("t", i);
 }
Exemple #5
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();
     }
 }
Exemple #6
0
 public override void WrtieBodyToStream(CTextWriter writer)
 {
     writer.WriteKeyVal("numVertCols", Colours.Count);
     foreach (var p in Colours)
         writer.WriteArray("col", new int[]{p.r,p.g,p.b,p.a});
 }
Exemple #7
0
 public override void WrtieBodyToStream(CTextWriter writer)
 {
     writer.WriteKeyVal("numVertNorms", Normals.Count);
     foreach (var p in Normals)
         writer.WriteVec3Fixed("vn", p);
 }
Exemple #8
0
 public override void WrtieBodyToStream(CTextWriter writer)
 {
     writer.WriteKeyVal("numVerts", Positions.Count);
     foreach (var p in Positions)
         writer.WriteVec3("v", p);
 }