-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathbubbleTools.h
75 lines (50 loc) · 1.87 KB
/
bubbleTools.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
#include <triDBase.h>
#include <mapper.h>
#include <arrayList.h>
#include <triDRender.h>
#include <offscreen.h>
#define SLICES 10 // How many slices (triangles) are we going to slice up the umbrella.
#define RADIUS 100 // This is the radius of the entire rolling ball.
#define BOUND_X 20
#define BOUND_Y 40
#define BOUND_DIA RADIUS*2
#define BOUND_CX BOUND_DIA/2+BOUND_X
#define BOUND_CY BOUND_DIA/2+BOUND_Y
#define TARGET_DIA 40
#define TARGET_X BOUND_CX - TARGET_DIA/2
#define TARGET_Y BOUND_CY - TARGET_DIA/2
class bubbleRender;
class grid;
extern grid* theGrid;
extern colorObj backColor;
extern bubbleRender* renderMan; // triDRender is the engine that reads the model to do the 2D drawing.
extern triDRotation new_angle; // This sets the oreantation of the model's drwaing on the screen.
extern triDRotation my_angle; // Saves the last location.
double radToDeg(double x); // Humans like degrees. These two do the traslantions.
double degToRad(double x);
triDTriangle* createCircleThing(int slices,double coneAngle,double radius);
void setupModel(void);
class bubble : public arrayList {
public :
bubble(triDTriangle* inList,long numItems);
virtual ~bubble(void);
};
class bubbleRender : public triDRender {
public :
bubbleRender(int inX,int inY,int inWidth,int inHeight);
virtual ~bubbleRender(void);
void clearPtList(void);
void addTriangle(viewFacet* aFacet);
void erasePoints(void);
virtual void drawSelf(void);
point pt[SLICES*3];
};
class grid : public drawObj {
public:
grid(int centerX,int centerY);
virtual ~grid(void);
void setColor(colorObj* inColor);
virtual void drawSelf(void);
point center;
colorObj gridColor;
};