本文整理汇总了Python中fos.Window.set_current_camera方法的典型用法代码示例。如果您正苦于以下问题:Python Window.set_current_camera方法的具体用法?Python Window.set_current_camera怎么用?Python Window.set_current_camera使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类fos.Window
的用法示例。
在下文中一共展示了Window.set_current_camera方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Window
# 需要导入模块: from fos import Window [as 别名]
# 或者: from fos.Window import set_current_camera [as 别名]
""" Create an empty Fos world and attach a window to it """
from fos import World, Window, DefaultCamera, WindowManager
# create the first window
wi = Window(caption = "My Window 1", bgcolor = (1,1,1,1) )
# return the default empty world of this window
w = World()
# add a new camera to this world
cam2 = DefaultCamera()
w.add(cam2)
# create the second window
wi2 = Window(caption = "My Window 2", bgcolor = (0,0,0,1) )
# we want to look at the same world as window 1, thus drop
# the default world and attach the window to our world with the second camera
wi2.attach(w)
# set the camera for the second window to the second camera
wi2.set_current_camera(cam2)
# Create the window manager, add the windows, and go!
wm = WindowManager()
wm.add(wi)
wm.add(wi2)
wm.run()