-
Notifications
You must be signed in to change notification settings - Fork 109
mesh_extensions
Mesh Extensions Specifications
\
\
We will have a separate mesh extensions file with every mesh. The extension name for these mesh extension files is “.MEX”
\
The Mesh Extensions will contain information such as gun positions, thrusters, collision sphere hierarchies, and the centre of mass.
\
\
The file contains a header, and a bunch of “chunks”, which contain user defined information.
The file will have a header with the following format:
Name
Type and size
Usage
Ident. String
8 bytes
Compared to <Mannngo> to verify correct file format.
Version #
16-bit word
low byte is minor version #, high byte major version #
Number of Chunks
16-bit word
Number of chunks in this file
\
Chunk:
Each chunk has the following format:
Name
Type and size
Usage
Type
4 bytes
4 character string indicating type e.g. “Gun”
Name
8 bytes
8 character string giving this chunk a name e.g. “Gun0”
Length of Data
DWORD
Length of user-defined data
User defined data
Variable
User-defined data
\
\
\
The user-defined data for the gun format has the following format:
\
Name
Type and size
Usage
Gun position
Real32 x, y, z
x, y, z position of gun, relative to ship.
Gun normal
Real32 headx, heady, headz
headx, heady, headz describe a unit vector pointing in the direction of the gun.
Hotspot angle
Real32 hotSpotAngle
angle from gun normal, of hotspot area (degrees)
Hotspot falloff
Real32 hotSpotFallOff
angle from gun normal, of hot spot falloff (degrees)
\
\
Figure 1 : Example of Turret gun, and parameters describing it
\
\
\