chore: make orbit animation read better
This commit is contained in:
parent
8391c0c23e
commit
75cf44e2fd
|
@ -51,7 +51,7 @@ int main()
|
|||
GLuint litProgram = compileShaderProgram("./frag_lit.glsl");
|
||||
GLuint unlitProgram = compileShaderProgram("./frag_unlit.glsl");
|
||||
|
||||
Icosphere planet(0.4, 2, litProgram);
|
||||
Icosphere planet(0.3, 3, litProgram);
|
||||
Icosphere orbiter(0.1, 2, litProgram);
|
||||
Orbit orbit(100);
|
||||
|
||||
|
@ -63,7 +63,7 @@ int main()
|
|||
|
||||
float time = glfwGetTime();
|
||||
|
||||
glm::vec3 pos = orbit.getPosition(time);
|
||||
glm::vec3 pos = orbit.getPosition(time * .3);
|
||||
orbiter.setPosition(pos);
|
||||
|
||||
// Render lit objects
|
||||
|
|
|
@ -7,9 +7,9 @@ Orbit::Orbit(int vertexCount) :
|
|||
_keplerianElements(std::vector<float>(6))
|
||||
{
|
||||
_keplerianElements[astro::semiMajorAxisIndex] = .75;
|
||||
_keplerianElements[astro::eccentricityIndex] = .1;
|
||||
_keplerianElements[astro::inclinationIndex] = _pi / 2.0 + 0.1;
|
||||
_keplerianElements[astro::argumentOfPeriapsisIndex] = 0;
|
||||
_keplerianElements[astro::eccentricityIndex] = .3;
|
||||
_keplerianElements[astro::inclinationIndex] = _pi / 2.0 + 1;
|
||||
_keplerianElements[astro::argumentOfPeriapsisIndex] = 2.0;
|
||||
_keplerianElements[astro::longitudeOfAscendingNodeIndex] = 0;
|
||||
|
||||
for (int i = 0; i < vertexCount; i++)
|
||||
|
|
Loading…
Reference in New Issue