Transform.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. #ifndef TRANSFORM_H_
  2. #define TRANSFORM_H_
  3. namespace gameplay
  4. {
  5. class Transform
  6. {
  7. public:
  8. enum TransformProperties
  9. {
  10. /**
  11. * Scale animation property. Data=sx,sy,sz
  12. */
  13. ANIMATE_SCALE = 1,
  14. ANIMATE_SCALE_X = 2,
  15. ANIMATE_SCALE_Y = 3,
  16. ANIMATE_SCALE_Z = 4,
  17. ANIMATE_SCALE_XY = 5,
  18. ANIMATE_SCALE_XZ = 6,
  19. ANIMATE_SCALE_YZ = 7,
  20. /**
  21. * Rotation animation property. Data=qx,qy,qz,qw (as quaternion).
  22. */
  23. ANIMATE_ROTATE = 8,
  24. /**
  25. * Translation animation property. Data=tx,ty,tz
  26. */
  27. ANIMATE_TRANSLATE = 9,
  28. ANIMATE_TRANSLATE_X = 10,
  29. ANIMATE_TRANSLATE_Y = 11,
  30. ANIMATE_TRANSLATE_Z = 12,
  31. ANIMATE_TRANSLATE_XY = 13,
  32. ANIMATE_TRANSLATE_XZ = 14,
  33. ANIMATE_TRANSLATE_YZ = 15,
  34. /**
  35. * Rotation + Translation animation property(Rigid Body). Data=qx,qy,qz,qw,tx,ty,tz
  36. */
  37. ANIMATE_ROTATE_TRANSLATE = 16,
  38. /**
  39. * Scale, Rotation + Translation animation property. Data=sx,sy,sz,qx,qy,qz,qw,tx,ty,tz
  40. */
  41. ANIMATE_SCALE_ROTATE_TRANSLATE = 17,
  42. ANIMATE_ROTATE_X = 18,
  43. ANIMATE_ROTATE_Y = 19,
  44. ANIMATE_ROTATE_Z = 20
  45. };
  46. /**
  47. * Returns the string representation of the given TransformProperty.
  48. */
  49. static const char* getPropertyString(unsigned int prop);
  50. /**
  51. * Returns the number of floats for the given property or zero if not a valid property.
  52. */
  53. static unsigned int getPropertySize(unsigned int prop);
  54. };
  55. }
  56. #endif