/// <summary> /// Emit a SimpleMesh as an AsciiMeshStruct /// </summary> public static void EmitMeshAscii(this SceneSerializer s, SimpleMesh m, IOutputStream o) { o.BeginStruct(IOStrings.AsciiMeshStruct); o.AddAttribute(IOStrings.AMeshVertices3, m.VerticesItr()); if (m.HasVertexNormals) { o.AddAttribute(IOStrings.AMeshNormals3, m.NormalsItr()); } if (m.HasVertexColors) { o.AddAttribute(IOStrings.AMeshColors3, m.ColorsItr()); } if (m.HasVertexUVs) { o.AddAttribute(IOStrings.AMeshUVs2, m.UVsItr()); } o.AddAttribute(IOStrings.AMeshTriangles, m.TrianglesItr()); o.EndStruct(); }