Japanese
Graphic Tools Guide3DME User's Manual
Back | ■
General purpose 3D modeling tool user's manual

4. data format


■MDB format

This is a binary format of the MDL format information output by 3DME.

●Structure
PDATA* (MAP_SIZE_X*MAP_SIZE_Y information)
Address of map number 0
Map number 1 address
Map number 2 address
Map number 3 address
:
:
:
Address of map number n-1
Null map object data
Object data of map number 0
Map number 1 object data
Map number 2 object data
Map number 3 object data
:
:
:
Object data of map n-1
Let n = MAP_SIZE_X * MAP_SIZE_Y.

●Caution

Basically, refer to the PDATA* part, see which address contains PDATA (polygon information), and output that address with slPutPolygon.

■Collision format

Automatically divides by grit unit and allows information to be recognized.

●Information that can be obtained

  1. Centroid coordinates of polygon

  2. Used to calculate which polygon you are standing on.

  3. Normal vector of polygon

  4. Used to calculate your own slope and the slope's gravity.

  5. Polygon attribute number

  6. Acquisition of attribute flags for each polygon such as "road" or "grassland"

  7. polygon group number

  8. Obtain group number for each polygon

●Header information for acquiring collision information
typedef struct {
     VECTOR norm ; /* Normal vector */
     Uint16 att; /* Attribute */
     Uint16 gru; /* group */
     FIXED cen_x; /* center */
     FIXED cen_y; /* center */
     FIXED cen_z; /* center */
} COLLISON;

typedef struct {
     COLLISON *cotbl; /* Polygon definition table */
     Uint32 nbCo; /* Number of polygons */
}CDATA;


Back | ■
Graphic Tools Guide3DME User's Manual
Copyright SEGA ENTERPRISES, LTD. 1997