283 if (result && fwrite(&
iBound,
sizeof(
G3D::AABox), 1, wf) != 1) result =
false;
284 if (result && fwrite(&
iMogpFlags,
sizeof(
uint32), 1, wf) != 1) result =
false;
288 if (result && fwrite(
"VERT", 1, 4, wf) != 4) result =
false;
291 if (result && fwrite(&chunkSize,
sizeof(
uint32), 1, wf) != 1) result =
false;
292 if (result && fwrite(&count,
sizeof(
uint32), 1, wf) != 1) result =
false;
295 if (result && fwrite(&
vertices[0],
sizeof(
Vector3), count, wf) != count) result =
false;
298 if (result && fwrite(
"TRIM", 1, 4, wf) != 4) result =
false;
300 chunkSize =
sizeof(
uint32)+
sizeof(MeshTriangle)*count;
301 if (result && fwrite(&chunkSize,
sizeof(
uint32), 1, wf) != 1) result =
false;
302 if (result && fwrite(&count,
sizeof(
uint32), 1, wf) != 1) result =
false;
303 if (result && fwrite(&
triangles[0],
sizeof(MeshTriangle), count, wf) != count) result =
false;
306 if (result && fwrite(
"MBIH", 1, 4, wf) != 4) result =
false;
310 if (result && fwrite(
"LIQU", 1, 4, wf) != 4) result =
false;
314 if (result && fwrite(&chunkSize,
sizeof(
uint32), 1, wf) != 1) result =
false;
318 if (result && fwrite(&chunkSize,
sizeof(
uint32), 1, wf) != 1) result =
false;
bool writeToFile(FILE *wf)
Definition: WorldModel.cpp:206
bool writeToFile(FILE *wf) const
Definition: BoundingIntervalHierarchy.cpp:247
std::vector< MeshTriangle > triangles
Definition: WorldModel.h:100
uint32 GetFileSize()
Definition: WorldModel.cpp:198
uint32_t uint32
Definition: Define.h:150
BIH meshTree
Definition: WorldModel.h:101
G3D::AABox iBound
Definition: WorldModel.h:96
uint32 iMogpFlags
Definition: WorldModel.h:97
std::vector< G3D::Vector3 > vertices
Definition: WorldModel.h:99
WmoLiquid * iLiquid
Definition: WorldModel.h:102
uint32_t uint32
Definition: g3dmath.h:168
uint32 iGroupWMOID
Definition: WorldModel.h:98