瀏覽代碼

Move MeshHeader into DAECompiler

Daniele Bartolini 12 年之前
父節點
當前提交
8a6aa0c768
共有 1 個文件被更改,包括 34 次插入0 次删除
  1. 34 0
      engine/compilers/dae/DAECompiler.h

+ 34 - 0
engine/compilers/dae/DAECompiler.h

@@ -40,6 +40,40 @@ using std::vector;
 namespace crown
 {
 
+//
+// STRUCT
+// {
+//     FIELD             : SIZE                    COMMENT
+// }
+//
+// MeshHeader [1]
+// {
+//     version           : uint32_t                Version identifier
+//     mesh_count        : uint32_t                Number of meshes in the file
+//     joint_count       : uint32_t                Number of joints in the file
+//     padding           : uint32_t * 16           Reserved
+// }
+// MeshChunk [1, 2, ..., n]
+// {
+//     vertex_count      : uint32_t                Number of vertices in the mesh
+//     vertices          : float * vertex_count    Vertex data
+//
+//     tri_count         : uint32_t                Number of triangles in the mesh
+//     tris              : uint16_t * tri_count    Triangle data as indices into 'vertices'
+// }
+//
+
+// Bump the version whenever a change in the format is made.
+const uint32_t MESH_VERSION = 1;
+
+struct MeshHeader
+{
+	uint32_t	version;
+	uint32_t	mesh_count;
+	uint32_t	joint_count;
+	uint32_t	padding[16];
+};
+
 //-----------------------------------------------------------------------------
 struct DAEFloatArray
 {