#ifndef CYLINDER_HPP #define CYLINDER_HPP #include #include #include #include #include #include struct Color { float r; float g; float b; Color(float r, float g, float b) :r(r), g(g), b(b) {}; }; struct Cylinder { float ep; float r; unsigned nb_fac; Color c; float angle; size_t face_size; size_t side_size; QOpenGLBuffer vbo; Cylinder(float ep, float r, unsigned nb_fac, Color c); void build_face(float z, std::vector &verts); void build_faces(std::vector &verts); void build_side(std::vector &verts); void draw(QOpenGLFunctions &f, int pos, int col); }; #endif