fixed terrain tiles generation
[demo] / src / mesh.h
index 36a79cd..84cbbcb 100644 (file)
@@ -15,21 +15,25 @@ enum {
 };
 
 class Mesh {
-private:
-       // call before draw in gl
-       virtual void update_vertex_data() = 0;
+protected:
+       bool vdata_valid;
+
 public:
        std::vector<uint16_t> indices;
        std::vector<Vec3> vertices;
        std::vector<Vec3> normals;
-       std::vector<Vec3> tangents;
        std::vector<Vec2> tex_coords;
-       std::string name;
 
-       unsigned int which_mask;
+       std::string name;
 
        Mesh();
        virtual ~Mesh() = 0;
+
+       virtual void draw() const = 0;
+       virtual void draw_normals(float scale) const = 0;
+       virtual void update_vertex_data() = 0;
+       virtual void transform(const Mat4 &mat);
+       virtual void invalidate();
 };
 
 #endif // MESH_H_
\ No newline at end of file