Files
TimeCoil/src/coil/coil.hpp

35 lines
851 B
C++

#include <vector>
#include "segment.hpp"
#include <glad/glad.h>
#ifndef COIL_HPP
#define COIL_HPP
// Coil segment is a one turn of a coil
// (Segment) slice is a set of points that define shape of the segment
class Coil {
// distance between coil center and nearest to it coil edge
float radius;
// distance between coil slices edges
float width;
float segmentHeight;
uint32_t currentYear;
std::vector<CoilSegment> segments;
GLuint VBO, VAO, EBO;
public:
Coil(uint32_t currentYear, uint32_t amountOfSegments, float segmentHeight, uint32_t sliceDetalization, float radius, float width);
std::vector<CoilSegment> &getSegments();
float getWidth();
float getRadius();
void render();
void fillVBO(float *vertices);
uint32_t fillEBO();
void initGLBuffers();
};
#endif // COIL_HPP