APPENDIX D - Raw Surface Format

This file type is binary and endian-dependent. It's a sequence of fixed length records containing the information of each surface dot:


Type Size Description
unsigned integer 4 Dot progressive number.
unsigned integer 4 Number of the associated atom.
float 4 X coordinates.
float 4 Y coordinates.
float 4 Z coordinates.
byte 1 Red color.
byte 1 Green color.
byte 1 Blue color.
byte 1 Flags (not used yet).


In C language, you can use the following structure to read/write the data:

struct vg_surface {
  unsigned int          Num;        /* Dot progressive number                 */
  unsigned int          AtmNum;     /* Atom number                            */
  float                 x, y, z;    /* Coordinates (don't change the order of */
  float                 Val;        /* these two fields)                      */
  char                  Color[3];   /* Color vector                           */
  char                  Flags;      /* Flags (not used yet)                   */