Moving on, we should have two different ways of creating meshes. A 'wld-' atom and an 'obj-' atom.
An 'obj-' atom should have the following things:
* A string in its data field containing its name
* A bunch of 'tex-' atoms describing all of the materials used in the object
* A 'vert' atom containing all of the vertices for the object
* A 'poly' atom containing all of the polygons for the object
A 'wld-' atom should contain the following:
* 'tex-' atoms containing material information
* A 'vert' atom containing all the vertices for the zone
* An 'octp' atom containing the octree for the zone
An octree should consist of two types of atoms, 'octp' and 'octe'. 'octp' would be an octree node with children, where an 'octe' atom would be an octree end node.
An 'octp' atom should contain the following in its data field:
Code:
struct OctP {
double cen[3];
double size[3];
};
Where cen is the center of the octree node cube, and size is the distance from the center to the extreme x, y, and z... in other words, half of the total length, width, and depth of the cube. It should have 8 children atoms, all of which being with 'octp' or 'octe' atoms.
And 'octe' atom should have the same data field as an 'octp' atom. The difference is that an 'octe' atom has a 'poly' atom as its only child. This poly atom contains all of the polygons wihin this octree end node.
That should almost do it for an initial file format... anything I'm missing?