Open Source Tomb Raider Engine
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Entity.h 1.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. /*!
  2. * \file include/Entity.h
  3. * \brief World Entities
  4. *
  5. * \author xythobuz
  6. */
  7. #ifndef _ENTITY_H_
  8. #define _ENTITY_H_
  9. #include "math/math.h"
  10. #include "SkeletalModel.h"
  11. #include "TombRaider.h"
  12. class Entity {
  13. public:
  14. typedef enum {
  15. MoveTypeWalkNoSwim = -1,
  16. MoveTypeWalk = 0,
  17. MoveTypeNoClipping = 1,
  18. MoveTypeFly = 2,
  19. MoveTypeSwim = 3
  20. } MoveType;
  21. Entity(TombRaider &tr, unsigned int index, unsigned int i, unsigned int model);
  22. bool operator<(Entity &o);
  23. void display();
  24. void move(char movement);
  25. void print();
  26. SkeletalModel &getModel();
  27. void setSkeletalModel(unsigned int model);
  28. void setMoveType(MoveType m);
  29. int getObjectId();
  30. void setAngles(vec_t yaw, vec_t pitch);
  31. vec_t getPos(unsigned int i);
  32. vec_t getAngle(unsigned int i);
  33. // Animation State
  34. unsigned int getAnimation();
  35. void setAnimation(unsigned int index);
  36. unsigned int getBoneFrame();
  37. void setBoneFrame(unsigned int index);
  38. unsigned int getIdleAnimation();
  39. void setIdleAnimation(unsigned int index);
  40. private:
  41. vec3_t pos;
  42. vec3_t angles;
  43. int room;
  44. unsigned int skeletalModel;
  45. MoveType moveType;
  46. int state;
  47. int objectId;
  48. // Animation State
  49. unsigned int boneFrame;
  50. unsigned int animationFrame;
  51. unsigned int idleAnimation;
  52. };
  53. #endif