diff options
author | chai <chaifix@163.com> | 2021-10-17 16:01:30 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2021-10-17 16:01:30 +0800 |
commit | 6e73ca6ada8a41692809dae5db89c8db0675ce1e (patch) | |
tree | 3ca6f06b29b3e2c183750ddcff8d7a09d0785e6b /Runner/Mesh/Mesh.h | |
parent | e13f699ee5f575198552d94ada1167305c82bb2f (diff) |
-Runner
Diffstat (limited to 'Runner/Mesh/Mesh.h')
-rw-r--r-- | Runner/Mesh/Mesh.h | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/Runner/Mesh/Mesh.h b/Runner/Mesh/Mesh.h deleted file mode 100644 index 77c6577..0000000 --- a/Runner/Mesh/Mesh.h +++ /dev/null @@ -1,62 +0,0 @@ -#ifndef MESH_H -#define MESH_H - -#include "../Graphics/VertexBuffer.h" -#include "../Utilities/Type.h" - -// Ïà¶ÔVertexBuffer¸ü¼Óuplevel -class Mesh -{ -public: - - Mesh(bool readable = false); - ~Mesh(); - - void IsReadable(); - - void SetVertices(float* data); - void SetNormals(float* data); - void SetTangents(float* data); - void SetColors(float* data); - void SetTexCoords(int channel, float* data); - - void SetTriangles(int* indices); - void SetIndices(int* indices); - - void SetVertices(float* data, int start, int length); - void SetNormals(float* data, int start, int length); - void SetTangents(float* data, int start, int length); - void SetColors(float* data, int start, int length); - void SetTexCoords(int channel, float* data, int start, int length); - - void SetVertex(float x, float y, float z, int index); - void SetNormal(float x, float y, float z, int index); - void SetTangent(float x, float y, float z, int index); - void SetColor(float r, float g, float b, float a, int index); - void SetTexCoord(float u, float v, int index); - - void GetAABB(float bias = 0.f); - - inline bool HasVertexAttr(VertexAttrMask attr); - - void Draw(); - - void CalculateNormal(); - void CalculateTangent(); - -private: - - uint m_VertexAttrBits; - - bool m_IsReadable; - - VertexBuffer* m_VBO; - -}; - -inline bool Mesh::HasVertexAttr(VertexAttrMask attr) -{ - return m_VertexAttrBits & attr; -} - -#endif
\ No newline at end of file |