12 |
virtual void vertex(const ZPt &p) const { |
virtual void vertex(const ZPt &p) const { |
13 |
glVertex3f(p.x, p.y, p.z); |
glVertex3f(p.x, p.y, p.z); |
14 |
} |
} |
15 |
|
virtual bool canPerformGL() { return true; } |
16 |
|
virtual bool performGL() { |
17 |
|
return true; |
18 |
|
} |
19 |
}; |
}; |
20 |
|
|
21 |
/** Affine coordinate system (in xy), offset in z. |
/** Affine coordinate system (in xy), offset in z. |
42 |
tr(p, mp); |
tr(p, mp); |
43 |
super->vertex(mp); |
super->vertex(mp); |
44 |
} |
} |
45 |
virtual bool canPerformGL() { return true; } |
virtual bool canPerformGL() { return super->canPerformGL(); } |
46 |
virtual bool performGL() { |
virtual bool performGL() { |
47 |
|
if(!super->performGL()) return false; |
48 |
GLfloat matrix[16] = { |
GLfloat matrix[16] = { |
49 |
params[3], params[5], 0, 0, |
params[3], params[5], 0, 0, |
50 |
params[4], params[6], 0, 0, |
params[4], params[6], 0, 0, |
66 |
enum { NParams = 1 }; |
enum { NParams = 1 }; |
67 |
virtual void setParams(float *params) { |
virtual void setParams(float *params) { |
68 |
CoordSys::setParams(params); |
CoordSys::setParams(params); |
69 |
s = sin(params[0]); |
s = sin(params[0] * M_PI / 180); |
70 |
c = cos(params[0]); |
c = cos(params[0] * M_PI / 180); |
71 |
} |
} |
72 |
/** Perform the internal transformation of this |
/** Perform the internal transformation of this |
73 |
* coordsys. |
* coordsys. |
87 |
tr(p, mp); |
tr(p, mp); |
88 |
super->vertex(mp); |
super->vertex(mp); |
89 |
} |
} |
90 |
|
virtual bool canPerformGL() { return super->canPerformGL(); } |
91 |
|
virtual bool performGL() { |
92 |
|
if(!super->performGL()) return false; |
93 |
|
glRotatef(params[0], 0, 0, 1); |
94 |
|
return true; |
95 |
|
} |
96 |
}; |
}; |
97 |
|
|
98 |
; |
; |