-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathraleway.cc
More file actions
34 lines (31 loc) · 746 Bytes
/
raleway.cc
File metadata and controls
34 lines (31 loc) · 746 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#include "color.h"
#include "cube.h"
#include "raleway.h"
#define GL_GLEXT_PROTOTYPES
#ifdef __APPLE__
#include <GLUT/glut.h>
#else
#include <GL/glut.h>
#endif
extern float rep;
extern float shinyvec[1];
extern int ntexMetal;
extern int ntexWood;
//
// draw the cylinder. for example the stick holding the bubble.
//
void raleway(double l, double w, double h, double space, Color color)
{
glPushMatrix();
glScaled(1, w, h);
cube(l, 0.15, 0.1, color, 0X3F, 1, ntexMetal);
glTranslated(0, 0, 1.4);
cube(l, 0.15, 0.1, color, 0X3F, 1, ntexMetal);
glTranslated(-l, -0.2, -0.7);
for(double bl = 0.0; bl <= l; bl += 0.4)
{
cube(0.4, 0.2, 1.2, Color(0.7, 0.7, 0.7, 1), 0X3F, 1, ntexWood);
glTranslated(1, 0, 0);
}
glPopMatrix();
}