|
Blender
V2.59
|
00001 /* 00002 * $Id: KX_GameObject.h 36523 2011-05-06 20:18:42Z blendix $ 00003 * 00004 * ***** BEGIN GPL LICENSE BLOCK ***** 00005 * 00006 * This program is free software; you can redistribute it and/or 00007 * modify it under the terms of the GNU General Public License 00008 * as published by the Free Software Foundation; either version 2 00009 * of the License, or (at your option) any later version. 00010 * 00011 * This program is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 * GNU General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU General Public License 00017 * along with this program; if not, write to the Free Software Foundation, 00018 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00019 * 00020 * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. 00021 * All rights reserved. 00022 * 00023 * The Original Code is: all of this file. 00024 * 00025 * Contributor(s): none yet. 00026 * 00027 * ***** END GPL LICENSE BLOCK ***** 00028 */ 00029 00035 #ifndef __KX_GAMEOBJECT 00036 #define __KX_GAMEOBJECT 00037 00038 #if defined(WIN32) && !defined(FREE_WINDOWS) 00039 // get rid of this stupid "warning 'this' used in initialiser list", generated by VC when including Solid/Sumo 00040 #pragma warning (disable : 4355) 00041 #endif 00042 00043 #include <stddef.h> 00044 00045 #include "ListValue.h" 00046 #include "SCA_IObject.h" 00047 #include "SG_Node.h" 00048 #include "MT_Transform.h" 00049 #include "MT_CmMatrix4x4.h" 00050 #include "CTR_Map.h" 00051 #include "CTR_HashedPtr.h" 00052 #include "KX_Scene.h" 00053 #include "KX_KetsjiEngine.h" /* for m_anim_framerate */ 00054 #include "KX_IPhysicsController.h" /* for suspend/resume */ 00055 #include "DNA_object_types.h" 00056 #include "SCA_LogicManager.h" /* for ConvertPythonToGameObject to search object names */ 00057 #define KX_OB_DYNAMIC 1 00058 00059 //Forward declarations. 00060 struct KX_ClientObjectInfo; 00061 class KX_RayCast; 00062 class RAS_MeshObject; 00063 class KX_IPhysicsController; 00064 class PHY_IGraphicController; 00065 class PHY_IPhysicsEnvironment; 00066 struct Object; 00067 00068 #ifdef WITH_PYTHON 00069 /* utility conversion function */ 00070 bool ConvertPythonToGameObject(PyObject * value, KX_GameObject **object, bool py_none_ok, const char *error_prefix); 00071 #endif 00072 00073 #ifdef USE_MATHUTILS 00074 void KX_GameObject_Mathutils_Callback_Init(void); 00075 #endif 00076 00080 class KX_GameObject : public SCA_IObject 00081 { 00082 Py_Header; 00083 protected: 00084 00085 bool m_bDyna; 00086 KX_ClientObjectInfo* m_pClient_info; 00087 STR_String m_name; 00088 STR_String m_text; 00089 int m_layer; 00090 std::vector<RAS_MeshObject*> m_meshes; 00091 SG_QList m_meshSlots; // head of mesh slots of this 00092 struct Object* m_pBlenderObject; 00093 struct Object* m_pBlenderGroupObject; 00094 00095 bool m_bSuspendDynamics; 00096 bool m_bUseObjectColor; 00097 bool m_bIsNegativeScaling; 00098 MT_Vector4 m_objectColor; 00099 00100 // visible = user setting 00101 // culled = while rendering, depending on camera 00102 bool m_bVisible; 00103 bool m_bCulled; 00104 bool m_bOccluder; 00105 00106 KX_IPhysicsController* m_pPhysicsController1; 00107 PHY_IGraphicController* m_pGraphicController; 00108 STR_String m_testPropName; 00109 bool m_xray; 00110 KX_GameObject* m_pHitObject; 00111 00112 SG_Node* m_pSGNode; 00113 00114 MT_CmMatrix4x4 m_OpenGL_4x4Matrix; 00115 00116 public: 00117 bool m_isDeformable; 00118 00122 static KX_GameObject* GetClientObject(KX_ClientObjectInfo* info); 00123 00124 #ifdef WITH_PYTHON 00125 // Python attributes that wont convert into CValue 00126 // 00127 // there are 2 places attributes can be stored, in the CValue, 00128 // where attributes are converted into BGE's CValue types 00129 // these can be used with property actuators 00130 // 00131 // For the python API, For types that cannot be converted into CValues (lists, dicts, GameObjects) 00132 // these will be put into "m_attr_dict", logic bricks cannot access them. 00133 // 00134 // rules for setting attributes. 00135 // 00136 // * there should NEVER be a CValue and a m_attr_dict attribute with matching names. get/sets make sure of this. 00137 // * if CValue conversion fails, use a PyObject in "m_attr_dict" 00138 // * when assigning a value, first see if it can be a CValue, if it can remove the "m_attr_dict" and set the CValue 00139 // 00140 PyObject* m_attr_dict; 00141 #endif 00142 00143 virtual void /* This function should be virtual - derived classed override it */ 00144 Relink( 00145 CTR_Map<CTR_HashedPtr, void*> *map 00146 ); 00147 00153 double* 00154 GetOpenGLMatrix( 00155 ); 00156 00164 MT_CmMatrix4x4* 00165 GetOpenGLMatrixPtr( 00166 ) { 00167 return &m_OpenGL_4x4Matrix; 00168 }; 00169 00176 void 00177 UpdateBlenderObjectMatrix(Object* blendobj=NULL); 00178 00187 KX_GameObject* 00188 GetParent( 00189 ); 00190 00194 void SetParent(KX_Scene *scene, KX_GameObject *obj, bool addToCompound=true, bool ghost=true); 00195 00199 void RemoveParent(KX_Scene *scene); 00200 00206 KX_GameObject( 00207 void* sgReplicationInfo, 00208 SG_Callbacks callbacks 00209 ); 00210 00211 virtual 00212 ~KX_GameObject( 00213 ); 00214 00224 CValue* 00225 Calc( 00226 VALUE_OPERATOR op, 00227 CValue *val 00228 ); 00229 00233 CValue* 00234 CalcFinal( 00235 VALUE_DATA_TYPE dtype, 00236 VALUE_OPERATOR op, 00237 CValue *val 00238 ); 00239 00243 const 00244 STR_String & 00245 GetText( 00246 ); 00247 00251 double 00252 GetNumber( 00253 ); 00254 00263 STR_String& 00264 GetName( 00265 ); 00266 00270 void 00271 SetName( 00272 const char *name 00273 ); 00274 00280 virtual CValue* 00281 GetReplica( 00282 ); 00283 00288 virtual void 00289 ProcessReplica(); 00290 00294 MT_Vector3 00295 GetLinearVelocity( 00296 bool local=false 00297 ); 00298 00303 MT_Vector3 00304 GetVelocity( 00305 const MT_Point3& position 00306 ); 00307 00311 MT_Scalar 00312 GetMass(); 00313 00317 MT_Vector3 00318 GetLocalInertia(); 00319 00323 MT_Vector3 00324 GetAngularVelocity( 00325 bool local=false 00326 ); 00327 00331 void 00332 AlignAxisToVect( 00333 const MT_Vector3& vect, 00334 int axis = 2, 00335 float fac = 1.0 00336 ); 00337 00342 void 00343 SetObjectColor( 00344 const MT_Vector4& rgbavec 00345 ); 00346 00347 const MT_Vector4& 00348 GetObjectColor(); 00349 00350 00351 void 00352 ResolveCombinedVelocities( 00353 const MT_Vector3 & lin_vel, 00354 const MT_Vector3 & ang_vel, 00355 bool lin_vel_local, 00356 bool ang_vel_local 00357 ); 00358 00363 KX_IPhysicsController* GetPhysicsController() ; 00364 00365 void SetPhysicsController(KX_IPhysicsController* physicscontroller,bool isDynamic) 00366 { 00367 m_bDyna = isDynamic; 00368 m_pPhysicsController1 = physicscontroller; 00369 } 00370 00371 virtual class RAS_Deformer* GetDeformer() 00372 { 00373 return 0; 00374 } 00375 virtual void SetDeformer(class RAS_Deformer* deformer) 00376 { 00377 00378 } 00379 00383 PHY_IGraphicController* GetGraphicController() 00384 { 00385 return m_pGraphicController; 00386 } 00387 00388 void SetGraphicController(PHY_IGraphicController* graphiccontroller) 00389 { 00390 m_pGraphicController = graphiccontroller; 00391 } 00392 /* 00393 * @add/remove the graphic controller to the physic system 00394 */ 00395 void ActivateGraphicController(bool recurse); 00396 00401 void NodeSetLocalPosition(const MT_Point3& trans ); 00402 00403 void NodeSetLocalOrientation(const MT_Matrix3x3& rot ); 00404 void NodeSetGlobalOrientation(const MT_Matrix3x3& rot ); 00405 00406 void NodeSetLocalScale( const MT_Vector3& scale ); 00407 00408 void NodeSetRelativeScale( const MT_Vector3& scale ); 00409 00410 // adapt local position so that world position is set to desired position 00411 void NodeSetWorldPosition(const MT_Point3& trans); 00412 00413 void 00414 NodeUpdateGS( 00415 double time 00416 ); 00417 00418 const MT_Matrix3x3& NodeGetWorldOrientation( ) const; 00419 const MT_Vector3& NodeGetWorldScaling( ) const; 00420 const MT_Point3& NodeGetWorldPosition( ) const; 00421 00422 const MT_Matrix3x3& NodeGetLocalOrientation( ) const; 00423 const MT_Vector3& NodeGetLocalScaling( ) const; 00424 const MT_Point3& NodeGetLocalPosition( ) const; 00425 00430 SG_Node* GetSGNode( ) 00431 { 00432 return m_pSGNode; 00433 } 00434 00435 const SG_Node* GetSGNode( ) const 00436 { 00437 return m_pSGNode; 00438 } 00439 00444 struct Object* GetBlenderObject( ) 00445 { 00446 return m_pBlenderObject; 00447 } 00448 00449 void SetBlenderObject( struct Object* obj) 00450 { 00451 m_pBlenderObject = obj; 00452 } 00453 00454 struct Object* GetBlenderGroupObject( ) 00455 { 00456 return m_pBlenderGroupObject; 00457 } 00458 00459 void SetBlenderGroupObject( struct Object* obj) 00460 { 00461 m_pBlenderGroupObject = obj; 00462 } 00463 00464 bool IsDupliGroup() 00465 { 00466 return (m_pBlenderObject && 00467 (m_pBlenderObject->transflag & OB_DUPLIGROUP) && 00468 m_pBlenderObject->dup_group != NULL) ? true : false; 00469 } 00470 00479 void SetSGNode(SG_Node* node ) 00480 { 00481 m_pSGNode = node; 00482 } 00483 00484 //Is it a dynamic/physics object ? 00485 bool IsDynamic() const 00486 { 00487 return m_bDyna; 00488 } 00489 00493 bool IsVertexParent( ) 00494 { 00495 return (m_pSGNode && m_pSGNode->GetSGParent() && m_pSGNode->GetSGParent()->IsVertexParent()); 00496 } 00497 00498 bool RayHit(KX_ClientObjectInfo* client, KX_RayCast* result, void * const data); 00499 bool NeedRayCast(KX_ClientObjectInfo* client); 00500 00501 00512 void 00513 ApplyForce( 00514 const MT_Vector3& force, bool local 00515 ); 00516 00517 void 00518 ApplyTorque( 00519 const MT_Vector3& torque, 00520 bool local 00521 ); 00522 00523 void 00524 ApplyRotation( 00525 const MT_Vector3& drot, 00526 bool local 00527 ); 00528 00529 void 00530 ApplyMovement( 00531 const MT_Vector3& dloc, 00532 bool local 00533 ); 00534 00535 void 00536 addLinearVelocity( 00537 const MT_Vector3& lin_vel, 00538 bool local 00539 ); 00540 00541 void 00542 setLinearVelocity( 00543 const MT_Vector3& lin_vel, 00544 bool local 00545 ); 00546 00547 void 00548 setAngularVelocity( 00549 const MT_Vector3& ang_vel, 00550 bool local 00551 ); 00552 00557 void 00558 UpdateTransform( 00559 ); 00560 00561 static void UpdateTransformFunc(SG_IObject* node, void* gameobj, void* scene); 00562 00566 void SynchronizeTransform(); 00567 00568 static void SynchronizeTransformFunc(SG_IObject* node, void* gameobj, void* scene); 00569 00573 void 00574 InitIPO( 00575 bool ipo_as_force, 00576 bool ipo_add, 00577 bool ipo_local 00578 ); 00579 00583 void 00584 UpdateIPO( 00585 float curframetime, 00586 bool recurse 00587 ); 00591 void 00592 UpdateMaterialData( 00593 dword matname_hash, 00594 MT_Vector4 rgba, 00595 MT_Vector3 specrgb, 00596 MT_Scalar hard, 00597 MT_Scalar spec, 00598 MT_Scalar ref, 00599 MT_Scalar emit, 00600 MT_Scalar alpha 00601 ); 00602 00611 void 00612 AddMeshUser( 00613 ); 00614 00620 void 00621 UpdateBuckets( 00622 bool recursive 00623 ); 00624 00630 void 00631 RemoveMeshes( 00632 ); 00633 00640 void 00641 AddMesh( 00642 RAS_MeshObject* mesh 00643 ){ 00644 m_meshes.push_back(mesh); 00645 } 00646 00650 RAS_MeshObject* 00651 GetMesh( 00652 int num 00653 ) const { 00654 return m_meshes[num]; 00655 } 00656 00661 int 00662 GetMeshCount( 00663 ) const { 00664 return m_meshes.size(); 00665 } 00666 00671 void 00672 SetDebugColor( 00673 unsigned int bgra 00674 ); 00675 00679 void 00680 ResetDebugColor( 00681 ); 00682 00687 bool 00688 GetVisible( 00689 void 00690 ); 00691 00695 void 00696 SetVisible( 00697 bool b, 00698 bool recursive 00699 ); 00700 00704 inline bool 00705 GetCulled( 00706 void 00707 ) { return m_bCulled; } 00708 00712 inline void 00713 SetCulled( 00714 bool c 00715 ) { m_bCulled = c; } 00716 00720 inline bool 00721 GetOccluder( 00722 void 00723 ) { return m_bOccluder; } 00724 00728 void 00729 SetOccluder( 00730 bool v, 00731 bool recursive 00732 ); 00733 00738 void 00739 SetLayer( 00740 int l 00741 ); 00742 00746 int 00747 GetLayer( 00748 void 00749 ); 00750 00754 bool 00755 IsNegativeScaling( 00756 void 00757 ) { return m_bIsNegativeScaling; } 00758 00766 void Suspend(void); 00767 00771 void Resume(void); 00772 00773 void SuspendDynamics(void) { 00774 if (m_bSuspendDynamics) 00775 { 00776 return; 00777 } 00778 00779 if (m_pPhysicsController1) 00780 { 00781 m_pPhysicsController1->SuspendDynamics(); 00782 } 00783 m_bSuspendDynamics = true; 00784 } 00785 00786 void RestoreDynamics(void) { 00787 if (!m_bSuspendDynamics) 00788 { 00789 return; 00790 } 00791 00792 if (m_pPhysicsController1) 00793 { 00794 m_pPhysicsController1->RestoreDynamics(); 00795 } 00796 m_bSuspendDynamics = false; 00797 } 00798 00799 KX_ClientObjectInfo* getClientInfo() { return m_pClient_info; } 00800 00801 CListValue* GetChildren(); 00802 CListValue* GetChildrenRecursive(); 00803 00804 #ifdef WITH_PYTHON 00805 00808 virtual PyObject* py_repr(void) 00809 { 00810 return PyUnicode_FromString(GetName().ReadPtr()); 00811 } 00812 00813 KX_PYMETHOD_O(KX_GameObject,SetWorldPosition); 00814 KX_PYMETHOD_VARARGS(KX_GameObject, ApplyForce); 00815 KX_PYMETHOD_VARARGS(KX_GameObject, ApplyTorque); 00816 KX_PYMETHOD_VARARGS(KX_GameObject, ApplyRotation); 00817 KX_PYMETHOD_VARARGS(KX_GameObject, ApplyMovement); 00818 KX_PYMETHOD_VARARGS(KX_GameObject,GetLinearVelocity); 00819 KX_PYMETHOD_VARARGS(KX_GameObject,SetLinearVelocity); 00820 KX_PYMETHOD_VARARGS(KX_GameObject,GetAngularVelocity); 00821 KX_PYMETHOD_VARARGS(KX_GameObject,SetAngularVelocity); 00822 KX_PYMETHOD_VARARGS(KX_GameObject,GetVelocity); 00823 00824 KX_PYMETHOD_NOARGS(KX_GameObject,GetReactionForce); 00825 00826 00827 KX_PYMETHOD_NOARGS(KX_GameObject,GetVisible); 00828 KX_PYMETHOD_VARARGS(KX_GameObject,SetVisible); 00829 KX_PYMETHOD_VARARGS(KX_GameObject,SetOcclusion); 00830 KX_PYMETHOD_NOARGS(KX_GameObject,GetState); 00831 KX_PYMETHOD_O(KX_GameObject,SetState); 00832 KX_PYMETHOD_VARARGS(KX_GameObject,AlignAxisToVect); 00833 KX_PYMETHOD_O(KX_GameObject,GetAxisVect); 00834 KX_PYMETHOD_NOARGS(KX_GameObject,SuspendDynamics); 00835 KX_PYMETHOD_NOARGS(KX_GameObject,RestoreDynamics); 00836 KX_PYMETHOD_NOARGS(KX_GameObject,EnableRigidBody); 00837 KX_PYMETHOD_NOARGS(KX_GameObject,DisableRigidBody); 00838 KX_PYMETHOD_VARARGS(KX_GameObject,ApplyImpulse); 00839 KX_PYMETHOD_O(KX_GameObject,SetCollisionMargin); 00840 KX_PYMETHOD_NOARGS(KX_GameObject,GetParent); 00841 KX_PYMETHOD_VARARGS(KX_GameObject,SetParent); 00842 KX_PYMETHOD_NOARGS(KX_GameObject,RemoveParent); 00843 KX_PYMETHOD_NOARGS(KX_GameObject,GetChildren); 00844 KX_PYMETHOD_NOARGS(KX_GameObject,GetChildrenRecursive); 00845 KX_PYMETHOD_VARARGS(KX_GameObject,GetMesh); 00846 KX_PYMETHOD_NOARGS(KX_GameObject,GetPhysicsId); 00847 KX_PYMETHOD_NOARGS(KX_GameObject,GetPropertyNames); 00848 KX_PYMETHOD_VARARGS(KX_GameObject,ReplaceMesh); 00849 KX_PYMETHOD_NOARGS(KX_GameObject,EndObject); 00850 KX_PYMETHOD_DOC(KX_GameObject,rayCastTo); 00851 KX_PYMETHOD_DOC(KX_GameObject,rayCast); 00852 KX_PYMETHOD_DOC_O(KX_GameObject,getDistanceTo); 00853 KX_PYMETHOD_DOC_O(KX_GameObject,getVectTo); 00854 KX_PYMETHOD_DOC_VARARGS(KX_GameObject, sendMessage); 00855 KX_PYMETHOD_VARARGS(KX_GameObject, ReinstancePhysicsMesh); 00856 00857 /* Dict access */ 00858 KX_PYMETHOD_VARARGS(KX_GameObject,get); 00859 00860 /* attributes */ 00861 static PyObject* pyattr_get_name(void* self_v, const KX_PYATTRIBUTE_DEF *attrdef); 00862 static PyObject* pyattr_get_parent(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef); 00863 00864 static PyObject* pyattr_get_life(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef); 00865 static PyObject* pyattr_get_mass(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef); 00866 static int pyattr_set_mass(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value); 00867 static PyObject* pyattr_get_lin_vel_min(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef); 00868 static int pyattr_set_lin_vel_min(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value); 00869 static PyObject* pyattr_get_lin_vel_max(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef); 00870 static int pyattr_set_lin_vel_max(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value); 00871 static PyObject* pyattr_get_visible(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef); 00872 static int pyattr_set_visible(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value); 00873 static PyObject* pyattr_get_worldPosition(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef); 00874 static int pyattr_set_worldPosition(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value); 00875 static PyObject* pyattr_get_localPosition(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef); 00876 static int pyattr_set_localPosition(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value); 00877 static PyObject* pyattr_get_localInertia(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef); 00878 static int pyattr_set_localInertia(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value); 00879 static PyObject* pyattr_get_worldOrientation(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef); 00880 static int pyattr_set_worldOrientation(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value); 00881 static PyObject* pyattr_get_localOrientation(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef); 00882 static int pyattr_set_localOrientation(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value); 00883 static PyObject* pyattr_get_worldScaling(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef); 00884 static PyObject* pyattr_get_localScaling(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef); 00885 static int pyattr_set_localScaling(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value); 00886 static PyObject* pyattr_get_worldLinearVelocity(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef); 00887 static int pyattr_set_worldLinearVelocity(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value); 00888 static PyObject* pyattr_get_localLinearVelocity(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef); 00889 static int pyattr_set_localLinearVelocity(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value); 00890 static PyObject* pyattr_get_worldAngularVelocity(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef); 00891 static int pyattr_set_worldAngularVelocity(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value); 00892 static PyObject* pyattr_get_localAngularVelocity(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef); 00893 static int pyattr_set_localAngularVelocity(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value); 00894 static PyObject* pyattr_get_timeOffset(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef); 00895 static int pyattr_set_timeOffset(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value); 00896 static PyObject* pyattr_get_state(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef); 00897 static int pyattr_set_state(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value); 00898 static PyObject* pyattr_get_meshes(void* self_v, const KX_PYATTRIBUTE_DEF *attrdef); 00899 static PyObject* pyattr_get_children(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef); 00900 static PyObject* pyattr_get_children_recursive(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef); 00901 static PyObject* pyattr_get_attrDict(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef); 00902 static PyObject* pyattr_get_obcolor(void *selv_v, const KX_PYATTRIBUTE_DEF *attrdef); 00903 static int pyattr_set_obcolor(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value); 00904 00905 /* Experemental! */ 00906 static PyObject* pyattr_get_sensors(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef); 00907 static PyObject* pyattr_get_controllers(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef); 00908 static PyObject* pyattr_get_actuators(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef); 00909 00910 /* getitem/setitem */ 00911 static PyMappingMethods Mapping; 00912 static PySequenceMethods Sequence; 00913 #endif 00914 }; 00915 00916 00917 00918 #endif //__KX_GAMEOBJECT 00919