Open Source Tomb Raider Engine
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

SkeletalModel.h 1.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. /*!
  2. * \file include/SkeletalModel.h
  3. * \brief This is the factored out skeletal model class
  4. *
  5. * \author Mongoose
  6. * \author xythobuz
  7. */
  8. #ifndef _SKELETALMODEL_H_
  9. #define _SKELETALMODEL_H_
  10. #include <vector>
  11. #include "math/math.h"
  12. #include "TombRaider.h"
  13. class BoneTag {
  14. public:
  15. BoneTag();
  16. private:
  17. int mesh;
  18. vec3_t off;
  19. vec3_t rot;
  20. char flag;
  21. };
  22. class BoneFrame {
  23. public:
  24. BoneFrame();
  25. ~BoneFrame();
  26. unsigned int size();
  27. BoneTag &get(unsigned int i);
  28. void add(BoneTag &b);
  29. private:
  30. vec3_t pos;
  31. vec_t yaw;
  32. std::vector<BoneTag *> tag;
  33. };
  34. class AnimationFrame {
  35. public:
  36. AnimationFrame();
  37. ~AnimationFrame();
  38. unsigned int size();
  39. BoneFrame &get(unsigned int i);
  40. void add(BoneFrame &b);
  41. private:
  42. char rate;
  43. std::vector<BoneFrame *> frame;
  44. };
  45. class SkeletalModel {
  46. public:
  47. SkeletalModel(TombRaider &tr, );
  48. ~SkeletalModel();
  49. int getId();
  50. unsigned int size();
  51. AnimationFrame &get(unsigned int i);
  52. void add(AnimationFrame &a);
  53. private:
  54. int id;
  55. bool tr4Overlay;
  56. bool pigtails;
  57. int ponytailId;
  58. vec3_t ponytail;
  59. int ponytailMeshId;
  60. unsigned int ponytailNumMeshes;
  61. vec_t ponytailAngle;
  62. vec_t ponyOff;
  63. vec_t ponyOff2;
  64. std::vector<AnimationFrame *> animation;
  65. };
  66. #endif