Repository navigation
Clipping Geometry
shartte edited this page Oct 21, 2015
·
5 revisions
The clipping geometry is organized into three types of files:
- An index file called
clipping.cgfin the map directory, which defines the actual geometry mesh files used by the map. - An instance file called
clipping.cifin the map directory, which instantiates the geometry defined inclipping.cgf. - The actual geometry files referenced by
clipping.cgf.
Has a very simple structure.
struct CgfFile {
uint32_t count;
char filename[260][count];
}
Instantiates the meshes found in clipping.cgf and places them around the map.
struct CifObj {
int meshIdx; // Index of the mesh, correlate with CGF file
float posX;
float posY;
float posZ;
float scaleX;
float scaleY;
float scaleZ;
float rotation;
}
struct CifFile {
uint32_t count;
CifObj obj[count];
}
These are a bit odd...
struct DagFile {
float boundingSphereX;
float boundingSphereY;
float boundingSphereZ;
float boundingSphereRadius;
int objCount;
int dataStart; // Offset relative to start of file where
// the first DagFileObj is
}
struct DagFileObj {
int vertexCount;
int primCount;
int vertexDataStart; // Offset relative to start of file,
// where vertexCount vertices of
// type DagFileVertex reside
int indexDataStart; // Offset relative to start of file,
// where 3 * primCount indices of
// type uint16_t reside
}
struct DagFileVertex {
float x;
float y;
float z;
}