Source

pygamekit / scene.pxd


from gameobject cimport *
from camera cimport *
from gkmath cimport *

cdef extern from "OgreSceneManager.h":
    cdef cppclass Ogre_SceneManager "Ogre::SceneManager":
        void setShadowTextureSelfShadow(bool)
        void setShadowCasterRenderBackFaces(bool)
        void setShadowTextureSize(int)
        void setShadowFarDistance(gkScalar)
        
cdef extern from "gkWindow.h":
    cppclass gkWindow:
        Ogre_RenderWindow* getRenderWindow()
    
cdef extern from "OgreRenderWindow.h":
    cppclass Ogre_RenderWindow "Ogre::RenderWindow"
    
cdef enum UPDATE_FLAGS:
    UF_NONE                 = 0
    UF_PHYSICS              = 1 << 0
    UF_LOGIC_BRICKS = 1 << 1
    UF_NODE_TREES   = 1 << 2
    UF_ANIMATIONS   = 1 << 3
    UF_SOUNDS               = 1 << 4
    UF_DBVT                 = 1 << 5
    UF_DEBUG                = 1 << 6
    UF_ALL                  = 0xFFFFFFFF
                
cdef extern from "gkScene.h":
    
    cdef cppclass gkScene:
        
        gkString&   getName()
        gkString&   getGroupName()

        gkCamera*     getMainCamera()
        bool          hasDefaultCamera()
        bool          hasCameras()
        #gkCameraSet&  getCameras(void)
        void setMainCamera(gkCamera*)
        
        void update(gkScalar tickRate)
        void beginFrame()
        void setHorizonColor(gkColor&)
        void setAmbientColor(gkColor&)
        void setGravity(gkVector3)
        gkVector3& getGravity()
        
        void createInstance()
        
        void addObject(gkGameObject* obj)
        void removeObject(gkGameObject* obj)
        void destroyObject(gkGameObject* obj)
        
        gkGameObject* cloneObject(gkGameObject* obj, int lifeSpan, bool instantiate)
        
        gkGameObject* getObject(gkString& name)
        gkGameObjectHashMap getObjects()
        
        Ogre_SceneManager* getManager()
        
        #gkDynamicsWorld* getDynamicsWorld()

        int getUpdateFlags()
        void setUpdateFlags(int)
        
        void setOverlaysEnabled "getViewport()->getViewport().setOverlaysEnabled"(bool)
        
        gkWindow* getDisplayWindow()
        
cdef extern from "gkSceneManager.h":
    
    cppclass gkSceneManager "gkSceneManager::getSingleton":
        gkSceneManager()
        gkScene* createEmptyScene(gkString& sceneName, gkString& cameraName=*, gkString& group=*)
        gkScene* copyObjects(gkScene* fromScene, gkScene* toScene, int exceptObjectTypes)
    

#cdef extern from "gkDynamicsWorld.h":
    #cppclass gkDynamicsWorld:
        #btDynamicsWorld* getBulletWorld()
        
    #cppclass btDynamicsWorld:
        #pass