Transform.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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. /**
  18. * Rotation animation property. Data=qx,qy,qz,qw (as quaternion).
  19. */
  20. ANIMATE_ROTATE = 8,
  21. /**
  22. * Translation animation property. Data=tx,ty,tz
  23. */
  24. ANIMATE_TRANSLATE = 9,
  25. ANIMATE_TRANSLATE_X = 10,
  26. ANIMATE_TRANSLATE_Y = 11,
  27. ANIMATE_TRANSLATE_Z = 12,
  28. /**
  29. * Rotation + Translation animation property(Rigid Body). Data=qx,qy,qz,qw,tx,ty,tz
  30. */
  31. ANIMATE_ROTATE_TRANSLATE = 16,
  32. /**
  33. * Scale, Rotation + Translation animation property. Data=sx,sy,sz,qx,qy,qz,qw,tx,ty,tz
  34. */
  35. ANIMATE_SCALE_ROTATE_TRANSLATE = 17,
  36. /**
  37. * Scale + Translation animation property. Data=sx,sy,sz,tx,ty,tz
  38. */
  39. ANIMATE_SCALE_TRANSLATE = 18,
  40. /**
  41. * Scale + Rotation animation property. Data=sx,sy,sz,qx,qy,qz,qw
  42. */
  43. ANIMATE_SCALE_ROTATE = 19
  44. };
  45. /**
  46. * Returns the string representation of the given TransformProperty.
  47. */
  48. static const char* getPropertyString(unsigned int prop);
  49. /**
  50. * Returns the number of floats for the given property or zero if not a valid property.
  51. */
  52. static unsigned int getPropertySize(unsigned int prop);
  53. };
  54. }
  55. #endif