openGPMP
Open Source Mathematics Package
|
#include <GL/glut.h>
#include <cmath>
#include <math.h>
#include <stdio.h>
Go to the source code of this file.
Classes | |
class | Camera |
class | Ball |
class | Checkerboard |
Macros | |
#define | pi 3.142857 |
Functions | |
Checkerboard | checkerboard (8, 8) |
void | init () |
void | display () |
void | reshape (GLint w, GLint h) |
void | timer (int v) |
void | special (int key, int, int) |
int | main (int argc, char **argv) |
Variables | |
GLfloat | WHITE [] = {1, 1, 1} |
GLfloat | RED [] = {1, 0, 0} |
GLfloat | GREEN [] = {0, 1, 0} |
GLfloat | MAGENTA [] = {1, 0, 1} |
Camera | camera |
Ball | balls [] |
#define pi 3.142857 |
Definition at line 9 of file openGL_bounce.c.
Checkerboard checkerboard | ( | 8 | , |
8 | |||
) |
void display | ( | void | ) |
Definition at line 171 of file openGL_bounce.c.
References balls, camera, Checkerboard::centerx(), Checkerboard::centerz(), checkerboard(), Checkerboard::draw(), Camera::getX(), Camera::getY(), Camera::getZ(), and Ball::update().
Referenced by main().
void init | ( | ) |
Definition at line 158 of file openGL_bounce.c.
References checkerboard(), Checkerboard::create(), and WHITE.
Referenced by main().
int main | ( | int | argc, |
char ** | argv | ||
) |
void reshape | ( | GLint | w, |
GLint | h | ||
) |
void special | ( | int | key, |
int | , | ||
int | |||
) |
Definition at line 208 of file openGL_bounce.c.
References camera, Camera::moveDown(), Camera::moveLeft(), Camera::moveRight(), and Camera::moveUp().
Referenced by main().
void timer | ( | int | v | ) |
Definition at line 201 of file openGL_bounce.c.
Referenced by main().
Ball balls[] |
Camera camera |
Definition at line 151 of file openGL_bounce.c.
GLfloat GREEN[] = {0, 1, 0} |
Definition at line 14 of file openGL_bounce.c.
GLfloat MAGENTA[] = {1, 0, 1} |
Definition at line 15 of file openGL_bounce.c.
GLfloat RED[] = {1, 0, 0} |
Definition at line 13 of file openGL_bounce.c.
Referenced by Checkerboard::create().
GLfloat WHITE[] = {1, 1, 1} |
Definition at line 12 of file openGL_bounce.c.
Referenced by Checkerboard::create(), and init().