2024-08-17 21:51:42 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <GL/glew.h>
|
|
|
|
#include <vector>
|
|
|
|
#include <skein/orbit.h>
|
|
|
|
|
|
|
|
class OrbitVisualizer
|
|
|
|
{
|
|
|
|
public:
|
2024-08-21 14:56:56 +01:00
|
|
|
OrbitVisualizer(const Orbit& orbit, const GLuint shaderProgram, float scale);
|
2024-08-17 21:51:42 +01:00
|
|
|
~OrbitVisualizer();
|
|
|
|
|
|
|
|
void render(const float time);
|
|
|
|
|
|
|
|
private:
|
|
|
|
const float _pi = 3.14159265359;
|
|
|
|
|
|
|
|
const int _vertexCount = 100;
|
|
|
|
const GLuint _shaderProgram;
|
|
|
|
const Orbit& _orbit;
|
2024-08-21 14:56:56 +01:00
|
|
|
const float _scale;
|
2024-08-17 21:51:42 +01:00
|
|
|
|
|
|
|
GLuint _vbo;
|
|
|
|
GLuint _vao;
|
|
|
|
std::vector<float> _vertices;
|
|
|
|
|
|
|
|
void regenerateVertices();
|
|
|
|
};
|