📄 skyplanedemo.py
字号:
import localogre as ogre
import sampleframework
class SkyPlaneApplication(sampleframework.Application):
def _createScene( self ):
sceneManager = self.sceneManager
camera = self.camera
sceneManager.setAmbientLight( ogre.ColourValue(0.5, 0.5, 0.5) )
plane = ogre.Plane()
plane.normal = -ogre.Vector3.UNIT_Y
plane.d = 5000
sceneManager.setSkyPlane( True, plane, 'Examples/SpaceSkyPlane', 10000, 3 )
light = sceneManager.createLight( 'MainLight' )
light.setPosition( 20,80,50 )
entity = sceneManager.createEntity( 'dragon', 'dragon.mesh' )
sceneManager.getRootSceneNode().attachObject(entity)
if __name__ == '__main__':
application = SkyPlaneApplication()
application.go()
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -