コード例 #1
0
    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]
コード例 #2
0
ファイル: quaternion.py プロジェクト: philetus/geosolver
 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]
コード例 #3
0
ファイル: camera.py プロジェクト: philetus/geosolver
    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)
コード例 #4
0
ファイル: camera.py プロジェクト: Dave4675/geosolver-2
    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)