-
Notifications
You must be signed in to change notification settings - Fork 0
/
State.h
140 lines (100 loc) · 2.19 KB
/
State.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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
// State.h: interface for the CState class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_STATE_H__6F03462F_50EC_4ABC_8721_B0F9846EA408__INCLUDED_)
#define AFX_STATE_H__6F03462F_50EC_4ABC_8721_B0F9846EA408__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "View.h"
struct tToolInfo
{
UINT Type;
UINT ID;
bool Enabled;
bool Active;
UINT Step;
HWND hButton;
HCURSOR hCursor;
void *pData;
};
struct tMouseInfo
{
POINT Pos2D;
Float3 Pos3D;
Float3 Vector;
Float3 StartPoint3D;
Float3 EndPoint3D;
};
class CState
{
public:
CState();
virtual ~CState();
void UpdateMouse( UINT index, POINT position );
bool UpdateMousePos3D( UINT index, const Float4* plane );
bool RollbackTool();
void SetToolInfo( UINT index, HWND hButton );
void Reset();
void UpdateTransforms( Float3 *pdata );
//File State
bool FileReady;
char CurrentFile[256];
UINT FileNameOffset;
UINT FileType;
//Tool State
tToolInfo Tool;
UINT ToolLevel;
HWND hToolButton[3];
//Mouse State
tMouseInfo Mouse[2];
Float3 MouseOffset;
//Select State
void *pMasterObject;
UINT MasterObjectType;
UINT SubObjectType;
bool UsingMaster;
//View State
CView View;
CView TempView[4];
//OpenGL State
GLdouble ModelMatrix[16];
GLdouble ProjMatrix[16];
GLint Viewport[4];
//UI State
Float3 TransformInfo;
//Temp Variables
HCURSOR hTempCursor;
RECT TempRect1;
RECT TempRect2;
POINT TempPoint1;
POINT TempPoint2;
POINT *pRegionPoint;
UINT RegionPointCount;
Float4 TempVector4a;
Float4 TempVector4b;
Float4 TempVector4c;
Float4 TempVector4d;
Float3 TempVector3a;
Float3 TempVector3b;
Float3 TempVector3c;
Float3 TempVector3d;
Float3 TempVector3e;
Double3 TempVectord3a;
Double3 TempVectord3b;
Float2 TempVector2a;
Float2 TempVector2b;
Float2 TempVector2c;
float TempValue1;
float TempValue2;
float TempValue3;
float TempValue4;
bool TempBool1;
bool TempBool2;
char TempBuffer256a[256];
char TempBuffer128a[128];
char TempBuffer64a[64];
char TempBuffer32a[32];
char TempBuffer16a[16];
};
#endif // !defined(AFX_STATE_H__6F03462F_50EC_4ABC_8721_B0F9846EA408__INCLUDED_)