本文整理汇总了Python中Camera.Camera.setFovH方法的典型用法代码示例。如果您正苦于以下问题:Python Camera.setFovH方法的具体用法?Python Camera.setFovH怎么用?Python Camera.setFovH使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Camera.Camera
的用法示例。
在下文中一共展示了Camera.setFovH方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: GLRenderArea
# 需要导入模块: from Camera import Camera [as 别名]
# 或者: from Camera.Camera import setFovH [as 别名]
#.........这里部分代码省略.........
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()
if self.screen.parameterDialog.getGridVisibility(
) and self.screen.parameterDialog.getGridWidth(
) > 0 and self.screen.parameterDialog.getGridLineCount() > 0:
vertexBuffer = []
vertexBuffer.append((-max, 0, 0))
vertexBuffer.append((max, 0, 0))
vertexBuffer.append((0, -max, 0))
vertexBuffer.append((0, max, 0))
for i in numpy.arange(spacing, max + spacing * 0.5, spacing):
vertexBuffer.append((-max, i, 0))
vertexBuffer.append((max, i, 0))
vertexBuffer.append((-max, -i, 0))
vertexBuffer.append((max, -i, 0))
vertexBuffer.append((i, -max, 0))
vertexBuffer.append((i, max, 0))
vertexBuffer.append((-i, -max, 0))
vertexBuffer.append((-i, max, 0))
colorBuffer = numpy.empty(len(vertexBuffer) * 4)
colorBuffer.fill(0.6)