2
0

IceAxes.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  2. /**
  3. * Contains axes definition.
  4. * \file IceAxes.h
  5. * \author Pierre Terdiman
  6. * \date January, 29, 2000
  7. */
  8. ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  9. ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  10. // Include Guard
  11. #ifndef __ICEAXES_H__
  12. #define __ICEAXES_H__
  13. enum PointComponent
  14. {
  15. _X = 0,
  16. _Y = 1,
  17. _Z = 2,
  18. _W = 3,
  19. _FORCE_DWORD = 0x7fffffff
  20. };
  21. enum AxisOrder
  22. {
  23. AXES_XYZ = (_X)|(_Y<<2)|(_Z<<4),
  24. AXES_XZY = (_X)|(_Z<<2)|(_Y<<4),
  25. AXES_YXZ = (_Y)|(_X<<2)|(_Z<<4),
  26. AXES_YZX = (_Y)|(_Z<<2)|(_X<<4),
  27. AXES_ZXY = (_Z)|(_X<<2)|(_Y<<4),
  28. AXES_ZYX = (_Z)|(_Y<<2)|(_X<<4),
  29. AXES_FORCE_DWORD = 0x7fffffff
  30. };
  31. class ICEMATHS_API Axes
  32. {
  33. public:
  34. inline_ Axes(AxisOrder order)
  35. {
  36. mAxis0 = (order ) & 3;
  37. mAxis1 = (order>>2) & 3;
  38. mAxis2 = (order>>4) & 3;
  39. }
  40. inline_ ~Axes() {}
  41. udword mAxis0;
  42. udword mAxis1;
  43. udword mAxis2;
  44. };
  45. #endif // __ICEAXES_H__