volmetrics

diff src/mesh.h @ 8:928954bfefd7

added mesh (draw: immediate mode - todo: displ. list)
author Eleni Maria Stea <elene.mst@gmail.com>
date Sat, 25 Jan 2014 19:25:32 +0200
parents
children 40febfed6cff
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/mesh.h	Sat Jan 25 19:25:32 2014 +0200
     1.3 @@ -0,0 +1,23 @@
     1.4 +#ifndef MESH_H_
     1.5 +#define MESH_H_
     1.6 +
     1.7 +#include <vector>
     1.8 +#include "vector.h"
     1.9 +
    1.10 +class Mesh {
    1.11 +private:
    1.12 +	std::vector<Vector3> vertices;
    1.13 +	std::vector<Vector3> normals;
    1.14 +
    1.15 +public:
    1.16 +	Mesh();
    1.17 +
    1.18 +	void add_vertex(const Vector3 &vertex);
    1.19 +	void add_normal(const Vector3 &normal);
    1.20 +
    1.21 +	void clear();
    1.22 +
    1.23 +	void draw() const;
    1.24 +};
    1.25 +
    1.26 +#endif // MESH_H_