def getRotationMatrix(self, matrix): mat = Numeric.identity(4) self.getMatrix(mat) for i in range(4): for j in range(4): matrix[i][j] = mat[j][i]
def __init__(self, glViewport, camType): self.cameraType = camType self.setScreenWidthAndHeight(800,600) self.farPlane = 2000.0 self.nearPlane = 0.01 self.zFarCoef = math.sqrt(3.0) self.zNearCoef = 0.005 self.position = Vec([0.0, 0.0, 0.0]) self.orientation = Quaternion() self.sceneCenter = Vec([0.0, 0.0, 0.0]) self.target = self.sceneCenter self.upVec = Vec([0.0, 1.0, 0.0]) self.sceneRadius = 1.0 self.aspectRatio = 0.0 self.cameraIsEdited = False self.fieldOfView = 45.0 self.orthoCoef = math.tan(self.fieldOfView/2.0) self.sceneRadius = 300.0 self.revolveAroundPoint = Vec([0.0, 0.0, 0.0]) self.glViewport = glViewport self.modelViewMatrix = Numeric.identity(4)
def __init__(self, glViewport, camType): self.cameraType = camType self.setScreenWidthAndHeight(800, 600) self.farPlane = 2000.0 self.nearPlane = 0.01 self.zFarCoef = math.sqrt(3.0) self.zNearCoef = 0.005 self.position = Vec([0.0, 0.0, 0.0]) self.orientation = Quaternion() self.sceneCenter = Vec([0.0, 0.0, 0.0]) self.target = self.sceneCenter self.upVec = Vec([0.0, 1.0, 0.0]) self.sceneRadius = 1.0 self.aspectRatio = 0.0 self.cameraIsEdited = False self.fieldOfView = 45.0 self.orthoCoef = math.tan(self.fieldOfView / 2.0) self.sceneRadius = 300.0 self.revolveAroundPoint = Vec([0.0, 0.0, 0.0]) self.glViewport = glViewport self.modelViewMatrix = Numeric.identity(4)