Defining the DDERAYDATA  structure

The ZCLIENT C-code defines a data structure named DDERAYDATA that is passed by reference by the PostArrayTraceMessage function for faster, more efficient ray tracing. The C-code for this is shown below:

typedef struct{
double x, y, z, l, m, n, opd, intensity;
double Exr, Exi, Eyr, Eyi, Ezr, Ezi;
int wave, error, vigcode, want_opd;
}DDERAYDATA;

The structure consists of 14 double-precision words, each of length 8 bytes and 4 signed integer words, each of length 4 bytes. These memory bytes will appear in exactly the above order in memory. This structure must be matched on the FORTRAN side by a user-defined type with exactly the same sequence of memory bytes. The FORTRAN code for this will be shown later. An array of such structures is expected to be supplied as an argument to the PostArrayTraceMessage function, in number one more than the number of rays to be traced (see the ZEMAX manual for details of how the first element of this array is used to set flags).