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.

StaticMesh.h 948B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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 "TombRaider.h"
  11. class TexturedTriangle {
  12. public:
  13. TexturedTriangle(int i[3], float s[6], int tex, unsigned short trans);
  14. void display(float* vertices, float* colors, float* normals);
  15. private:
  16. int index[3];
  17. float st[6];
  18. int texture;
  19. unsigned short transparency;
  20. };
  21. class StaticMesh {
  22. public:
  23. StaticMesh(int id, int mesh);
  24. StaticMesh(TombRaider& tr, unsigned int index);
  25. ~StaticMesh();
  26. void display();
  27. float getRadius();
  28. private:
  29. bool dontshow;
  30. float center[3];
  31. float radius;
  32. unsigned int vertexCount;
  33. unsigned int colorCount;
  34. unsigned int normalCount;
  35. float* vertices;
  36. float* colors;
  37. float* normals;
  38. std::vector<TexturedTriangle*> triangles;
  39. int id;
  40. int mesh;
  41. };
  42. #endif