Open Source Tomb Raider Engine
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

StaticMesh.h 886B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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(TombRaider& tr, unsigned int index);
  24. ~StaticMesh();
  25. void display();
  26. float getRadius();
  27. private:
  28. bool dontshow;
  29. float center[3];
  30. float radius;
  31. unsigned int vertexCount;
  32. unsigned int colorCount;
  33. unsigned int normalCount;
  34. float* vertices;
  35. float* colors;
  36. float* normals;
  37. std::vector<TexturedTriangle*> triangles;
  38. };
  39. #endif