GsCOORDINATE2

Matrix-type coordinate system

struct GsCOORDINATE2 {
        u_long flg;
        MATRIX coord;
        MATRIX workm;
        GsCOORD2PARM *param;
        GsCOORDINATE2 *super;
};

Members

flg Flag indicating whether coord was rewritten
coord The matrix
workm Result of multiplying this coordinate system with the WORLD coordinate system
param Pointer for scaling, rotation and translation parameters
super Pointer to the parent coordinate system

Explanation

GsCOORDINATE2 is defined by the matrix coord and a pointer to the parent coordinate system.
workm retains the result of matrix multiplication in each node of GsCOORDINATE2 from WORLD coordinates and performed by the GsGetLw() and GsGetLs() functions. However, workm does not store the result of matrix multiplication for a coordinate system that is directly coupled to the WORLD coordinate system.
flg is used during GsGetLw() and GsGetLs() to omit calculations for a node when calculations were already performed. When flg is set to 1, calculations are omitted. When flg is set to 0, calculations are performed. The programmer must clear this flag whenever coord is changed otherwise the GsGetLw() and GsGetLs() functions will not execute properly.