Functions | Variables
gears.c File Reference
#include <math.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <glad/glad.h>
#include <GLFW/glfw3.h>
Include dependency graph for gears.c:

Go to the source code of this file.

Functions

static void animate (void)
 
static void draw (void)
 
static void gear (GLfloat inner_radius, GLfloat outer_radius, GLfloat width, GLint teeth, GLfloat tooth_depth)
 
static void init (void)
 
void key (GLFWwindow *window, int k, int s, int action, int mods)
 
int main (int argc, char *argv[])
 
void reshape (GLFWwindow *window, int width, int height)
 

Variables

static GLfloat angle = 0.f
 
static GLint gear1
 
static GLint gear2
 
static GLint gear3
 
static GLfloat view_rotx = 20.f
 
static GLfloat view_roty = 30.f
 
static GLfloat view_rotz = 0.f
 

Function Documentation

static void animate ( void  )
static

Definition at line 206 of file gears.c.

static void draw ( void  )
static

Definition at line 173 of file gears.c.

static void gear ( GLfloat  inner_radius,
GLfloat  outer_radius,
GLfloat  width,
GLint  teeth,
GLfloat  tooth_depth 
)
static

Draw a gear wheel. You'll probably want to call this function when building a display list since we do a lot of trig here.

Input: inner_radius - radius of hole at center outer_radius - radius at center of teeth width - width of gear teeth - number of teeth tooth_depth - depth of tooth

Definition at line 50 of file gears.c.

static void init ( void  )
static

Definition at line 266 of file gears.c.

void key ( GLFWwindow window,
int  k,
int  s,
int  action,
int  mods 
)

Definition at line 213 of file gears.c.

int main ( int  argc,
char *  argv[] 
)

Definition at line 303 of file gears.c.

void reshape ( GLFWwindow window,
int  width,
int  height 
)

Definition at line 246 of file gears.c.

Variable Documentation

GLfloat angle = 0.f
static

Definition at line 170 of file gears.c.

GLint gear1
static

Definition at line 169 of file gears.c.

GLint gear2
static

Definition at line 169 of file gears.c.

GLint gear3
static

Definition at line 169 of file gears.c.

GLfloat view_rotx = 20.f
static

Definition at line 168 of file gears.c.

GLfloat view_roty = 30.f
static

Definition at line 168 of file gears.c.

GLfloat view_rotz = 0.f
static

Definition at line 168 of file gears.c.



librealsense2
Author(s): Sergey Dorodnicov , Doron Hirshberg , Mark Horn , Reagan Lopez , Itay Carpis
autogenerated on Mon May 3 2021 02:50:25