當前位置: 首頁>>代碼示例>>Python>>正文


Python Window.set_current_camera方法代碼示例

本文整理匯總了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()
開發者ID:arokem,項目名稱:Fos,代碼行數:31,代碼來源:world.py


注:本文中的fos.Window.set_current_camera方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。