Merge of itasc branch. Project files, scons and cmake should be working. Makefile...
[blender.git] / source / gameengine / Ketsji / KX_GameObject.h
index 5928571..4c4eed9 100644 (file)
@@ -98,8 +98,6 @@ protected:
 
        KX_IPhysicsController*                          m_pPhysicsController1;
        PHY_IGraphicController*                         m_pGraphicController;
-       // used for ray casting
-       PHY_IPhysicsEnvironment*                        m_pPhysicsEnvironment;
        STR_String                                                      m_testPropName;
        bool                                                            m_xray;
        KX_GameObject*                                          m_pHitObject;
@@ -160,6 +158,15 @@ public:
                return &m_OpenGL_4x4Matrix;
        };
 
+       /**
+        * Update the blender object obmat field from the object world position
+        * if blendobj is NULL, update the object pointed by m_pBlenderObject
+        * The user must take action to restore the matrix before leaving the GE.
+        * Used in Armature evaluation
+        */
+               void
+       UpdateBlenderObjectMatrix(Object* blendobj=NULL);
+
        /** 
         * Get a pointer to the game object that is the parent of 
         * this object. Or NULL if there is no parent. The returned
@@ -189,8 +196,7 @@ public:
 
        KX_GameObject(
                void* sgReplicationInfo,
-               SG_Callbacks callbacks,
-               PyTypeObject* T=&Type
+               SG_Callbacks callbacks
        );
 
        virtual 
@@ -338,20 +344,6 @@ public:
                bool ang_vel_local
        );
 
-
-       /**
-        * @return a pointer to the physics environment in use during the game, for rayCasting
-        */
-       PHY_IPhysicsEnvironment* GetPhysicsEnvironment()
-       {
-               return m_pPhysicsEnvironment;
-       }
-
-       void SetPhysicsEnvironment(PHY_IPhysicsEnvironment* physicsEnvironment)
-       {
-               m_pPhysicsEnvironment = physicsEnvironment;
-       }
-
        /**
         * @return a pointer to the physics controller owned by this class.
         */
@@ -808,25 +800,11 @@ public:
        /**
         * @section Python interface functions.
         */
-       
-       virtual PyObject* py_getattro(PyObject *attr);
-       virtual PyObject* py_getattro_dict();
-       virtual int py_setattro(PyObject *attr, PyObject *value);               // py_setattro method
-       virtual int                             py_delattro(PyObject *attr);
        virtual PyObject* py_repr(void)
        {
-               return PyString_FromString(GetName().ReadPtr());
+               return PyUnicode_FromString(GetName().ReadPtr());
        }
-       
-       
-       /* quite annoying that we need these but the bloody 
-        * py_getattro_up and py_setattro_up macro's have a returns in them! */
-       PyObject* py_getattro__internal(PyObject *attr);
-       int py_setattro__internal(PyObject *attr, PyObject *value);             // py_setattro method
-       
-               
-       KX_PYMETHOD_NOARGS(KX_GameObject,GetPosition);
-       KX_PYMETHOD_O(KX_GameObject,SetPosition);
+
        KX_PYMETHOD_O(KX_GameObject,SetWorldPosition);
        KX_PYMETHOD_VARARGS(KX_GameObject, ApplyForce);
        KX_PYMETHOD_VARARGS(KX_GameObject, ApplyTorque);
@@ -837,10 +815,10 @@ public:
        KX_PYMETHOD_VARARGS(KX_GameObject,GetAngularVelocity);
        KX_PYMETHOD_VARARGS(KX_GameObject,SetAngularVelocity);
        KX_PYMETHOD_VARARGS(KX_GameObject,GetVelocity);
-       KX_PYMETHOD_NOARGS(KX_GameObject,GetMass);
+
        KX_PYMETHOD_NOARGS(KX_GameObject,GetReactionForce);
-       KX_PYMETHOD_NOARGS(KX_GameObject,GetOrientation);
-       KX_PYMETHOD_O(KX_GameObject,SetOrientation);
+
+
        KX_PYMETHOD_NOARGS(KX_GameObject,GetVisible);
        KX_PYMETHOD_VARARGS(KX_GameObject,SetVisible);
        KX_PYMETHOD_VARARGS(KX_GameObject,SetOcclusion);
@@ -857,22 +835,22 @@ public:
        KX_PYMETHOD_NOARGS(KX_GameObject,GetParent);
        KX_PYMETHOD_VARARGS(KX_GameObject,SetParent);
        KX_PYMETHOD_NOARGS(KX_GameObject,RemoveParent);
-       KX_PYMETHOD_NOARGS(KX_GameObject,GetChildren);  
+       KX_PYMETHOD_NOARGS(KX_GameObject,GetChildren);
        KX_PYMETHOD_NOARGS(KX_GameObject,GetChildrenRecursive);
        KX_PYMETHOD_VARARGS(KX_GameObject,GetMesh);
        KX_PYMETHOD_NOARGS(KX_GameObject,GetPhysicsId);
        KX_PYMETHOD_NOARGS(KX_GameObject,GetPropertyNames);
-       KX_PYMETHOD_O(KX_GameObject,ReplaceMesh);
+       KX_PYMETHOD_VARARGS(KX_GameObject,ReplaceMesh);
        KX_PYMETHOD_NOARGS(KX_GameObject,EndObject);
        KX_PYMETHOD_DOC(KX_GameObject,rayCastTo);
        KX_PYMETHOD_DOC(KX_GameObject,rayCast);
        KX_PYMETHOD_DOC_O(KX_GameObject,getDistanceTo);
        KX_PYMETHOD_DOC_O(KX_GameObject,getVectTo);
        KX_PYMETHOD_DOC_VARARGS(KX_GameObject, sendMessage);
+       KX_PYMETHOD_VARARGS(KX_GameObject, ReinstancePhysicsMesh);
        
        /* Dict access */
        KX_PYMETHOD_VARARGS(KX_GameObject,get);
-       KX_PYMETHOD_O(KX_GameObject,has_key);
        
        /* attributes */
        static PyObject*        pyattr_get_name(void* self_v, const KX_PYATTRIBUTE_DEF *attrdef);