Ejemplo n.º 1
0
 def useTracker(self):
     """
     camera.useTracker() -> void
     Offsets the camera (should be called after use()) based
     on the current position of the tracker.
     """
     if self.trackPosOffset:
         # Calculate the offset relative to the camera - rather than relative to the world.
         x = mult3D(self.yz, self.trackPosOffset[X_AXIS])
         y = mult3D(self.up, self.trackPosOffset[Y_AXIS])
         z = mult3D(self.vpn, self.trackPosOffset[Z_AXIS])
         offset = add3D(x, y)
         offset = add3D(offset, z)
         GL.glTranslatef(*offset)
     if self.trackRotMatrix:
         GL.glMultMatrix(*self.trackRotMatrix)