skein/src/orbit.hpp

35 lines
633 B
C++

#pragma once
#include <GL/glew.h>
#include <vector>
#include "glm/glm.hpp"
typedef std::vector<float> Vector6;
class Orbit
{
public:
Orbit(Vector6 keplerianElements);
void render();
glm::vec3 getPosition(const float meanAnomaly);
glm::vec3 getVelocity(const float meanAnomaly);
glm::vec3 getTangent(const float meanAnomaly);
void setElements(Vector6 keplerianElements);
~Orbit();
private:
const float _pi = 3.14159265359;
const int _vertexCount = 100;
GLuint _vbo;
GLuint _vao;
std::vector<float> _vertices;
Vector6 _keplerianElements;
void regenerateVertices();
};