本文整理汇总了Python中Camera.Camera.view方法的典型用法代码示例。如果您正苦于以下问题:Python Camera.view方法的具体用法?Python Camera.view怎么用?Python Camera.view使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Camera.Camera
的用法示例。
在下文中一共展示了Camera.view方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Renderer
# 需要导入模块: from Camera import Camera [as 别名]
# 或者: from Camera.Camera import view [as 别名]
class Renderer(Object):
activeRenderer = None
def __initP__(self, **kwArgs):
super().__initP__(**kwArgs)
self._sceneGraph = SceneGraph()
self._camera = Camera(getDictValue(kwArgs, None, ['ws', 'winSize', 'windowSize'], True), t=Transform())
self._camera.focus()
''''''''''''''''''''''''''''''''''''''''''''''''
def render(self):
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT)
self._camera.focus()
self._camera.view()
self._sceneGraph.draw()
''''''''''''''''''''''''''''''''''''''''''''''''
@classmethod
def getRenderer(cls):
return cls.activeRenderer
def setSceneGraph(self, sg):
self._sceneGraph = sg
def getSceneGraph(self):
return self._sceneGraph
def setCamera(self, c):
self._camera = c
def getCamera(self):
return self._camera