TVector, TMatrix |
These types are declared as either arrays or as structures. If the conditional compilation flag _IndexedVectorsAndMatrices_ is defined in your project then the array declaration will be used – otherwise the structure declaration will be used.
#ifdef _IndexedVectorsAndMatrices_
typedef double TVector[3];
typedef TVector TMatrix[3];
#else
typedef struct { double X, Y, Z; } TVector;
typedef struct { TVector X, Y, Z; } TMatrix;
#endif
In addition to the three dimensional types above, there are two and six dimensional variants.
#ifdef _IndexedVectorsAndMatrices_
typedef double TVector2[2];
typedef double TVector6[6];
typedef TVector2 TMatrix2[2];
typedef TVector6 TMatrix6[6];
#else
typedef struct { double X, Y; } TVector2;
typedef struct { double TX, TY, TZ, RX, RY, RZ; } TVector6;
typedef struct { TVector2 X, Y; } TMatrix2;
typedef struct { TVector6 TX, TY, TZ, RX, RY, RZ; } TMatrix6;
#endif