Skip to content

Instantly share code, notes, and snippets.

@davegreenwood
Created December 14, 2018 10:15
Show Gist options
  • Save davegreenwood/819603b7b6bd45286ef657d2c130fdf0 to your computer and use it in GitHub Desktop.
Save davegreenwood/819603b7b6bd45286ef657d2c130fdf0 to your computer and use it in GitHub Desktop.
MDD file format

MDD file format

The MDD file format is very simple and here is a brief description for TD's and developers who are interested in adding tools to a pipeline built around MDD.

The first thing to note is that the MDD file format is Motorola Big Endian byte order as opposed to the Intel Little Endian standard. So however you implement the structure below, you must come up with an algorithm to flip the bytes during file IO.

The data structure is:

typedef Struct{
  int totalframes;
  int totalPoints;
  float *Times; //time for each frame
  float **points[3];
}mddstruct;

and the data is written:

totalframes
totalPoints
Times

while(!totalframes){
  while(!totalPoints){
    write point[frame][point][axis];
    point++;
    }
  frame++;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment