-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathglobject.h
75 lines (66 loc) · 2.4 KB
/
globject.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
// ============================================================================
// Copyright Jean-Charles LAMBERT - 2007-2023
// e-mail: [email protected]
// address: Centre de donneeS Astrophysique de Marseille (CeSAM)
// Laboratoire d'Astrophysique de Marseille
// Pôle de l'Etoile, site de Château-Gombert
// 38, rue Frédéric Joliot-Curie
// 13388 Marseille cedex 13 France
// CNRS U.M.R 7326
// ============================================================================
// See the complete license in LICENSE and/or "http://www.cecill.info".
// ============================================================================
/**
@author Jean-Charles Lambert <[email protected]>
*/
#ifndef GLNEMOGLOBJECT_H
#define GLNEMOGLOBJECT_H
#include <QGLWidget>
#include <QObject>
namespace glnemo {
class GLObject : public QObject {
Q_OBJECT
public:
GLObject();
~GLObject();
GLObject(const GLObject& m):QObject() {
is_activated = m.is_activated;
mycolor = m.mycolor;
width = m.width;
height = m.height;
dplist_index = m.dplist_index;
particles_alpha = m.particles_alpha;
};
const GLObject & operator=(const GLObject & m) {
is_activated = m.is_activated;
mycolor = m.mycolor;
width = m.width;
height = m.height;
dplist_index = m.dplist_index;
particles_alpha = m.particles_alpha;
return *this;
}
// method
void display(int my_list=-1);
void setColor(const QColor&);
void toggleActivate();
bool getActivate() { return is_activated; }
void setActivate(bool status) { is_activated = status ;}
void setWH(int new_w, int new_h) { width=new_w; height=new_h; }
// protected slots:
void updateAlphaSlot(const int);
protected:
bool is_activated; //
QColor mycolor;
GLuint dplist_index;
int width,height; // Display width and height
int particles_alpha;
float ratio, fx,fy;
// method
void buildDisplayList();
// projections
void setProjection(const int x, const int y, const int w, const int h, const bool perspective=true );
void computeOrthoFactor();
};
}
#endif