smokedemo.py

来自「使用stl技术,(还没看,是听说的)」· Python 代码 · 共 25 行

PY
25
字号
import localogre as ogre
import sampleframework

class SmokeApplication(sampleframework.Application):
    def _createScene( self ):
        sceneManager = self.sceneManager
        camera = self.camera
        
        sceneManager.setAmbientLight( ogre.ColourValue(0.5, 0.5, 0.5) )
        sceneManager.setSkyDome( True, 'Examples/CloudySky', 5.0, 8.0 )

        self.fountainNode = sceneManager.getRootSceneNode().createChildSceneNode( ogre.Vector3.ZERO,
                                                                                  ogre.Quaternion.IDENTITY )

        particleSystemManager = ogre.ParticleSystemManager.getSingleton()
        particuleSystem2 = particleSystemManager.createSystem( 'fountain1',
                                                               'Examples/Smoke' )
        node = self.fountainNode.createChildSceneNode( ogre.Vector3.ZERO, ogre.Quaternion.IDENTITY )
        node.attachObject( particuleSystem2 )

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

⌨️ 快捷键说明

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