本文整理汇总了Python中Camera.Camera.setTransZ方法的典型用法代码示例。如果您正苦于以下问题:Python Camera.setTransZ方法的具体用法?Python Camera.setTransZ怎么用?Python Camera.setTransZ使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Camera.Camera
的用法示例。
在下文中一共展示了Camera.setTransZ方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: GLRenderArea
# 需要导入模块: from Camera import Camera [as 别名]
# 或者: from Camera.Camera import setTransZ [as 别名]
#.........这里部分代码省略.........
height = max(self.mouseRect[0].y(), self.mouseRect[1].y()) - top
rect = QtCore.QRect(left, top, width, height)
painter.drawRect(rect)
painter.end()
def updateCamera(self):
if self.autoCam:
camPos = (self.syncTimer.viconData.getValue(
self.currentFrame, 'Cam:' + self.camName + ':O:Y'),
self.syncTimer.viconData.getValue(
self.currentFrame, 'Cam:' + self.camName + ':O:Z'),
self.syncTimer.viconData.getValue(
self.currentFrame, 'Cam:' + self.camName + ':O:X'))
camTarget = (self.syncTimer.viconData.getValue(
self.currentFrame, 'Cam:' + self.camName + ':X:Y'),
self.syncTimer.viconData.getValue(
self.currentFrame,
'Cam:' + self.camName + ':X:Z'),
self.syncTimer.viconData.getValue(
self.currentFrame,
'Cam:' + self.camName + ':X:X'))
self.camera.setCamPos((camPos[0] / self.syncTimer.viconData.max3D,
camPos[1] / self.syncTimer.viconData.max3D,
camPos[2] / self.syncTimer.viconData.max3D))
self.camera.setTargetPos(
(camTarget[0] / self.syncTimer.viconData.max3D,
camTarget[1] / self.syncTimer.viconData.max3D,
camTarget[2] / self.syncTimer.viconData.max3D))
self.camera.setRotY(0)
self.camera.setRotZ(0)
self.camera.setTransX(0)
self.camera.setTransY(0)
self.camera.setTransZ(0)
self.xRot = 0.0
self.yRot = 0.0
self.zRot = 0.0
self.xTrans = 0.0
self.yTrans = 0.0
self.zTrans = 0.0
self.camera.setOrtho(False)
else:
self.camera.setCamPos((0, -1, 0))
self.camera.setTargetPos((0, 0, 0))
self.camera.setRotY(self.yRot / 16)
self.camera.setRotZ(self.zRot / 16)
self.camera.setTransX(self.xTrans * 0.01)
self.camera.setTransY(self.yTrans * 0.01)
self.camera.setTransZ(self.zTrans * 0.01)
self.camera.setOrtho(self.ortho)
self.camera.setFovH(self.screen.parameterDialog.getHorizontalFOV())
self.camera.setFovV(self.screen.parameterDialog.getVerticalFOV())
def drawCoords(self):
GL.glDisable(GL.GL_DEPTH_TEST)
spacing = 1
max = 5
if self.screen.data.acq:
spacing = self.screen.parameterDialog.getGridSpacing(
) / self.screen.data.maxDataValue
max = spacing * self.screen.parameterDialog.getGridLineCount()