Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/gameengine/Ketsji/KX_GameObject.h')
-rw-r--r--source/gameengine/Ketsji/KX_GameObject.h50
1 files changed, 27 insertions, 23 deletions
diff --git a/source/gameengine/Ketsji/KX_GameObject.h b/source/gameengine/Ketsji/KX_GameObject.h
index ec02dc17b75..dbdea97031d 100644
--- a/source/gameengine/Ketsji/KX_GameObject.h
+++ b/source/gameengine/Ketsji/KX_GameObject.h
@@ -77,6 +77,7 @@ protected:
STR_String m_text;
int m_layer;
std::vector<RAS_MeshObject*> m_meshes;
+ SG_QList m_meshSlots; // head of mesh slots of this
struct Object* m_pBlenderObject;
struct Object* m_pBlenderGroupObject;
@@ -170,7 +171,7 @@ public:
/**
* Sets the parent of this object to a game object
*/
- void SetParent(KX_Scene *scene, KX_GameObject *obj);
+ void SetParent(KX_Scene *scene, KX_GameObject *obj, bool addToCompound=true, bool ghost=true);
/**
* Removes the parent of this object to a game object
@@ -192,11 +193,6 @@ public:
~KX_GameObject(
);
- CValue*
- AddRef() {
- /* temporarily to find memleaks */ return CValue::AddRef();
- }
-
/**
* @section Stuff which is here due to poor design.
* Inherited from CValue and needs an implementation.
@@ -245,7 +241,7 @@ public:
/**
* Inherited from CValue -- returns the name of this object.
*/
- STR_String
+ STR_String&
GetName(
);
@@ -254,15 +250,7 @@ public:
*/
void
SetName(
- STR_String name
- );
-
- /**
- * Inherited from CValue -- does nothing.
- */
- void
- ReplicaSetName(
- STR_String name
+ const char *name
);
/**
@@ -279,9 +267,7 @@ public:
* data owned by this class is deep copied. Called internally
*/
virtual void
- ProcessReplica(
- KX_GameObject* replica
- );
+ ProcessReplica();
/**
* Return the linear velocity of the game object.
@@ -395,6 +381,10 @@ public:
{
m_pGraphicController = graphiccontroller;
}
+ /*
+ * @add/remove the graphic controller to the physic system
+ */
+ void ActivateGraphicController(bool recurse);
/**
* @section Coordinate system manipulation functions
@@ -570,6 +560,13 @@ public:
static void UpdateTransformFunc(SG_IObject* node, void* gameobj, void* scene);
/**
+ * only used for sensor objects
+ */
+ void SynchronizeTransform();
+
+ static void SynchronizeTransformFunc(SG_IObject* node, void* gameobj, void* scene);
+
+ /**
* Function to set IPO option at start of IPO
*/
void
@@ -816,6 +813,7 @@ public:
*/
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)
@@ -860,7 +858,7 @@ public:
KX_PYMETHOD_VARARGS(KX_GameObject,ApplyImpulse);
KX_PYMETHOD_O(KX_GameObject,SetCollisionMargin);
KX_PYMETHOD_NOARGS(KX_GameObject,GetParent);
- KX_PYMETHOD_O(KX_GameObject,SetParent);
+ KX_PYMETHOD_VARARGS(KX_GameObject,SetParent);
KX_PYMETHOD_NOARGS(KX_GameObject,RemoveParent);
KX_PYMETHOD_NOARGS(KX_GameObject,GetChildren);
KX_PYMETHOD_NOARGS(KX_GameObject,GetChildrenRecursive);
@@ -874,6 +872,11 @@ public:
KX_PYMETHOD_DOC_O(KX_GameObject,getDistanceTo);
KX_PYMETHOD_DOC_O(KX_GameObject,getVectTo);
KX_PYMETHOD_DOC_VARARGS(KX_GameObject, sendMessage);
+
+ /* 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);
static PyObject* pyattr_get_parent(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
@@ -893,6 +896,7 @@ public:
static PyObject* pyattr_get_localInertia(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
static int pyattr_set_localInertia(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
static PyObject* pyattr_get_worldOrientation(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
+ static int pyattr_set_worldOrientation(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
static PyObject* pyattr_get_localOrientation(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
static int pyattr_set_localOrientation(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
static PyObject* pyattr_get_worldScaling(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
@@ -903,9 +907,9 @@ public:
static PyObject* pyattr_get_state(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
static int pyattr_set_state(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
static PyObject* pyattr_get_meshes(void* self_v, const KX_PYATTRIBUTE_DEF *attrdef);
-
- /* for dir(), python3 uses __dir__() */
- static PyObject* pyattr_get_dir_dict(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
+ static PyObject* pyattr_get_children(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
+ static PyObject* pyattr_get_children_recursive(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
+ static PyObject* pyattr_get_attrDict(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
/* Experemental! */
static PyObject* pyattr_get_sensors(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);