-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathShape.h
90 lines (78 loc) · 1.8 KB
/
Shape.h
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
/*#ifndef _SHAPE_H_
#define _SHAPE_H_
#include "Vector3.h"
#include "Camera.h"
#include "Matrix4.h"
//#include "cube.h"
#include "objreader.h"
class Shape
{
public:
Camera camera;
Matrix4 translation;
Matrix4 scale;
double angle;
double x, y, z; // center
float scaling_x, scaling_y, scaling_z;
// house
int house_nVerts;
float *house_vertices;
float *house_colors;
int *house_indices;
// sphere
int sphere_nVerts;
float *sphere_vertices;
float *sphere_normals;
float *sphere_texcoords;
int sphere_nIndices;
int *sphere_indices;
// teddy
int teddy_nVerts;
float *teddy_vertices;
float *teddy_normals;
float *teddy_texcoords;
int teddy_nIndices;
int *teddy_indices;
// teapot
int teapot_nVerts;
float *teapot_vertices;
float *teapot_normals;
float *teapot_texcoords;
int teapot_nIndices;
int *teapot_indices;
// cow
int cow_nVerts;
float *cow_vertices;
float *cow_normals;
float *cow_texcoords;
int cow_nIndices;
int *cow_indices;
// bunny
int bunny_nVerts;
float *bunny_vertices;
float *bunny_normals;
float *bunny_texcoords;
int bunny_nIndices;
int *bunny_indices;
Shape();
Camera& getCameraMatrix();
double getAngle();
void setAngle(double);
void spin(double); // spin shape [degrees]
void drawHouse();
void calculateStuff(int, float*);
};
class Window // output window related routines
{
public:
static int width, height; // window size
static void idleCallback(void);
static void reshapeCallback(int, int);
static void displayCallback(void);
static void drawShape(int nVerts, float* vertices,
int nIndices, int* indices);
static void processNormalKeys(unsigned char, int, int);
static void processSpecialKeys(int, int, int);
static void drawCube();
};
#endif*/