(self)
| 193 | |
| 194 | |
| 195 | def push(self): |
| 196 | viewport = gl.glGetIntegerv(gl.GL_VIEWPORT) |
| 197 | gl.glMatrixMode(gl.GL_PROJECTION) |
| 198 | gl.glPushMatrix() |
| 199 | gl.glLoadIdentity () |
| 200 | aspect = viewport[2]/float(viewport[3]) |
| 201 | aperture = 35.0 |
| 202 | near = 0.1 |
| 203 | far = 100.0 |
| 204 | top = math.tan(aperture*3.14159/360.0) * near * self._zoom |
| 205 | bottom = -top |
| 206 | left = aspect * bottom |
| 207 | right = aspect * top |
| 208 | gl.glFrustum (left, right, bottom, top, near, far) |
| 209 | gl.glMatrixMode (gl.GL_MODELVIEW) |
| 210 | gl.glPushMatrix() |
| 211 | gl.glLoadIdentity () |
| 212 | # gl.glTranslate (0.0, 0, -self._distance) |
| 213 | gl.glTranslate (self._x, self._y, -self._distance) |
| 214 | gl.glMultMatrixf (self._matrix) |
| 215 | |
| 216 | def pop(void): |
| 217 | gl.glMatrixMode(gl.GL_MODELVIEW) |
no outgoing calls
no test coverage detected