Skip to content
This repository has been archived by the owner on Nov 14, 2018. It is now read-only.

mesh_extensions

aheadley edited this page Jan 17, 2014 · 1 revision

Mesh Extensions Specifications

\

Introduction

\

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.

\

General File Format

\

The file contains a header, and a bunch of “chunks”, which contain user defined information.

Header:

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

\

\

Specific Chunk Formats

Gun Format

\

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

\

\

\

Clone this wiki locally