def __init__(self): Node.__init__(self) self._lights = [] self.cameraX = self.cameraY = 0.0 self.cameraZ = 6.0 self.pitch = self.yaw = self.roll = 0.0 glMatrixMode(GL_PROJECTION) glLoadIdentity() d = getDisplay() gluPerspective(45.0, float(d.w)/float(d.h), 0.1, 1000.0) self._projMatrix = glGetDoublev(GL_PROJECTION_MATRIX) glLoadMatrixd(getDisplay()._projMatrix) glMatrixMode(GL_MODELVIEW)
def untranslate(self): glPopAttrib() glShadeModel(GL_SMOOTH) glMatrixMode(GL_PROJECTION) glLoadMatrixd(getDisplay()._projMatrix) glMatrixMode(GL_MODELVIEW) glPopMatrix()