⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 envmapdemo.py

📁 赫赫大名的 OGRE 游戏引擎
💻 PY
字号:
import localogre as ogre
import sampleframework

class EnvMapApplication(sampleframework.Application):
    def _createScene( self ):
        sceneManager = self.sceneManager
        camera = self.camera
        
        sceneManager.setAmbientLight( ogre.ColourValue(0.5, 0.5, 0.5) )

        light = sceneManager.createLight( 'MainLight' )
        light.setPosition( 20,80,50 )

        entity = sceneManager.createEntity( 'head', 'ogrehead.mesh' )
        entity.setMaterialName( 'Examples/EnvMappedRustySteel' )

        sceneManager.getRootSceneNode().createChildSceneNode( ogre.Vector3.ZERO,
                                                              ogre.Quaternion.IDENTITY ).attachObject(entity)

if __name__ == '__main__':
    application = EnvMapApplication()
    application.go()
    

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -