-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAnimation.h
executable file
·68 lines (46 loc) · 1.69 KB
/
Animation.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
// Animation.h: interface for the CAnimation class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_ANIMATION_H__E481D60A_F0B0_4FED_B47D_7CA923708947__INCLUDED_)
#define AFX_ANIMATION_H__E481D60A_F0B0_4FED_B47D_7CA923708947__INCLUDED_
//#if _MSC_VER > 1000
#pragma once
//#endif // _MSC_VER > 1000
#include <windows.h> // Header File For Windows
#include <gl\gl.h> // Header File For The OpenGL32 Library
#include <gl\glu.h> // Header File For The GLu32 Library
#include <stdio.h>
#include <math.h>
class CAnimation
{
public:
float tau; // time scale in seconds
float blobSize;
int blobCount;
float speed; // speed of motion, in weird units or deg/s
float Zheight;
float windowWidth; //=blobMaxX*blobSize;
float windowHeight; //=blobMaxY*blobSize;
private:
const float PI;
//double blobMaxX; // = 160; //windowWidth/blobSize;
//double blobMaxY; // = 120; //windowHeight/blobSize;
struct SBlob
{
double x, y; //defines the top left right x,y coordinate for each blob
};
SBlob *blobArray, *pBlob;
const int maxNumBlobs; // = 1000;
double *pVertex;
//double vertexArray[4000]; //8*maxNumBlobs]; up to 12 if 3 points per vertex
double vertexArray[12000]; // 12*maxNumBlobs -- 4 vertices of 3 points each
public:
CAnimation();
virtual ~CAnimation();
void CreateBlobs(void);
void RenderScene(float dt);
void RenderScene_rotation(float dt);
void RenderScene_rotation_halves(float dt);
void RenderScene_rotation_grad(float dt);
};
#endif // !defined(AFX_ANIMATION_H__E481D60A_F0B0_4FED_B47D_7CA923708947__INCLUDED_)