#include <GL/glut.h>
#include <math.h>
#include <stdio.h>
Go to the source code of this file.
|
static bool | spinning = true |
|
static const int | FPS = 20 |
|
static GLfloat | current_rot = 0.0 |
|
static int | year = 0 |
|
static int | day = 0 |
|
static GLfloat | u = 0.0 |
|
static GLfloat | du = 0.1 |
|
◆ pi
◆ display()
Definition at line 40 of file openGL_astronomy_animated.c.
41 glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
45 glColor3f(1.0, 1.0, 0.0);
50 glRotatef((GLfloat)
year, 0.0, 1.0, 0.0);
51 glTranslatef(2.0, 0.0, 0.0);
52 glRotatef((GLfloat)
day, 0.0, 1.0, 0.0);
53 glColor3f(0.0, 0.0, 1.0);
57 glVertex3f(0, -0.3, 0);
58 glVertex3f(0, 0.3, 0);
void myWireSphere(GLfloat radius, int slices, int stacks)
References day, myWireSphere(), and year.
Referenced by main().
◆ main()
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 112 of file openGL_astronomy_animated.c.
113 glutInit(&argc, argv);
114 glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH);
115 glutInitWindowSize(800, 600);
116 glutCreateWindow(
"Comet, Planet Simulation");
119 glutTimerFunc(100,
timer, 0);
120 glEnable(GL_DEPTH_TEST);
void reshape(GLint w, GLint h)
References display(), reshape(), and timer().
◆ myWireSphere()
void myWireSphere |
( |
GLfloat |
radius, |
|
|
int |
slices, |
|
|
int |
stacks |
|
) |
| |
◆ reshape()
void reshape |
( |
GLint |
w, |
|
|
GLint |
h |
|
) |
| |
Definition at line 103 of file openGL_astronomy_animated.c.
104 glViewport(0, 0, w, h);
105 glMatrixMode(GL_PROJECTION);
107 gluPerspective(60.0, (GLfloat)w / (GLfloat)h, 1.0, 40.0);
108 glMatrixMode(GL_MODELVIEW);
Referenced by main().
◆ timer()
◆ current_rot
GLfloat current_rot = 0.0 |
|
static |
◆ day
◆ du
◆ FPS
◆ spinning
Definition at line 72 of file openGL_astronomy_animated.c.
Referenced by gpmp::Graph::bellman_ford(), gpmp::Graph::chromatic_number(), gpmp::Graph::dfs_connected_components(), gpmp::Graph::dijkstra(), gpmp::Graph::eccentricity(), gpmp::Graph::greedy_coloring(), gpmp::Graph::has_k5(), gpmp::Graph::is_bipartite(), gpmp::Graph::kruskal(), map_file(), gpmp::Graph::match_cardinality(), gpmp::Graph::match_wt(), gpmp::Graph::planar_gen(), timer(), gpmp::Graph::topo_sort_util(), and gpmp::ml::ConcreteAutoEncoder::train().
◆ year