1: /* File: dmcgl.h
     2:    Submitted as part of Project 4 for EECS 672, Spring 2007
     3:    by Douglas McClendon, KUID 0536810
     4: */
     5: 
     6: 
     7: #include <GL/gl.h> 
     8: #include <stdlib.h> 
     9: #include <GL/glut.h> 
    10: #include <stdio.h> 
    11: #include <math.h> 
    12: 
    13: // This gl function draws a line cube centered about the origin, with radius
    14: // r, and color 1,1,1.
    15: void draw_line_cube(double r);
    16: // This gl function draws a diamond of radius one about the origin.  Col
    17: void draw_diamond();
    18: // my experimental replacement for glutSolidCube
    19: void fbnSolidTexturedCube(double size);
    20: void copy_vertex(GLfloat *dest, GLfloat *src);
    21: void set_vertex(GLfloat *dest, GLfloat x, GLfloat y, GLfloat z);
    22: float randfn1(); // returns random between -1 and 1
    23: float randf01(); // returns random between 0 and 1
    24: void xyz2rtp(double *r, double *t, double *p, double x, double y, double z);
    25: void rtp2xyz(double *x, double *y, double *z, double r, double t, double p);
    26: void rand_vector(double *x, double *y, double *z);
    27: double vector_length(double x, double y, double z);
    28: void stretch(double *x, double *y, double *z, double r);
    29: int read_ppm_to_buffer(unsigned char **buffer, int *width, int *height,\
    30: 					   const char *filename); 
    31: void save_buffer_to_ppm(unsigned char *buffer, int width, int height,\
    32: 				 char *filename); 
    33: int generate_checkerboard_texture(unsigned char **buffer, int *width, int *height); 
    34: