KCL files are the ones that control solidity in a course.
If the KCL file is wrong, you can fall trough the ground or drive through the walls.
The first block is the begin of the values. In the most kcl files is it 3C.
The third block is the start of the ground ID Section.
It is little endian so: D8 5F 00 00 = 00 00 5F D8.
And there are the begin of the ground ID section.
|0x00||u32||Offset to section 1|
|0x04||u32||Offset to section 2|
|0x08||u32||Offset to section 3|
|0x0c||u32||Offset to section 4|
|0x14||single3||Spatial grid first coordinate|
The Vertex section
A positon is the same as in a nkm file, but it is only the x,y,z coordinates. It is also little endian. The most times the first position is starting on: "00 00 00 3C"
The Normal section
Quote from wikipedia: http://en.wikipedia.org/wiki/Surface_normal
A surface normal, or simply normal, to a flat surface is a vector that is perpendicular to that surface. A normal to a non-flat surface at a point P on the surface is a vector perpendicular to the tangent plane to that surface at P. The word "normal" is also used as an adjective: a line normal to a plane, the normal component of a force, the normal vector, etc. The concept of normality generalizes to orthogonality. In the two-dimensional case, a normal line perpendicularly intersects the tangent line to a curve at a given point. The normal is often used in computer graphics to determine a surface's orientation toward a light source for flat shading, or the orientation of each of the corners (vertices) to mimic a curved surface with Phong shading.
The Planar section
|2||Vertex Index||Index in the Vertex section.|
|2||Normal Index||Index in the Normal section.|
|2||Normal A Index||Index in the Normal section.|
|2||Normal B Index||Index in the Normal section.|
|2||Normal C Index||Index in the Normal section.|
|2||Collision Type||For Groundtypes look at the KCL ID List.|
The Octree section
Quote from wikipedia: http://en.wikipedia.org/wiki/Octree
An octree is a tree data structure in which each internal node has exactly eight children. Octrees are most often used to partition a three dimensional space by recursively subdividing it into eight octants. Octrees are the three-dimensional analog of quadtrees. The name is formed from oct + tree, and normally written "octree", not "octtree".
The octree divide the 3d space in cubes and then it assign the triangles to the cubes.The working is simple. Mario Kart looks in which cube you are, then which planes collide and then it works.