-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCParamEd.h
91 lines (79 loc) · 2.58 KB
/
CParamEd.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
//
// A Class that controls the drawing of the Paramater Editing control in open GL
//
//
#ifndef _CPARAMEDITOR_H_
#define _CPARAMEDITOR_H_
extern "C"
{
#include "xvt.h"
}
#if XVTWS == WIN32WS
#undef BOOLEAN // undefine a few things in XVT that interfear with 'windows.h'
typedef short SHORT;
typedef long LONG;
typedef char CHAR;
#include <windows.h>
#else // Motif
#endif
#include "CParamHa.h"
class CParamEditor
{
//
// Public Definitions
//
public:
CParamEditor(); // Constructor
~CParamEditor(); // Descructor
#if XVTWS == WIN32WS
void setWindow(HDC pWindow);
#else
void setWindow(WINDOW pWindow);
#endif
int addDipDirHandle();
int addDipHandle();
int addPitchHandle();
int addParamHandle(CParamHandle *newParamHandle);
CParamHandle *getParamHandleNumber(int) const;
void setRotateX(double dwRotateX);
double getRotateX() const;
void setRotateY(double dwRotateY);
double getRotateY() const;
void setOrigin(double dwOriginX = 0.0, double dwOriginY = 0.0, double dwOriginZ = 0.0);
void getOrigin(double *pdwOriginX, double *pdwOriginY, double *pdwOriginZ) const;
void setMousePos(int nMouseXPos, int nMouseYPos);
void getMousePos(int *pnMouseXPos, int *pnMouseYPos) const;
void setMouseButtonDown(int nMouseButtonDown);
int getMouseButtonDown() const;
void setFrontSelection(int nFrontSelection);
int getFrontSelection() const;
void setSecondarySelection(int nSecondarySelection);
int getSecondarySelection() const;
int getParamHandlePosition (int nHandleNum, double *pdwX, double *pdwY, double *pdwZ) const;
int setParamHandlePosition (int nHandleNum, double dwX, double dwY, double dwZ);
int getParamHandleValue (int nHandleNum, double *pdwValue) const;
double setParamHandleValue (int nHandleNum, double dwValue);
int Draw ( void ); // Draw the scene to the current GL window (m_pWindow)
virtual int DrawPreview ( void );
int CreateDrawing(); // Create a OpenGL Drawing to be drawn
//
// Private Definitions
//
private:
// data used to draw the control
#if XVTWS == WIN32WS
HDC m_pWindow; // the window in which the control is drawn (WIN32)
#else
WINDOW m_pWindow; // the window in which the control is drawn (MOTIF)
#endif
double m_dwRotateX, m_dwRotateY;
double m_dwOriginX, m_dwOriginY, m_dwOriginZ; // the center of the paramater editor
int m_nMouseXPos, m_nMouseYPos;
int m_nMouseButtonDown;
unsigned int m_unDisplayList;
int m_nFrontSelection, m_nSecondarySelection; // itentifier of the front selection item
int m_nNumHandles;
CParamHandle **m_pParamHandles;
int m_nDipDirHandleIndex, m_nDipHandleIndex, m_nPitchHandleIndex;
};
#endif