// Internal type definitions for GDI3D // Pasi Paavola 1993 #ifndef __INTERN__ #define __INTERN__ // Structure, which is included in every 3D output window as extra words typedef struct tagG3WND { LOCALHANDLE hParams; // Handle of the local memory block containing // window specific data int iError; // Last error code } G3WND; typedef G3WND NEAR * NPG3WND; typedef G3WND FAR * LPG3WND; // Position indexes for G3 window extra words #define HPARPOS 0 #define IERRPOS 2 // Transformation matrix type coefficients #define TM_TRANS (0x0001) #define TM_SCALE (0x0002) #define TM_ROTATE (0x0004) // Structure, which holds all the current 3D parameters for the window typedef struct tagG3PARAMS { double CosTheta, SinTheta; // Viewpoint data is presented in spherical double r; // coordinates (r, theta, fi defined as usual). double CosFi, SinFi; // Only sines and cosines and the needed double CtCf, CtSf; // combination (e.g. CtCf) terms of the double StSf, StCf; // angles are saved for the sake of speed // (explicit presentations are not needed). double VPx, VPy, VPz; // Viewpoint data explicitly in cartesian // coordinates double d, S1, S2; // Three related parameters where d is the // distance of the viewing plane center // from the origin of the world coordinate // system and S1 and S2 are the halves of // the viewing plane width and height // respectively double dS1, dS2; // d/S1 and d/S2 to speed up calculations int cx, cy; // Center coordinates for the viewport int hw, hh; // Half width and height of the viewport // Default: Whole window int iTrFlag; // Flag to indicate the current // transformation type. If it is // 0, then no transformations are // applied. If it is nonzero, it is a // bitwise OR'ed combination of the TM_- // prefixed constants defined above. double M11, M12, M13, M14; // Transformation matrix elements. double M21, M22, M23, M24; // Mij is the element on the row i and double M31, M32, M33, M34; // column j. Transformed point is multiplied // from left by the transformation matrix. } G3PARAMS; typedef G3PARAMS NEAR * NPG3PARAMS; typedef G3PARAMS FAR * LPG3PARAMS; #endif // __INTERN__