Blender V2.61 - r43446

KX_GameObject.h

Go to the documentation of this file.
00001 /*
00002  * ***** BEGIN GPL LICENSE BLOCK *****
00003  *
00004  * This program is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU General Public License
00006  * as published by the Free Software Foundation; either version 2
00007  * of the License, or (at your option) any later version.
00008  *
00009  * This program is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  * GNU General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU General Public License
00015  * along with this program; if not, write to the Free Software Foundation,
00016  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00017  *
00018  * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
00019  * All rights reserved.
00020  *
00021  * The Original Code is: all of this file.
00022  *
00023  * Contributor(s): none yet.
00024  *
00025  * ***** END GPL LICENSE BLOCK *****
00026  */
00027 
00033 #ifndef __KX_GAMEOBJECT
00034 #define __KX_GAMEOBJECT
00035 
00036 #if defined(WIN32) && !defined(FREE_WINDOWS)
00037 // get rid of this stupid "warning 'this' used in initialiser list", generated by VC when including Solid/Sumo
00038 #pragma warning (disable : 4355) 
00039 #endif 
00040 
00041 #include <stddef.h>
00042 
00043 #include "ListValue.h"
00044 #include "SCA_IObject.h"
00045 #include "SG_Node.h"
00046 #include "MT_Transform.h"
00047 #include "MT_CmMatrix4x4.h"
00048 #include "CTR_Map.h"
00049 #include "CTR_HashedPtr.h"
00050 #include "KX_Scene.h"
00051 #include "KX_KetsjiEngine.h" /* for m_anim_framerate */
00052 #include "KX_IPhysicsController.h" /* for suspend/resume */
00053 #include "DNA_object_types.h"
00054 #include "SCA_LogicManager.h" /* for ConvertPythonToGameObject to search object names */
00055 #define KX_OB_DYNAMIC 1
00056 
00057 //Forward declarations.
00058 struct KX_ClientObjectInfo;
00059 class KX_RayCast;
00060 class RAS_MeshObject;
00061 class KX_IPhysicsController;
00062 class PHY_IGraphicController;
00063 class PHY_IPhysicsEnvironment;
00064 class BL_ActionManager;
00065 struct Object;
00066 class KX_ObstacleSimulation;
00067 struct bAction;
00068 
00069 #ifdef WITH_PYTHON
00070 /* utility conversion function */
00071 bool ConvertPythonToGameObject(PyObject * value, KX_GameObject **object, bool py_none_ok, const char *error_prefix);
00072 #endif
00073 
00074 #ifdef USE_MATHUTILS
00075 void KX_GameObject_Mathutils_Callback_Init(void);
00076 #endif
00077 
00081 class KX_GameObject : public SCA_IObject
00082 {
00083     Py_Header
00084 protected:
00085 
00086     bool                                m_bDyna;
00087     KX_ClientObjectInfo*                m_pClient_info;
00088     STR_String                          m_name;
00089     STR_String                          m_text;
00090     int                                 m_layer;
00091     std::vector<RAS_MeshObject*>        m_meshes;
00092     SG_QList                            m_meshSlots;    // head of mesh slots of this 
00093     struct Object*                      m_pBlenderObject;
00094     struct Object*                      m_pBlenderGroupObject;
00095     
00096     bool                                m_bSuspendDynamics;
00097     bool                                m_bUseObjectColor;
00098     bool                                m_bIsNegativeScaling;
00099     MT_Vector4                          m_objectColor;
00100 
00101     // visible = user setting
00102     // culled = while rendering, depending on camera
00103     bool                                m_bVisible; 
00104     bool                                m_bCulled; 
00105     bool                                m_bOccluder;
00106 
00107     KX_IPhysicsController*              m_pPhysicsController1;
00108     PHY_IGraphicController*             m_pGraphicController;
00109     STR_String                          m_testPropName;
00110     bool                                m_xray;
00111     KX_GameObject*                      m_pHitObject;
00112 
00113     SG_Node*                            m_pSGNode;
00114 
00115     MT_CmMatrix4x4                      m_OpenGL_4x4Matrix;
00116 
00117     KX_ObstacleSimulation*              m_pObstacleSimulation;
00118 
00119 
00120     // The action manager is used to play/stop/update actions
00121     BL_ActionManager*               m_actionManager;
00122 
00123     BL_ActionManager* GetActionManager();
00124     
00125 public:
00126     bool                                m_isDeformable;
00127 
00131     static KX_GameObject* GetClientObject(KX_ClientObjectInfo* info);
00132 
00133 #ifdef WITH_PYTHON
00134     // Python attributes that wont convert into CValue
00135     // 
00136     // there are 2 places attributes can be stored, in the CValue,
00137     // where attributes are converted into BGE's CValue types
00138     // these can be used with property actuators
00139     //
00140     // For the python API, For types that cannot be converted into CValues (lists, dicts, GameObjects)
00141     // these will be put into "m_attr_dict", logic bricks cannot access them.
00142     // 
00143     // rules for setting attributes.
00144     // 
00145     // * there should NEVER be a CValue and a m_attr_dict attribute with matching names. get/sets make sure of this.
00146     // * if CValue conversion fails, use a PyObject in "m_attr_dict"
00147     // * when assigning a value, first see if it can be a CValue, if it can remove the "m_attr_dict" and set the CValue
00148     // 
00149     PyObject*                           m_attr_dict; 
00150 #endif
00151 
00152     virtual void    /* This function should be virtual - derived classed override it */
00153     Relink(
00154         CTR_Map<CTR_HashedPtr, void*> *map
00155     );
00156 
00162         double*                     
00163     GetOpenGLMatrix(
00164     );
00165 
00173         MT_CmMatrix4x4*             
00174     GetOpenGLMatrixPtr(
00175     ) { 
00176         return &m_OpenGL_4x4Matrix;
00177     };
00178 
00185         void
00186     UpdateBlenderObjectMatrix(Object* blendobj=NULL);
00187 
00196         KX_GameObject*              
00197     GetParent(
00198     );
00199 
00203     void SetParent(KX_Scene *scene, KX_GameObject *obj, bool addToCompound=true, bool ghost=true);
00204 
00208     void RemoveParent(KX_Scene *scene);
00209 
00210     /*********************************
00211      * Animation API
00212      *********************************/
00213 
00217     bool PlayAction(const char* name,
00218                     float start,
00219                     float end,
00220                     short layer=0,
00221                     short priority=0,
00222                     float blendin=0.f,
00223                     short play_mode=0,
00224                     float layer_weight=0.f,
00225                     short ipo_flags=0,
00226                     float playback_speed=1.f);
00227 
00231     float GetActionFrame(short layer);
00232 
00236     void SetActionFrame(short layer, float frame);
00237 
00241     bAction *GetCurrentAction(short layer);
00242 
00246     void SetPlayMode(short layer, short mode);
00247 
00251     void SetTimes(short layer, float start, float end);
00252 
00256     void StopAction(short layer);
00257 
00261     bool IsActionDone(short layer);
00262 
00266     void UpdateActionManager(float curtime);
00267 
00268     /*********************************
00269      * End Animation API
00270      *********************************/
00271 
00277     KX_GameObject(
00278         void* sgReplicationInfo,
00279         SG_Callbacks callbacks
00280     );
00281 
00282     virtual 
00283     ~KX_GameObject(
00284     );
00285 
00295         CValue*             
00296     Calc(
00297         VALUE_OPERATOR op,
00298         CValue *val
00299     );
00300 
00304         CValue*             
00305     CalcFinal(
00306         VALUE_DATA_TYPE dtype,
00307         VALUE_OPERATOR op,
00308         CValue *val
00309     );
00310 
00314     const 
00315         STR_String &    
00316     GetText(
00317     );
00318 
00322         double
00323     GetNumber(
00324     );
00325 
00334         STR_String&         
00335     GetName(
00336     );
00337 
00341         void                
00342     SetName(
00343         const char *name
00344     );
00345 
00351     virtual CValue*             
00352     GetReplica(
00353     );
00354     
00359     virtual void                
00360     ProcessReplica();
00361 
00365         MT_Vector3 
00366     GetLinearVelocity(
00367         bool local=false
00368     );
00369 
00374         MT_Vector3 
00375     GetVelocity(
00376         const MT_Point3& position
00377     );
00378 
00382         MT_Scalar   
00383     GetMass();
00384 
00388         MT_Vector3
00389     GetLocalInertia();
00390 
00394         MT_Vector3 
00395     GetAngularVelocity(
00396         bool local=false
00397     );
00398 
00402         void 
00403     AlignAxisToVect(
00404         const MT_Vector3& vect,
00405         int axis = 2,
00406         float fac = 1.0
00407     );
00408 
00413         void                
00414     SetObjectColor(
00415         const MT_Vector4& rgbavec
00416     );
00417 
00418         const MT_Vector4&
00419     GetObjectColor();
00420 
00421 
00422         void 
00423     ResolveCombinedVelocities(
00424         const MT_Vector3 & lin_vel,
00425         const MT_Vector3 & ang_vel,
00426         bool lin_vel_local,
00427         bool ang_vel_local
00428     );
00429 
00434     KX_IPhysicsController* GetPhysicsController() ;
00435 
00436     void    SetPhysicsController(KX_IPhysicsController* physicscontroller,bool isDynamic) 
00437     { 
00438         m_bDyna = isDynamic;
00439         m_pPhysicsController1 = physicscontroller;
00440     }
00441 
00442     virtual class RAS_Deformer* GetDeformer()
00443     {
00444         return 0;
00445     }
00446     virtual void    SetDeformer(class RAS_Deformer* deformer)
00447     {
00448 
00449     }
00450 
00454     PHY_IGraphicController* GetGraphicController()
00455     {
00456         return m_pGraphicController;
00457     }
00458 
00459     void SetGraphicController(PHY_IGraphicController* graphiccontroller) 
00460     { 
00461         m_pGraphicController = graphiccontroller;
00462     }
00463     /*
00464      * @add/remove the graphic controller to the physic system
00465      */
00466     void ActivateGraphicController(bool recurse);
00467 
00472     void    NodeSetLocalPosition(const MT_Point3& trans );
00473 
00474     void    NodeSetLocalOrientation(const MT_Matrix3x3& rot );
00475     void    NodeSetGlobalOrientation(const MT_Matrix3x3& rot    );
00476 
00477     void    NodeSetLocalScale(  const MT_Vector3& scale );
00478 
00479     void    NodeSetRelativeScale(   const MT_Vector3& scale );
00480 
00481     // adapt local position so that world position is set to desired position
00482     void    NodeSetWorldPosition(const MT_Point3& trans);
00483 
00484         void                        
00485     NodeUpdateGS(
00486         double time
00487     );
00488 
00489     const MT_Matrix3x3& NodeGetWorldOrientation(  ) const;
00490     const MT_Vector3& NodeGetWorldScaling(  ) const;
00491     const MT_Point3& NodeGetWorldPosition(  ) const;
00492 
00493     const MT_Matrix3x3& NodeGetLocalOrientation(  ) const;
00494     const MT_Vector3& NodeGetLocalScaling(  ) const;
00495     const MT_Point3& NodeGetLocalPosition(  ) const;
00496 
00501     SG_Node*    GetSGNode(  ) 
00502     { 
00503         return m_pSGNode;
00504     }
00505 
00506     const   SG_Node* GetSGNode( ) const 
00507     { 
00508         return m_pSGNode;
00509     }
00510 
00515     struct Object* GetBlenderObject( )
00516     {
00517         return m_pBlenderObject;
00518     }
00519 
00520     void SetBlenderObject( struct Object* obj)
00521     {
00522         m_pBlenderObject = obj;
00523     }
00524 
00525     struct Object* GetBlenderGroupObject( )
00526     {
00527         return m_pBlenderGroupObject;
00528     }
00529 
00530     void SetBlenderGroupObject( struct Object* obj)
00531     {
00532         m_pBlenderGroupObject = obj;
00533     }
00534     
00535     bool IsDupliGroup()
00536     { 
00537         return (m_pBlenderObject &&
00538                 (m_pBlenderObject->transflag & OB_DUPLIGROUP) &&
00539                 m_pBlenderObject->dup_group != NULL) ? true : false;
00540     }
00541 
00550         void    SetSGNode(SG_Node* node )
00551         { 
00552             m_pSGNode = node; 
00553         }
00554     
00555     //Is it a dynamic/physics object ?
00556     bool    IsDynamic() const 
00557     { 
00558         return m_bDyna; 
00559     }
00560 
00564     bool IsVertexParent( )
00565     {
00566         return (m_pSGNode && m_pSGNode->GetSGParent() && m_pSGNode->GetSGParent()->IsVertexParent());
00567     }
00568 
00569     bool RayHit(KX_ClientObjectInfo* client, KX_RayCast* result, void * const data);
00570     bool NeedRayCast(KX_ClientObjectInfo* client);
00571 
00572 
00583         void                        
00584     ApplyForce(
00585         const MT_Vector3& force,    bool local
00586     );
00587 
00588         void                        
00589     ApplyTorque(
00590         const MT_Vector3& torque,
00591         bool local
00592     );
00593 
00594         void                        
00595     ApplyRotation(
00596         const MT_Vector3& drot,
00597         bool local
00598     );
00599 
00600         void                        
00601     ApplyMovement(
00602         const MT_Vector3& dloc,
00603         bool local
00604     );
00605 
00606         void                        
00607     addLinearVelocity(
00608         const MT_Vector3& lin_vel,
00609         bool local
00610     );
00611 
00612         void                        
00613     setLinearVelocity(
00614         const MT_Vector3& lin_vel,
00615         bool local
00616     );
00617 
00618         void                        
00619     setAngularVelocity(
00620         const MT_Vector3& ang_vel,
00621         bool local
00622     );
00623 
00628         void
00629     UpdateTransform(
00630     );
00631 
00632     static void UpdateTransformFunc(SG_IObject* node, void* gameobj, void* scene);
00633 
00637     void SynchronizeTransform();
00638 
00639     static void SynchronizeTransformFunc(SG_IObject* node, void* gameobj, void* scene);
00640 
00644         void    
00645     InitIPO(
00646         bool ipo_as_force,
00647         bool ipo_add,
00648         bool ipo_local
00649     );
00650 
00654         void    
00655     UpdateIPO(
00656         float curframetime,
00657         bool recurse
00658     );
00662         void 
00663     UpdateMaterialData(
00664         dword matname_hash,
00665         MT_Vector4 rgba,
00666         MT_Vector3 specrgb,
00667         MT_Scalar hard,
00668         MT_Scalar spec,
00669         MT_Scalar ref,
00670         MT_Scalar emit,
00671         MT_Scalar alpha
00672     );
00673 
00682         void                        
00683     AddMeshUser(
00684     );
00685     
00691         void                        
00692     UpdateBuckets(
00693         bool recursive
00694     );
00695 
00701         void                        
00702     RemoveMeshes(
00703     );
00704 
00711         void                        
00712     AddMesh(
00713         RAS_MeshObject* mesh
00714     ){ 
00715         m_meshes.push_back(mesh);
00716     }
00717 
00721         RAS_MeshObject*             
00722     GetMesh(
00723         int num
00724     ) const { 
00725         return m_meshes[num]; 
00726     }
00727 
00732         int                         
00733     GetMeshCount(
00734     ) const { 
00735         return m_meshes.size(); 
00736     }
00737     
00742         void                        
00743     SetDebugColor(
00744         unsigned int bgra
00745     );
00746 
00750         void                        
00751     ResetDebugColor(
00752     );
00753 
00758         bool
00759     GetVisible(
00760         void
00761     );
00762 
00766         void
00767     SetVisible(
00768         bool b,
00769         bool recursive
00770     );
00771 
00775     inline bool
00776     GetCulled(
00777         void
00778     ) { return m_bCulled; }
00779 
00783     inline void
00784     SetCulled(
00785         bool c
00786     ) { m_bCulled = c; }
00787     
00791     inline bool
00792     GetOccluder(
00793         void
00794     ) { return m_bOccluder; }
00795 
00799     void
00800     SetOccluder(
00801         bool v,
00802         bool recursive
00803     );
00804     
00809         void
00810     SetLayer(
00811         int l
00812     );
00813 
00817         int
00818     GetLayer(
00819         void
00820     );
00821         
00825         bool
00826     IsNegativeScaling(
00827         void
00828     ) { return m_bIsNegativeScaling; }
00829 
00837     void Suspend(void);
00838 
00842     void Resume(void);
00843     
00844     void SuspendDynamics(void) {
00845         if (m_bSuspendDynamics)
00846         {
00847             return;
00848         }
00849     
00850         if (m_pPhysicsController1)
00851         {
00852             m_pPhysicsController1->SuspendDynamics();
00853         }
00854         m_bSuspendDynamics = true;
00855     }
00856     
00857     void RestoreDynamics(void) {    
00858         if (!m_bSuspendDynamics)
00859         {
00860             return;
00861         }
00862     
00863         if (m_pPhysicsController1)
00864         {
00865             m_pPhysicsController1->RestoreDynamics();
00866         }
00867         m_bSuspendDynamics = false;
00868     }
00869 
00870     void RegisterObstacle(KX_ObstacleSimulation* obstacleSimulation)
00871     {
00872         m_pObstacleSimulation = obstacleSimulation;
00873     }
00874 
00875     void UnregisterObstacle()
00876     {
00877         m_pObstacleSimulation = NULL;
00878     }
00879     
00880     KX_ClientObjectInfo* getClientInfo() { return m_pClient_info; }
00881     
00882     CListValue* GetChildren();
00883     CListValue* GetChildrenRecursive();
00884 
00885 #ifdef WITH_PYTHON
00886 
00889     virtual PyObject* py_repr(void)
00890     {
00891         return PyUnicode_From_STR_String(GetName());
00892     }
00893 
00894     KX_PYMETHOD_O(KX_GameObject,SetWorldPosition);
00895     KX_PYMETHOD_VARARGS(KX_GameObject, ApplyForce);
00896     KX_PYMETHOD_VARARGS(KX_GameObject, ApplyTorque);
00897     KX_PYMETHOD_VARARGS(KX_GameObject, ApplyRotation);
00898     KX_PYMETHOD_VARARGS(KX_GameObject, ApplyMovement);
00899     KX_PYMETHOD_VARARGS(KX_GameObject,GetLinearVelocity);
00900     KX_PYMETHOD_VARARGS(KX_GameObject,SetLinearVelocity);
00901     KX_PYMETHOD_VARARGS(KX_GameObject,GetAngularVelocity);
00902     KX_PYMETHOD_VARARGS(KX_GameObject,SetAngularVelocity);
00903     KX_PYMETHOD_VARARGS(KX_GameObject,GetVelocity);
00904 
00905     KX_PYMETHOD_NOARGS(KX_GameObject,GetReactionForce);
00906 
00907 
00908     KX_PYMETHOD_NOARGS(KX_GameObject,GetVisible);
00909     KX_PYMETHOD_VARARGS(KX_GameObject,SetVisible);
00910     KX_PYMETHOD_VARARGS(KX_GameObject,SetOcclusion);
00911     KX_PYMETHOD_NOARGS(KX_GameObject,GetState);
00912     KX_PYMETHOD_O(KX_GameObject,SetState);
00913     KX_PYMETHOD_VARARGS(KX_GameObject,AlignAxisToVect);
00914     KX_PYMETHOD_O(KX_GameObject,GetAxisVect);
00915     KX_PYMETHOD_NOARGS(KX_GameObject,SuspendDynamics);
00916     KX_PYMETHOD_NOARGS(KX_GameObject,RestoreDynamics);
00917     KX_PYMETHOD_NOARGS(KX_GameObject,EnableRigidBody);
00918     KX_PYMETHOD_NOARGS(KX_GameObject,DisableRigidBody);
00919     KX_PYMETHOD_VARARGS(KX_GameObject,ApplyImpulse);
00920     KX_PYMETHOD_O(KX_GameObject,SetCollisionMargin);
00921     KX_PYMETHOD_NOARGS(KX_GameObject,GetParent);
00922     KX_PYMETHOD_VARARGS(KX_GameObject,SetParent);
00923     KX_PYMETHOD_NOARGS(KX_GameObject,RemoveParent);
00924     KX_PYMETHOD_NOARGS(KX_GameObject,GetChildren);
00925     KX_PYMETHOD_NOARGS(KX_GameObject,GetChildrenRecursive);
00926     KX_PYMETHOD_VARARGS(KX_GameObject,GetMesh);
00927     KX_PYMETHOD_NOARGS(KX_GameObject,GetPhysicsId);
00928     KX_PYMETHOD_NOARGS(KX_GameObject,GetPropertyNames);
00929     KX_PYMETHOD_VARARGS(KX_GameObject,ReplaceMesh);
00930     KX_PYMETHOD_NOARGS(KX_GameObject,EndObject);
00931     KX_PYMETHOD_DOC(KX_GameObject,rayCastTo);
00932     KX_PYMETHOD_DOC(KX_GameObject,rayCast);
00933     KX_PYMETHOD_DOC_O(KX_GameObject,getDistanceTo);
00934     KX_PYMETHOD_DOC_O(KX_GameObject,getVectTo);
00935     KX_PYMETHOD_DOC_VARARGS(KX_GameObject, sendMessage);
00936     KX_PYMETHOD_VARARGS(KX_GameObject, ReinstancePhysicsMesh);
00937 
00938     KX_PYMETHOD_DOC(KX_GameObject, playAction);
00939     KX_PYMETHOD_DOC(KX_GameObject, stopAction);
00940     KX_PYMETHOD_DOC(KX_GameObject, getActionFrame);
00941     KX_PYMETHOD_DOC(KX_GameObject, setActionFrame);
00942     KX_PYMETHOD_DOC(KX_GameObject, isPlayingAction);
00943     
00944     /* Dict access */
00945     KX_PYMETHOD_VARARGS(KX_GameObject,get);
00946     
00947     /* attributes */
00948     static PyObject*    pyattr_get_name(void* self_v, const KX_PYATTRIBUTE_DEF *attrdef);
00949     static PyObject*    pyattr_get_parent(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
00950 
00951     static PyObject*    pyattr_get_life(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
00952     static PyObject*    pyattr_get_mass(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
00953     static int          pyattr_set_mass(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
00954     static PyObject*    pyattr_get_lin_vel_min(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
00955     static int          pyattr_set_lin_vel_min(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
00956     static PyObject*    pyattr_get_lin_vel_max(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
00957     static int          pyattr_set_lin_vel_max(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
00958     static PyObject*    pyattr_get_visible(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
00959     static int          pyattr_set_visible(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
00960     static PyObject*    pyattr_get_worldPosition(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
00961     static int          pyattr_set_worldPosition(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
00962     static PyObject*    pyattr_get_localPosition(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
00963     static int          pyattr_set_localPosition(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
00964     static PyObject*    pyattr_get_localInertia(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
00965     static int          pyattr_set_localInertia(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
00966     static PyObject*    pyattr_get_worldOrientation(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
00967     static int          pyattr_set_worldOrientation(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
00968     static PyObject*    pyattr_get_localOrientation(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
00969     static int          pyattr_set_localOrientation(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
00970     static PyObject*    pyattr_get_worldScaling(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
00971     static PyObject*    pyattr_get_localScaling(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
00972     static int          pyattr_set_localScaling(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
00973     static PyObject*    pyattr_get_worldLinearVelocity(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
00974     static int          pyattr_set_worldLinearVelocity(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
00975     static PyObject*    pyattr_get_localLinearVelocity(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
00976     static int          pyattr_set_localLinearVelocity(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
00977     static PyObject*    pyattr_get_worldAngularVelocity(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
00978     static int          pyattr_set_worldAngularVelocity(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
00979     static PyObject*    pyattr_get_localAngularVelocity(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
00980     static int          pyattr_set_localAngularVelocity(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);  
00981     static PyObject*    pyattr_get_timeOffset(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
00982     static int          pyattr_set_timeOffset(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
00983     static PyObject*    pyattr_get_state(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
00984     static int          pyattr_set_state(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
00985     static PyObject*    pyattr_get_meshes(void* self_v, const KX_PYATTRIBUTE_DEF *attrdef);
00986     static PyObject*    pyattr_get_children(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
00987     static PyObject*    pyattr_get_children_recursive(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
00988     static PyObject*    pyattr_get_attrDict(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
00989     static PyObject*    pyattr_get_obcolor(void *selv_v, const KX_PYATTRIBUTE_DEF *attrdef);
00990     static int          pyattr_set_obcolor(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
00991     
00992     /* Experemental! */
00993     static PyObject*    pyattr_get_sensors(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
00994     static PyObject*    pyattr_get_controllers(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
00995     static PyObject*    pyattr_get_actuators(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
00996     
00997     /* getitem/setitem */
00998     static PyMappingMethods Mapping;
00999     static PySequenceMethods    Sequence;
01000 #endif
01001 };
01002 
01003 
01004 
01005 #endif //__KX_GAMEOBJECT
01006