Syntax of the .key File Format

For this project, we define a rudimentary key-frame file. The file describes a collection of parametrizable transformations, sampled at different key-frames. The transformations are represented as 4x4 matrices, allowing for arbitrary rotations, translations and scalings. The formatting of the .key file is strict and must follow the following structure:

#DOFS dofNum

This specifies the number of different transformations that are to be described in the file.

name[1] ... name[dofNum]

After the number of parameters are specified, the file specifies the name of each of the parameters in order to allow for linkage in the .ray files.

#DURATION durationTime

Next, the file specifies the duration (in seconds) over which the key-frames are sampled.

#FRAMES frameNum

Then, the file specifies the total number of samples taken for each transformation.

transform[1][1][1] ... transform[1][1][16] ...... transform[1][dofNum][1] ... transform[1][dofNum[16]
......
transform[frameNum][1][1] ... transform[frameNum][1][16] ...... transform[frameNum][dofNum][1] ... transform[frameNum][dofNum[16]

Finally, the actual samples of the 4x4 matrices, for each parameter, for each key-frame, are specified. Each matrix is expressed by 16 values corresponding to the 16 coefficients of the 4x4 matrix, written out in row-major format, so that the first 4 values are the entries of the first row of the matrix, the next four values are the entries of the second row of the transformation matrix, and so on. After the first sampled transformation of the first parameter is written out, the first sampled transformation of the second parameter is written out. After the first sampled transformations of all the parameters are written out, the second sampled transformation of each of the parameters is written out. And so on until all the samples of all the parameters are written out.