-
Notifications
You must be signed in to change notification settings - Fork 0
/
View.h
89 lines (64 loc) · 1.64 KB
/
View.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
// View.h: interface for the CView class.
//
//////////////////////////////////////////////////////////////////////
#pragma once
class CView
{
public:
CView();
virtual ~CView();
//View Creation
bool Create( UINT type, UINT id, HGLRC *pRc, LPCTSTR className, HINSTANCE hInstance, HWND parent, UINT index );
void Destroy();
//View Manipulation
void ResizeWindow( UINT width, UINT height );
void RePositionWindow( UINT pos_x, UINT pos_y );
void Update( bool force );
void UpdateGizmos();
bool Initialize();
void PrepareSelection();
void Rotate( float x, float y, float z );
void AbsRotate( float x, float y, float z );
void RePosition( float x, float y, float z, bool useFocus );
void Move( float x, float y, float z );
// void Zoom( float distance );
void Dolly( float distance, bool moveFocus, bool movePosition );
void Orbit( float x, float y, float z, Float3 *origin );
void ZoomExtents( bool selection );
//Drawing Functions
void DrawUI();
void DrawGrid();
void DrawGizmos();
void DrawRegion();
void DrawHelperTripod();
//Window Information
HWND hWnd;
HDC hDC;
HGLRC *pRC;
UINT ID;
RECT Rect;
CHAR Name[32];
//Transformation Information
Float3 Position;
Float3 Rotation;
Float3 Focus;
float Distance;
Float3 Direction;
Float3 RightVector;
Float3 UpVector;
Int2 Origin;
Float4 CreationPlane;
//Rendering Information
float FOV;
float Aspect;
float Size;
float ClipNear;
float ClipFar;
float GizmoSize;
float OriginSize;
bool NeedUpdate;
bool Active;
UINT RenderMode; //RM_WIREFRAME, RM_SHADED
UINT Type; //VT_ORTHO, VT_PERSPECTIVE
bool GridVisible;
};