This is how the Sample_MeshExporter writes the parsed data for each ADT to a file. Every exported file contains chunks of data (similar to the chunks used by WoW) in the order you quoted. So let's say you open a file that has been exported, it will contain: a bounding box chunk contains the real extends of an ADT, cause the exported data includes a border which is helpful in recast, a position chunk contains information about the placement of a particular ADT in the world and its coordinate, a index chunk and a vertex chunk which contain the geometry of the ADT.
In c++ you would do something like this:
Code:
struct BBXChunk_s {
char id[4];
size_t size;
float bbmin[3];
float bbmax[3];
};
...
std::ifstream f( "12_16.mesh", std::ifstream::binary );
BBXChunk_s bbx_chunk;
f.read( reinterpret_cast<char*>(&bbx_chunk), sizeof(bbx_chunk) ); // read bbx chunk
std::cout << "Bounding Box Minimum X:" << bbx_chunk.bbmin[0] << std::endl
Hope that helped.
p.s.: What caowenyu posted is how wow chunks looked in v3.3.x, use that if you want to write your own parser for the old format. Cheers