Source

pygamekit / scene.pxd

Full commit

from gameobject cimport *
cimport gkmath

cdef extern from "OgreSceneManager.h":
    cdef cppclass Ogre_SceneManager "Ogre::SceneManager":
        void setShadowTextureSelfShadow(bool)
        void setShadowCasterRenderBackFaces(bool)
        void setShadowTextureSize(int)
        void setShadowFarDistance(Real)
        
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:
        
        gkCamera*     getMainCamera()
        bool          hasDefaultCamera()
        bool          hasCameras()
        #gkCameraSet&  getCameras(void)
        void setMainCamera(gkCamera*)
        
        void update(Real tickRate)
        void beginFrame()
        void setHorizonColor(gkColor&)
        void setAmbientColor(gkColor&)
        void setGravity(gkmath.Vector3)
        gkmath.Vector3& 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(const_std_string& name)
        gkGameObjectHashMap getObjects()
        
        Ogre_SceneManager* getManager()
        
        #gkDynamicsWorld* getDynamicsWorld()

        int getUpdateFlags()
        void setUpdateFlags(int)
        
        void setOverlaysEnabled "getViewport()->getViewport().setOverlaysEnabled"(bool)
        
#cdef extern from "gkDynamicsWorld.h":
    #cppclass gkDynamicsWorld:
        #btDynamicsWorld* getBulletWorld()
        
    #cppclass btDynamicsWorld:
        #pass