Open Source Tomb Raider Engine
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

StaticMesh.h 900B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*!
  2. * \file include/StaticMesh.h
  3. * \brief Static Model Meshes
  4. *
  5. * \author xythobuz
  6. */
  7. #ifndef _STATIC_MODEL_H_
  8. #define _STATIC_MODEL_H_
  9. #include <vector>
  10. #include "math/math.h"
  11. #include "TombRaider.h"
  12. class TexturedTriangle {
  13. public:
  14. TexturedTriangle(int i[3], vec_t s[6], int tex, unsigned short trans);
  15. void display(vec_t *vertices, vec_t *colors, vec_t *normals);
  16. private:
  17. int index[3];
  18. vec_t st[6];
  19. int texture;
  20. unsigned short transparency;
  21. };
  22. class StaticMesh {
  23. public:
  24. StaticMesh(TombRaider &tr, unsigned int index);
  25. ~StaticMesh();
  26. void display();
  27. vec_t getRadius();
  28. private:
  29. bool dontshow;
  30. vec3_t center;
  31. vec_t radius;
  32. unsigned int vertexCount;
  33. unsigned int colorCount;
  34. unsigned int normalCount;
  35. vec_t *vertices;
  36. vec_t *colors;
  37. vec_t *normals;
  38. std::vector<TexturedTriangle *> triangles;
  39. };
  40. #endif