#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <glad/glad.h>
#include <GLFW/glfw3.h>
#include <linmath.h>
Go to the source code of this file.
|
void | BounceBall (double dt) |
|
double | cos_deg (double deg) |
|
void | CrossProduct (vertex_t a, vertex_t b, vertex_t c, vertex_t *n) |
|
void | cursor_position_callback (GLFWwindow *window, double x, double y) |
|
double | deg2rad (double deg) |
|
void | display (void) |
|
void | DrawBoingBall (void) |
|
void | DrawBoingBallBand (GLfloat long_lo, GLfloat long_hi) |
|
void | DrawGrid (void) |
|
void | init (void) |
|
void | key_callback (GLFWwindow *window, int key, int scancode, int action, int mods) |
|
int | main (void) |
|
void | mouse_button_callback (GLFWwindow *window, int button, int action, int mods) |
|
void | reshape (GLFWwindow *window, int w, int h) |
|
static void | set_ball_pos (GLfloat x, GLfloat y) |
|
double | sin_deg (double deg) |
|
GLfloat | TruncateDeg (GLfloat deg) |
|
#define ANIMATION_SPEED 50.f |
#define BOUNCE_HEIGHT (RADIUS * 2.1f) |
#define BOUNCE_WIDTH (RADIUS * 2.1f) |
#define GRID_SIZE (RADIUS * 4.5f) /* length (width) of grid */ |
#define MAX_DELTA_T 0.02f |
#define SHADOW_OFFSET_X -20.f |
#define SHADOW_OFFSET_Y 10.f |
#define SHADOW_OFFSET_Z 0.f |
#define STEP_LATITUDE 22.5f |
#define STEP_LONGITUDE 22.5f /* 22.5 makes 8 bands like original Boing */ |
#define VIEW_SCENE_DIST (DIST_BALL * 3.f + 200.f)/* distance from viewer to middle of boing area */ |
#define WALL_L_OFFSET 0.f |
#define WALL_R_OFFSET 5.f |
Enumerator |
---|
DRAW_BALL |
|
DRAW_BALL_SHADOW |
|
Definition at line 86 of file boing.c.
void BounceBall |
( |
double |
dt | ) |
|
double cos_deg |
( |
double |
deg | ) |
|
void cursor_position_callback |
( |
GLFWwindow * |
window, |
|
|
double |
x, |
|
|
double |
y |
|
) |
| |
double deg2rad |
( |
double |
deg | ) |
|
void key_callback |
( |
GLFWwindow * |
window, |
|
|
int |
key, |
|
|
int |
scancode, |
|
|
int |
action, |
|
|
int |
mods |
|
) |
| |
void mouse_button_callback |
( |
GLFWwindow * |
window, |
|
|
int |
button, |
|
|
int |
action, |
|
|
int |
mods |
|
) |
| |
double sin_deg |
( |
double |
deg | ) |
|