public static void DumpRaw(ObjectArray<int> indices, ObjectArray<float> vertices, int pIndicesCount,
int pVerticesCount)
{
String fileName = "objTest3.raw";
String completePath = System.IO.Path.Combine(Util.configDir(), fileName);
StreamWriter sw = new StreamWriter(completePath);
IndexedMesh mesh = new IndexedMesh();
mesh.m_indexType = PHY_ScalarType.PHY_INTEGER;
mesh.m_numTriangles = pIndicesCount / 3;
mesh.m_numVertices = pVerticesCount;
mesh.m_triangleIndexBase = indices;
mesh.m_vertexBase = vertices;
mesh.m_vertexStride = 3;
mesh.m_vertexType = PHY_ScalarType.PHY_FLOAT;
mesh.m_triangleIndexStride = 3;
TriangleIndexVertexArray tribuilder = new TriangleIndexVertexArray();
tribuilder.AddIndexedMesh(mesh, PHY_ScalarType.PHY_INTEGER);
try {
for (int i = 0; i < pVerticesCount; i++) {
string s = vertices [indices [i * 3]].ToString ("0.0000");
s += " " + vertices [indices [i * 3 + 1]].ToString ("0.0000");
s += " " + vertices [indices [i * 3 + 2]].ToString ("0.0000");
sw.Write (s + "\n");
}
} catch {
}
sw.Close();
}