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

StaticMesh.h 871B

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