Difference between revisions of "BBND"

From Mm2kiwi
Jump to: navigation, search
 
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
Defines the boundary of a [[PKG]] object.
+
BBND is a binary version of the [[BND|ASCII-based]] format used to define the boundary of [[PKG]] objects.
  
 
  struct BBND
 
  struct BBND

Latest revision as of 22:14, 11 January 2012

BBND is a binary version of the ASCII-based format used to define the boundary of PKG objects.

struct BBND
{
  char version; // == 1
  long nVertices;
  long nMaterials;
  long nPolys;
  BBNDVertex   vertices[nVertices];
  BBNDMaterial materials[nMaterials];
  BBNDPolygon  polys[nPolys];
};

struct BBNDVertex
{
  float x;
  float y;
  float z;
};

struct BBNDMaterial
{
  char[32] name;
  float    elasticity;
  float    friction;
  char[32] effect;
  char[32] sound;
};

struct BBNDPolygon
{
  short indicies[4];
  short material;
};

Bound polygons can be quads and triangles. If a polygon is a triangle, the last index is 0. Therefore a future exporter must never put the vertex index 0 last in a quad polygon. All strings are fixed 32 byte arrays with terminator byte 0x00.