2 * ***** BEGIN GPL LICENSE BLOCK *****
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software Foundation,
16 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
19 * All rights reserved.
21 * The Original Code is: all of this file.
23 * Contributor(s): none yet.
25 * ***** END GPL LICENSE BLOCK *****
28 /** \file KX_GameObject.h
30 * \brief General KX game object.
33 #ifndef __KX_GAMEOBJECT_H__
34 #define __KX_GAMEOBJECT_H__
37 /* get rid of this stupid "warning 'this' used in initialiser list", generated by VC when including Solid/Sumo */
38 # pragma warning (disable:4355)
43 #include "ListValue.h"
44 #include "SCA_IObject.h"
46 #include "MT_Transform.h"
47 #include "MT_CmMatrix4x4.h"
49 #include "CTR_HashedPtr.h"
51 #include "KX_KetsjiEngine.h" /* for m_anim_framerate */
52 #include "DNA_constraint_types.h" /* for constraint replication */
53 #include "DNA_object_types.h"
54 #include "SCA_LogicManager.h" /* for ConvertPythonToGameObject to search object names */
56 //Forward declarations.
57 struct KX_ClientObjectInfo;
60 class PHY_IGraphicController;
61 class PHY_IPhysicsEnvironment;
62 class PHY_IPhysicsController;
63 class BL_ActionManager;
65 class KX_ObstacleSimulation;
69 /* utility conversion function */
70 bool ConvertPythonToGameObject(PyObject *value, KX_GameObject **object, bool py_none_ok, const char *error_prefix);
74 void KX_GameObject_Mathutils_Callback_Init(void);
78 * KX_GameObject is the main class for dynamic objects.
80 class KX_GameObject : public SCA_IObject
86 KX_ClientObjectInfo* m_pClient_info;
90 std::vector<RAS_MeshObject*> m_meshes;
91 std::vector<RAS_MeshObject*> m_lodmeshes;
92 int m_currentLodLevel;
93 short m_previousLodLevel;
94 SG_QList m_meshSlots; // head of mesh slots of this
95 struct Object* m_pBlenderObject;
96 struct Object* m_pBlenderGroupObject;
98 bool m_bSuspendDynamics;
99 bool m_bUseObjectColor;
100 bool m_bIsNegativeScaling;
101 MT_Vector4 m_objectColor;
103 // Bit fields for user control over physics collisions
104 short m_userCollisionGroup;
105 short m_userCollisionMask;
107 // visible = user setting
108 // culled = while rendering, depending on camera
113 PHY_IPhysicsController* m_pPhysicsController;
114 PHY_IGraphicController* m_pGraphicController;
115 STR_String m_testPropName;
117 KX_GameObject* m_pHitObject;
121 MT_CmMatrix4x4 m_OpenGL_4x4Matrix;
122 std::vector<bRigidBodyJointConstraint*> m_constraints;
124 KX_ObstacleSimulation* m_pObstacleSimulation;
126 CListValue* m_pInstanceObjects;
127 KX_GameObject* m_pDupliGroupObject;
129 // The action manager is used to play/stop/update actions
130 BL_ActionManager* m_actionManager;
132 BL_ActionManager* GetActionManager();
134 bool m_bRecordAnimation;
139 * Helper function for modules that can't include KX_ClientObjectInfo.h
141 static KX_GameObject* GetClientObject(KX_ClientObjectInfo* info);
144 // Python attributes that wont convert into CValue
146 // there are 2 places attributes can be stored, in the CValue,
147 // where attributes are converted into BGE's CValue types
148 // these can be used with property actuators
150 // For the python API, For types that cannot be converted into CValues (lists, dicts, GameObjects)
151 // these will be put into "m_attr_dict", logic bricks cannot access them.
153 // rules for setting attributes.
155 // * there should NEVER be a CValue and a m_attr_dict attribute with matching names. get/sets make sure of this.
156 // * if CValue conversion fails, use a PyObject in "m_attr_dict"
157 // * when assigning a value, first see if it can be a CValue, if it can remove the "m_attr_dict" and set the CValue
159 PyObject* m_attr_dict;
160 PyObject* m_collisionCallbacks;
163 virtual void /* This function should be virtual - derived classed override it */
165 CTR_Map<CTR_HashedPtr, void*> *map
169 * Compute an OpenGl compatible 4x4 matrix. Has the
170 * side effect of storing the result internally. The
171 * memory for the matrix remains the property of this class.
178 * Return a pointer to a MT_CmMatrix4x4 storing the
179 * opengl transformation for this object. This is updated
180 * by a call to GetOpenGLMatrix(). This class owns the
181 * memory for the returned matrix.
187 return &m_OpenGL_4x4Matrix;
191 * Update the blender object obmat field from the object world position
192 * if blendobj is NULL, update the object pointed by m_pBlenderObject
193 * The user must take action to restore the matrix before leaving the GE.
194 * Used in Armature evaluation
197 UpdateBlenderObjectMatrix(Object* blendobj=NULL);
200 * Used for constraint replication for group instances.
201 * The list of constraints is filled during data conversion.
203 void AddConstraint(bRigidBodyJointConstraint *cons);
204 std::vector<bRigidBodyJointConstraint*> GetConstraints();
205 void ClearConstraints();
208 * Get a pointer to the game object that is the parent of
209 * this object. Or NULL if there is no parent. The returned
210 * object is part of a reference counting scheme. Calling
211 * this function ups the reference count on the returned
212 * object. It is the responsibility of the caller to decrement
213 * the reference count when you have finished with it.
220 * Sets the parent of this object to a game object
222 void SetParent(KX_Scene *scene, KX_GameObject *obj, bool addToCompound=true, bool ghost=true);
225 * Removes the parent of this object to a game object
227 void RemoveParent(KX_Scene *scene);
229 /*********************************
230 * group reference API
231 *********************************/
242 SetDupliGroupObject(KX_GameObject*
246 AddInstanceObjects(KX_GameObject*
250 RemoveDupliGroupObject(
254 RemoveInstanceObject(KX_GameObject*
256 /*********************************
258 *********************************/
261 * Adds an action to the object's action manager
263 bool PlayAction(const char* name,
270 float layer_weight=0.f,
272 float playback_speed=1.f,
276 * Gets the current frame of an action
278 float GetActionFrame(short layer);
281 * Sets the current frame of an action
283 void SetActionFrame(short layer, float frame);
286 * Gets the currently running action on the given layer
288 bAction *GetCurrentAction(short layer);
291 * Sets play mode of the action on the given layer
293 void SetPlayMode(short layer, short mode);
296 * Sets the start and end times of the action on the given layer
298 void SetTimes(short layer, float start, float end);
301 * Stop playing the action on the given layer
303 void StopAction(short layer);
306 * Check if an action has finished playing
308 bool IsActionDone(short layer);
311 * Kick the object's action manager
313 void UpdateActionManager(float curtime);
316 * Have the action manager update IPOs
317 * note: not thread-safe!
319 void UpdateActionIPOs();
321 /*********************************
323 *********************************/
326 * Construct a game object. This class also inherits the
327 * default constructors - use those with care!
331 void* sgReplicationInfo,
332 SG_Callbacks callbacks
340 * \section Stuff which is here due to poor design.
341 * Inherited from CValue and needs an implementation.
342 * Do not expect these functions do to anything sensible.
346 * Inherited from CValue -- does nothing!
355 * Inherited from CValue -- does nothing!
359 VALUE_DATA_TYPE dtype,
365 * Inherited from CValue -- does nothing!
373 * Inherited from CValue -- does nothing!
380 * \section Inherited from CValue. These are the useful
381 * part of the CValue interface that this class implements.
385 * Inherited from CValue -- returns the name of this object.
392 * Inherited from CValue -- set the name of this object.
400 * Inherited from CValue -- return a new copy of this
401 * instance allocated on the heap. Ownership of the new
402 * object belongs with the caller.
409 * Inherited from CValue -- Makes sure any internal
410 * data owned by this class is deep copied. Called internally
416 * Return the linear velocity of the game object.
424 * Return the linear velocity of a given point in world coordinate
425 * but relative to center of object ([0,0,0]=center of object)
429 const MT_Point3& position
433 * Return the mass of the object
439 * Return the local inertia vector of the object
445 * Return the angular velocity of the game object.
453 * Align the object to a given normal.
457 const MT_Vector3& vect,
463 * Quick'n'dirty obcolor ipo stuff
468 const MT_Vector4& rgbavec
476 ResolveCombinedVelocities(
477 const MT_Vector3 & lin_vel,
478 const MT_Vector3 & ang_vel,
484 * \return a pointer to the physics controller owned by this class.
487 PHY_IPhysicsController* GetPhysicsController();
489 void SetPhysicsController(PHY_IPhysicsController* physicscontroller,bool isDynamic)
492 m_pPhysicsController = physicscontroller;
495 virtual class RAS_Deformer* GetDeformer()
499 virtual void SetDeformer(class RAS_Deformer* deformer)
505 * \return a pointer to the graphic controller owner by this class
507 PHY_IGraphicController* GetGraphicController()
509 return m_pGraphicController;
512 void SetGraphicController(PHY_IGraphicController* graphiccontroller)
514 m_pGraphicController = graphiccontroller;
517 * @add/remove the graphic controller to the physic system
519 void ActivateGraphicController(bool recurse);
521 void SetUserCollisionGroup(short filter);
522 void SetUserCollisionMask(short mask);
524 * Extra broadphase check for user controllable collisions
526 bool CheckCollision(KX_GameObject *other);
529 * \section Coordinate system manipulation functions
532 void NodeSetLocalPosition(const MT_Point3& trans );
534 void NodeSetLocalOrientation(const MT_Matrix3x3& rot );
535 void NodeSetGlobalOrientation(const MT_Matrix3x3& rot );
537 void NodeSetLocalScale( const MT_Vector3& scale );
538 void NodeSetWorldScale( const MT_Vector3& scale );
540 void NodeSetRelativeScale( const MT_Vector3& scale );
542 // adapt local position so that world position is set to desired position
543 void NodeSetWorldPosition(const MT_Point3& trans);
550 const MT_Matrix3x3& NodeGetWorldOrientation( ) const;
551 const MT_Vector3& NodeGetWorldScaling( ) const;
552 const MT_Point3& NodeGetWorldPosition( ) const;
554 const MT_Matrix3x3& NodeGetLocalOrientation( ) const;
555 const MT_Vector3& NodeGetLocalScaling( ) const;
556 const MT_Point3& NodeGetLocalPosition( ) const;
559 * \section scene graph node accessor functions.
562 SG_Node* GetSGNode( )
567 const SG_Node* GetSGNode( ) const
573 * \section blender object accessor functions.
576 struct Object* GetBlenderObject( )
578 return m_pBlenderObject;
581 void SetBlenderObject(struct Object* obj)
583 m_pBlenderObject = obj;
586 struct Object* GetBlenderGroupObject( )
588 return m_pBlenderGroupObject;
591 void SetBlenderGroupObject(struct Object* obj)
593 m_pBlenderGroupObject = obj;
598 return (m_pBlenderObject &&
599 (m_pBlenderObject->transflag & OB_DUPLIGROUP) &&
600 m_pBlenderObject->dup_group != NULL) ? true : false;
604 * Set the Scene graph node for this game object.
605 * warning - it is your responsibility to make sure
606 * all controllers look at this new node. You must
607 * also take care of the memory associated with the
608 * old node. This class takes ownership of the new
611 void SetSGNode(SG_Node* node )
616 //Is it a dynamic/physics object ?
617 bool IsDynamic() const
623 * Should we record animation for this object?
626 void SetRecordAnimation(bool recordAnimation)
628 m_bRecordAnimation = recordAnimation;
631 bool IsRecordAnimation() const
633 return m_bRecordAnimation;
637 * Check if this object has a vertex parent relationship
639 bool IsVertexParent( )
641 return (m_pSGNode && m_pSGNode->GetSGParent() && m_pSGNode->GetSGParent()->IsVertexParent());
644 bool RayHit(KX_ClientObjectInfo* client, KX_RayCast* result, void * const data);
645 bool NeedRayCast(KX_ClientObjectInfo* client);
649 * \section Physics accessors for this node.
651 * All these calls get passed directly to the physics controller
652 * owned by this object.
653 * This is real interface bloat. Why not just use the physics controller
654 * directly? I think this is because the python interface is in the wrong
660 const MT_Vector3& force, bool local
665 const MT_Vector3& torque,
671 const MT_Vector3& drot,
677 const MT_Vector3& dloc,
683 const MT_Vector3& lin_vel,
689 const MT_Vector3& lin_vel,
695 const MT_Vector3& ang_vel,
699 virtual float getLinearDamping() const;
700 virtual float getAngularDamping() const;
701 virtual void setLinearDamping(float damping);
702 virtual void setAngularDamping(float damping);
703 virtual void setDamping(float linear, float angular);
706 * Update the physics object transform based upon the current SG_Node
713 static void UpdateTransformFunc(SG_IObject* node, void* gameobj, void* scene);
716 * only used for sensor objects
718 void SynchronizeTransform();
720 static void SynchronizeTransformFunc(SG_IObject* node, void* gameobj, void* scene);
723 * Function to set IPO option at start of IPO
733 * Odd function to update an ipo. ???
741 * Updates Material Ipo data
756 * \section Mesh accessor functions.
760 * Update buckets to indicate that there is a new
761 * user of this object's meshes.
768 * Update buckets with data about the mesh after
769 * creating or duplicating the object, changing
770 * visibility, object color, .. .
778 * Clear the meshes associated with this class
779 * and remove from the bucketing system.
780 * Don't think this actually deletes any of the meshes.
787 * Add a mesh to the set of meshes associated with this
788 * node. Meshes added in this way are not deleted by this class.
789 * Make sure you call RemoveMeshes() before deleting the
796 m_meshes.push_back(mesh);
800 * Add a level of detail mesh to the object. These should
809 * Updates the current lod level based on distance from camera.
817 * Pick out a mesh associated with the integer 'num'.
823 return m_meshes[num];
827 * Return the number of meshes currently associated with this
833 return m_meshes.size();
837 * Set the debug color of the meshes associated with this
838 * class. Does this still work?
846 * Reset the debug color of meshes associated with this class.
853 * Was this object marked visible? (only for the explicit
854 * visibility system).
862 * Set visibility flag of this object
871 * Was this object culled?
876 ) { return m_bCulled; }
879 * Set culled flag of this object
887 * Is this object an occluder?
892 ) { return m_bOccluder; }
895 * Set occluder flag of this object
904 * Change the layer of the object (when it is added in another layer
905 * than the original layer)
913 * Get the object layer
921 * Get the negative scaling state
926 ) { return m_bIsNegativeScaling; }
929 * \section Logic bubbling methods.
932 void RegisterCollisionCallbacks();
933 void UnregisterCollisionCallbacks();
934 void RunCollisionCallbacks(KX_GameObject *collider, const MT_Vector3 &point, const MT_Vector3 &normal);
936 * Stop making progress
941 * Resume making progress
945 void RegisterObstacle(KX_ObstacleSimulation* obstacleSimulation)
947 m_pObstacleSimulation = obstacleSimulation;
950 void UnregisterObstacle()
952 m_pObstacleSimulation = NULL;
956 * add debug object to the debuglist.
958 void SetUseDebugProperties(bool debug, bool recursive);
960 KX_ClientObjectInfo* getClientInfo() { return m_pClient_info; }
962 CListValue* GetChildren();
963 CListValue* GetChildrenRecursive();
965 KX_Scene* GetScene();
969 * \section Python interface functions.
971 virtual PyObject *py_repr(void)
973 return PyUnicode_From_STR_String(GetName());
976 KX_PYMETHOD_O(KX_GameObject,SetWorldPosition);
977 KX_PYMETHOD_VARARGS(KX_GameObject, ApplyForce);
978 KX_PYMETHOD_VARARGS(KX_GameObject, ApplyTorque);
979 KX_PYMETHOD_VARARGS(KX_GameObject, ApplyRotation);
980 KX_PYMETHOD_VARARGS(KX_GameObject, ApplyMovement);
981 KX_PYMETHOD_VARARGS(KX_GameObject,GetLinearVelocity);
982 KX_PYMETHOD_VARARGS(KX_GameObject,SetLinearVelocity);
983 KX_PYMETHOD_VARARGS(KX_GameObject,GetAngularVelocity);
984 KX_PYMETHOD_VARARGS(KX_GameObject,SetAngularVelocity);
985 KX_PYMETHOD_VARARGS(KX_GameObject,GetVelocity);
986 KX_PYMETHOD_VARARGS(KX_GameObject,SetDamping);
988 KX_PYMETHOD_NOARGS(KX_GameObject,GetReactionForce);
991 KX_PYMETHOD_NOARGS(KX_GameObject,GetVisible);
992 KX_PYMETHOD_VARARGS(KX_GameObject,SetVisible);
993 KX_PYMETHOD_VARARGS(KX_GameObject,SetOcclusion);
994 KX_PYMETHOD_NOARGS(KX_GameObject,GetState);
995 KX_PYMETHOD_O(KX_GameObject,SetState);
996 KX_PYMETHOD_VARARGS(KX_GameObject,AlignAxisToVect);
997 KX_PYMETHOD_O(KX_GameObject,GetAxisVect);
998 KX_PYMETHOD_NOARGS(KX_GameObject,SuspendDynamics);
999 KX_PYMETHOD_NOARGS(KX_GameObject,RestoreDynamics);
1000 KX_PYMETHOD_NOARGS(KX_GameObject,EnableRigidBody);
1001 KX_PYMETHOD_NOARGS(KX_GameObject,DisableRigidBody);
1002 KX_PYMETHOD_VARARGS(KX_GameObject,ApplyImpulse);
1003 KX_PYMETHOD_O(KX_GameObject,SetCollisionMargin);
1004 KX_PYMETHOD_NOARGS(KX_GameObject,GetParent);
1005 KX_PYMETHOD_VARARGS(KX_GameObject,SetParent);
1006 KX_PYMETHOD_NOARGS(KX_GameObject,RemoveParent);
1007 KX_PYMETHOD_NOARGS(KX_GameObject,GetChildren);
1008 KX_PYMETHOD_NOARGS(KX_GameObject,GetChildrenRecursive);
1009 KX_PYMETHOD_VARARGS(KX_GameObject,GetMesh);
1010 KX_PYMETHOD_NOARGS(KX_GameObject,GetPhysicsId);
1011 KX_PYMETHOD_NOARGS(KX_GameObject,GetPropertyNames);
1012 KX_PYMETHOD_VARARGS(KX_GameObject,ReplaceMesh);
1013 KX_PYMETHOD_NOARGS(KX_GameObject,EndObject);
1014 KX_PYMETHOD_DOC(KX_GameObject,rayCastTo);
1015 KX_PYMETHOD_DOC(KX_GameObject,rayCast);
1016 KX_PYMETHOD_DOC_O(KX_GameObject,getDistanceTo);
1017 KX_PYMETHOD_DOC_O(KX_GameObject,getVectTo);
1018 KX_PYMETHOD_DOC_VARARGS(KX_GameObject, sendMessage);
1019 KX_PYMETHOD_VARARGS(KX_GameObject, ReinstancePhysicsMesh);
1020 KX_PYMETHOD_DOC(KX_GameObject, addDebugProperty);
1022 KX_PYMETHOD_DOC(KX_GameObject, playAction);
1023 KX_PYMETHOD_DOC(KX_GameObject, stopAction);
1024 KX_PYMETHOD_DOC(KX_GameObject, getActionFrame);
1025 KX_PYMETHOD_DOC(KX_GameObject, setActionFrame);
1026 KX_PYMETHOD_DOC(KX_GameObject, isPlayingAction);
1029 KX_PYMETHOD_VARARGS(KX_GameObject,get);
1032 static PyObject* pyattr_get_name(void* self_v, const KX_PYATTRIBUTE_DEF *attrdef);
1033 static PyObject* pyattr_get_parent(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
1035 static PyObject* pyattr_get_group_object(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
1036 static PyObject* pyattr_get_group_members(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
1037 static PyObject* pyattr_get_scene(void* self_v, const KX_PYATTRIBUTE_DEF *attrdef);
1039 static PyObject* pyattr_get_life(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
1040 static PyObject* pyattr_get_mass(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
1041 static int pyattr_set_mass(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
1042 static PyObject* pyattr_get_lin_vel_min(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
1043 static int pyattr_set_lin_vel_min(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
1044 static PyObject* pyattr_get_lin_vel_max(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
1045 static int pyattr_set_lin_vel_max(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
1046 static PyObject* pyattr_get_visible(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
1047 static int pyattr_set_visible(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
1048 static PyObject* pyattr_get_record_animation(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
1049 static int pyattr_set_record_animation(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
1050 static PyObject* pyattr_get_worldPosition(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
1051 static int pyattr_set_worldPosition(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
1052 static PyObject* pyattr_get_localPosition(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
1053 static int pyattr_set_localPosition(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
1054 static PyObject* pyattr_get_localInertia(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
1055 static int pyattr_set_localInertia(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
1056 static PyObject* pyattr_get_worldOrientation(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
1057 static int pyattr_set_worldOrientation(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
1058 static PyObject* pyattr_get_localOrientation(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
1059 static int pyattr_set_localOrientation(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
1060 static PyObject* pyattr_get_worldScaling(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
1061 static int pyattr_set_worldScaling(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
1062 static PyObject* pyattr_get_localScaling(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
1063 static int pyattr_set_localScaling(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
1064 static PyObject* pyattr_get_localTransform(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
1065 static int pyattr_set_localTransform(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
1066 static PyObject* pyattr_get_worldTransform(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
1067 static int pyattr_set_worldTransform(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
1068 static PyObject* pyattr_get_worldLinearVelocity(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
1069 static int pyattr_set_worldLinearVelocity(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
1070 static PyObject* pyattr_get_localLinearVelocity(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
1071 static int pyattr_set_localLinearVelocity(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
1072 static PyObject* pyattr_get_worldAngularVelocity(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
1073 static int pyattr_set_worldAngularVelocity(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
1074 static PyObject* pyattr_get_localAngularVelocity(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
1075 static int pyattr_set_localAngularVelocity(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
1076 static PyObject* pyattr_get_timeOffset(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
1077 static int pyattr_set_timeOffset(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
1078 static PyObject* pyattr_get_state(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
1079 static int pyattr_set_state(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
1080 static PyObject* pyattr_get_meshes(void* self_v, const KX_PYATTRIBUTE_DEF *attrdef);
1081 static PyObject* pyattr_get_children(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
1082 static PyObject* pyattr_get_children_recursive(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
1083 static PyObject* pyattr_get_attrDict(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
1084 static PyObject* pyattr_get_obcolor(void *selv_v, const KX_PYATTRIBUTE_DEF *attrdef);
1085 static int pyattr_set_obcolor(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
1086 static PyObject* pyattr_get_collisionCallbacks(void *selv_v, const KX_PYATTRIBUTE_DEF *attrdef);
1087 static int pyattr_set_collisionCallbacks(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
1088 static PyObject* pyattr_get_debug(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
1089 static int pyattr_set_debug(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
1090 static PyObject* pyattr_get_debugRecursive(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
1091 static int pyattr_set_debugRecursive(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
1092 static PyObject* pyattr_get_linearDamping(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
1093 static int pyattr_set_linearDamping(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
1094 static PyObject* pyattr_get_angularDamping(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
1095 static int pyattr_set_angularDamping(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
1098 static PyObject* pyattr_get_sensors(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
1099 static PyObject* pyattr_get_controllers(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
1100 static PyObject* pyattr_get_actuators(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
1102 /* getitem/setitem */
1103 static PyMappingMethods Mapping;
1104 static PySequenceMethods Sequence;
1110 #endif /* __KX_GAMEOBJECT_H__ */