couch/core/Mesh.h

31 lines
558 B
C
Raw Normal View History

2021-01-13 10:42:57 -06:00
#ifndef MESH_H
#define MESH_H
2021-01-13 16:47:16 -06:00
#include <list>
2021-01-13 10:42:57 -06:00
#include "types.h"
2021-01-14 11:52:01 -06:00
#include "Spatial.h"
2021-01-13 10:42:57 -06:00
#include "Vertex.h"
#include "Index.h"
#include "Material.h"
2021-01-13 10:42:57 -06:00
class Mesh : public Spatial {
2021-01-13 10:42:57 -06:00
public:
VertexList vertices;
IndexList indices;
Material *material;
2021-01-13 10:42:57 -06:00
Mesh();
~Mesh();
2021-01-13 10:42:57 -06:00
Mesh(VertexList vertices, IndexList indices);
static Mesh FromFile(const char *filename);
virtual bool IsDrawable() const {return true;}
2021-01-14 11:52:01 -06:00
virtual void Draw();
2021-01-13 10:42:57 -06:00
virtual void SetupMesh();
private:
Id VAO, VBO, EBO;
};
2021-01-13 16:47:16 -06:00
typedef std::list<Mesh*> MeshList;
2021-01-13 10:42:57 -06:00
#endif /* MESH_H */