next up previous contents
Next: Other sizes of fixed Up: Fixed size vectors Previous: Single precision fixed size   Contents

Other types of fixed size vector

As well as floating point coordinates, integer vectors are often useful. Although Gandalf does not currently provide sets of functions handling vectors with integer coordinates, structures are defined as follows
      /* structure definition for unsigned character 3-vector */
      typedef struct Gan_Vector3_uc
      {
         unsigned char x, y, z;
      } Gan_Vector3_uc;

      /* structure definition for short integer 3-vector */
      typedef struct Gan_Vector3_s
      {
         short x, y, z;
      } Gan_Vector3_s;

      /* structure definition for unsigned short integer 3-vector */
      typedef struct Gan_Vector3_us
      {
         unsigned short x, y, z;
      } Gan_Vector3_us;

      /* structure definition for integer 3-vector */
      typedef struct Gan_Vector3_i
      {
         int x, y, z;
      } Gan_Vector3_i;

      /* structure definition for unsigned integer 3-vector */
      typedef struct Gan_Vector3_ui
      {
         unsigned int x, y, z;
      } Gan_Vector3_ui;



2006-03-17