File: FormatMeshRaw.txt

package info (click to toggle)
libwildmagic 5.13-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, jessie, jessie-kfreebsd, stretch
  • size: 89,572 kB
  • ctags: 26,264
  • sloc: cpp: 210,924; csh: 637; sh: 95; makefile: 36
file content (15 lines) | stat: -rw-r--r-- 529 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// In Data/Biped.txt, you see lines of the form "TriMesh <SomeName>".
// The corresponding file is Data/Skins/SomeName.mesh.raw and the
// file format is listed below.

int numVertices;  // number of mesh vertices
Vertex vertices[numVertices];  // the mesh vertices
int numIndices;  // number of mesh indices (numTriangles = numIndices/3)
int indices[numIndices];  // the mesh indices

struct Vertex
{
    float px, py, pz;  // position
    float nx, ny, nz;  // normal
    float tx, ty;  // texture coordinate
};