diff --git a/source/gameengine/Converter/BL_DeformableGameObject.cpp b/source/gameengine/Converter/BL_DeformableGameObject.cpp index 5c1bf7e617bf..4f2998173506 100644 --- a/source/gameengine/Converter/BL_DeformableGameObject.cpp +++ b/source/gameengine/Converter/BL_DeformableGameObject.cpp @@ -43,15 +43,15 @@ BL_DeformableGameObject::BL_DeformableGameObject(void *sgReplicationInfo, SG_Callbacks callbacks) :KX_GameObject(sgReplicationInfo, callbacks), - m_pDeformer(nullptr), + m_deformer(nullptr), m_lastframe(0.0) { } BL_DeformableGameObject::~BL_DeformableGameObject() { - if (m_pDeformer) { - delete m_pDeformer; + if (m_deformer) { + delete m_deformer; } } @@ -66,15 +66,15 @@ void BL_DeformableGameObject::ProcessReplica() { KX_GameObject::ProcessReplica(); - if (m_pDeformer) { - m_pDeformer = m_pDeformer->GetReplica(); + if (m_deformer) { + m_deformer = m_deformer->GetReplica(); } } void BL_DeformableGameObject::Relink(std::map& map) { - if (m_pDeformer) { - m_pDeformer->Relink(map); + if (m_deformer) { + m_deformer->Relink(map); } KX_GameObject::Relink(map); } @@ -92,7 +92,7 @@ void BL_DeformableGameObject::SetLastFrame(double curtime) bool BL_DeformableGameObject::GetShape(std::vector &shape) { shape.clear(); - BL_ShapeDeformer *shape_deformer = dynamic_cast(m_pDeformer); + BL_ShapeDeformer *shape_deformer = dynamic_cast(m_deformer); if (shape_deformer) { // this check is normally superfluous: a shape deformer can only be created if the mesh // has relative keys @@ -111,12 +111,12 @@ void BL_DeformableGameObject::SetDeformer(RAS_Deformer *deformer) { // Make sure that the object doesn't already have a mesh user. BLI_assert(m_meshUser == nullptr); - m_pDeformer = deformer; + m_deformer = deformer; } RAS_Deformer *BL_DeformableGameObject::GetDeformer() { - return m_pDeformer; + return m_deformer; } bool BL_DeformableGameObject::IsDeformable() const @@ -126,9 +126,9 @@ bool BL_DeformableGameObject::IsDeformable() const void BL_DeformableGameObject::LoadDeformer() { - if (m_pDeformer) { - delete m_pDeformer; - m_pDeformer = nullptr; + if (m_deformer) { + delete m_deformer; + m_deformer = nullptr; } if (m_meshes.empty()) { @@ -149,21 +149,21 @@ void BL_DeformableGameObject::LoadDeformer() /* Object that owns the mesh. If this is not the current blender object, look at one of the object registered * along the blender mesh. */ Object *meshblendobj; - if (m_pBlenderObject->data != mesh) { + if (m_blenderObject->data != mesh) { meshblendobj = static_cast(scene->GetLogicManager()->FindBlendObjByGameMeshName(meshobj->GetName())); } else { - meshblendobj = m_pBlenderObject; + meshblendobj = m_blenderObject; } const bool isParentArmature = parentobj && parentobj->GetGameObjectType() == SCA_IObject::OBJ_ARMATURE; - const bool bHasModifier = BL_ModifierDeformer::HasCompatibleDeformer(m_pBlenderObject); + const bool bHasModifier = BL_ModifierDeformer::HasCompatibleDeformer(m_blenderObject); const bool bHasShapeKey = mesh->key && mesh->key->type == KEY_RELATIVE; - const bool bHasDvert = mesh->dvert && m_pBlenderObject->defbase.first; - const bool bHasArmature = BL_ModifierDeformer::HasArmatureDeformer(m_pBlenderObject) && + const bool bHasDvert = mesh->dvert && m_blenderObject->defbase.first; + const bool bHasArmature = BL_ModifierDeformer::HasArmatureDeformer(m_blenderObject) && isParentArmature && meshblendobj && bHasDvert; #ifdef WITH_BULLET - const bool bHasSoftBody = (!parentobj && (m_pBlenderObject->gameflag & OB_SOFT_BODY)); + const bool bHasSoftBody = (!parentobj && (m_blenderObject->gameflag & OB_SOFT_BODY)); #endif if (!meshblendobj) { @@ -175,40 +175,40 @@ void BL_DeformableGameObject::LoadDeformer() if (bHasModifier) { if (isParentArmature) { - BL_ModifierDeformer *modifierDeformer = new BL_ModifierDeformer(this, blenderScene, meshblendobj, m_pBlenderObject, + BL_ModifierDeformer *modifierDeformer = new BL_ModifierDeformer(this, blenderScene, meshblendobj, m_blenderObject, meshobj, static_cast(parentobj)); modifierDeformer->LoadShapeDrivers(parentobj); - m_pDeformer = modifierDeformer; + m_deformer = modifierDeformer; } else { - m_pDeformer = new BL_ModifierDeformer(this, blenderScene, meshblendobj, m_pBlenderObject, meshobj, nullptr); + m_deformer = new BL_ModifierDeformer(this, blenderScene, meshblendobj, m_blenderObject, meshobj, nullptr); } } else if (bHasShapeKey) { if (isParentArmature) { - BL_ShapeDeformer *shapeDeformer = new BL_ShapeDeformer(this, meshblendobj, m_pBlenderObject, meshobj, + BL_ShapeDeformer *shapeDeformer = new BL_ShapeDeformer(this, meshblendobj, m_blenderObject, meshobj, static_cast(parentobj)); shapeDeformer->LoadShapeDrivers(parentobj); - m_pDeformer = shapeDeformer; + m_deformer = shapeDeformer; } else { - m_pDeformer = new BL_ShapeDeformer(this, meshblendobj, m_pBlenderObject, meshobj, nullptr); + m_deformer = new BL_ShapeDeformer(this, meshblendobj, m_blenderObject, meshobj, nullptr); } } else if (bHasArmature) { - m_pDeformer = new BL_SkinDeformer(this, meshblendobj, m_pBlenderObject, meshobj, + m_deformer = new BL_SkinDeformer(this, meshblendobj, m_blenderObject, meshobj, static_cast(parentobj)); } else if (bHasDvert) { - m_pDeformer = new BL_MeshDeformer(this, meshblendobj, meshobj); + m_deformer = new BL_MeshDeformer(this, meshblendobj, meshobj); } #ifdef WITH_BULLET else if (bHasSoftBody) { - m_pDeformer = new KX_SoftBodyDeformer(meshobj, this); + m_deformer = new KX_SoftBodyDeformer(meshobj, this); } #endif - if (m_pDeformer) { - m_pDeformer->InitializeDisplayArrays(); + if (m_deformer) { + m_deformer->InitializeDisplayArrays(); } } diff --git a/source/gameengine/Converter/BL_DeformableGameObject.h b/source/gameengine/Converter/BL_DeformableGameObject.h index 9c3d9e5f1dda..e9e1a126d72b 100644 --- a/source/gameengine/Converter/BL_DeformableGameObject.h +++ b/source/gameengine/Converter/BL_DeformableGameObject.h @@ -45,7 +45,7 @@ struct Key; class BL_DeformableGameObject : public KX_GameObject { private: - RAS_Deformer *m_pDeformer; + RAS_Deformer *m_deformer; double m_lastframe; diff --git a/source/gameengine/Expressions/EXP_BaseListValue.h b/source/gameengine/Expressions/EXP_BaseListValue.h index 836d3507c5d0..59b18a6dc66c 100644 --- a/source/gameengine/Expressions/EXP_BaseListValue.h +++ b/source/gameengine/Expressions/EXP_BaseListValue.h @@ -31,7 +31,7 @@ class EXP_BaseListValue : public EXP_PropValue typedef VectorType::const_iterator VectorTypeConstIterator; protected: - VectorType m_pValueArray; + VectorType m_valueArray; bool m_bReleaseContents; void SetValue(int i, EXP_Value *val); diff --git a/source/gameengine/Expressions/EXP_ListValue.h b/source/gameengine/Expressions/EXP_ListValue.h index 0ea695a9d87b..dcfcdefe700c 100644 --- a/source/gameengine/Expressions/EXP_ListValue.h +++ b/source/gameengine/Expressions/EXP_ListValue.h @@ -58,9 +58,9 @@ class EXP_ListValue : public EXP_BaseListValue EXP_ListValue(const std::vector& rawList) { const unsigned int size = rawList.size(); - m_pValueArray.resize(size); + m_valueArray.resize(size); for (unsigned int i = 0; i < size; ++i) { - m_pValueArray[i] = rawList[i]; + m_valueArray[i] = rawList[i]; } } @@ -76,10 +76,10 @@ class EXP_ListValue : public EXP_BaseListValue replica->m_bReleaseContents = true; // For copy, complete array is copied for now... // Copy all values. - const int numelements = m_pValueArray.size(); - replica->m_pValueArray.resize(numelements); + const int numelements = m_valueArray.size(); + replica->m_valueArray.resize(numelements); for (unsigned int i = 0; i < numelements; i++) { - replica->m_pValueArray[i] = m_pValueArray[i]->GetReplica(); + replica->m_valueArray[i] = m_valueArray[i]->GetReplica(); } return replica; @@ -97,7 +97,7 @@ class EXP_ListValue : public EXP_BaseListValue ItemType *FindIf(std::function function) { - for (EXP_Value *val : m_pValueArray) { + for (EXP_Value *val : m_valueArray) { ItemType *item = static_cast(val); if (function(item)) { return item; @@ -151,20 +151,20 @@ class EXP_ListValue : public EXP_BaseListValue ItemType *GetFront() { - return static_cast(m_pValueArray.front()); + return static_cast(m_valueArray.front()); } ItemType *GetBack() { - return static_cast(m_pValueArray.back()); + return static_cast(m_valueArray.back()); } const_iterator begin() { - return const_iterator(m_pValueArray.begin()); + return const_iterator(m_valueArray.begin()); } const_iterator end() { - return const_iterator(m_pValueArray.end()); + return const_iterator(m_valueArray.end()); } }; diff --git a/source/gameengine/Expressions/intern/BaseListValue.cpp b/source/gameengine/Expressions/intern/BaseListValue.cpp index 3e7ba1b7fe0e..75495003a860 100644 --- a/source/gameengine/Expressions/intern/BaseListValue.cpp +++ b/source/gameengine/Expressions/intern/BaseListValue.cpp @@ -35,7 +35,7 @@ EXP_BaseListValue::EXP_BaseListValue() EXP_BaseListValue::~EXP_BaseListValue() { if (m_bReleaseContents) { - for (EXP_Value *item : m_pValueArray) { + for (EXP_Value *item : m_valueArray) { item->Release(); } } @@ -43,20 +43,20 @@ EXP_BaseListValue::~EXP_BaseListValue() void EXP_BaseListValue::SetValue(int i, EXP_Value *val) { - m_pValueArray[i] = val; + m_valueArray[i] = val; } EXP_Value *EXP_BaseListValue::GetValue(int i) { - return m_pValueArray[i]; + return m_valueArray[i]; } EXP_Value *EXP_BaseListValue::FindValue(const std::string& name) const { - const VectorTypeConstIterator it = std::find_if(m_pValueArray.begin(), m_pValueArray.end(), + const VectorTypeConstIterator it = std::find_if(m_valueArray.begin(), m_valueArray.end(), [&name](EXP_Value *item) { return item->GetName() == name; }); - if (it != m_pValueArray.end()) { + if (it != m_valueArray.end()) { return *it; } return nullptr; @@ -64,25 +64,25 @@ EXP_Value *EXP_BaseListValue::FindValue(const std::string& name) const bool EXP_BaseListValue::SearchValue(EXP_Value *val) const { - return (std::find(m_pValueArray.begin(), m_pValueArray.end(), val) != m_pValueArray.end()); + return (std::find(m_valueArray.begin(), m_valueArray.end(), val) != m_valueArray.end()); } void EXP_BaseListValue::Add(EXP_Value *value) { - m_pValueArray.push_back(value); + m_valueArray.push_back(value); } void EXP_BaseListValue::Insert(unsigned int i, EXP_Value *value) { - m_pValueArray.insert(m_pValueArray.begin() + i, value); + m_valueArray.insert(m_valueArray.begin() + i, value); } bool EXP_BaseListValue::RemoveValue(EXP_Value *val) { bool result = false; - for (VectorTypeIterator it = m_pValueArray.begin(); it != m_pValueArray.end();) { + for (VectorTypeIterator it = m_valueArray.begin(); it != m_valueArray.end();) { if (*it == val) { - it = m_pValueArray.erase(it); + it = m_valueArray.erase(it); result = true; } else { @@ -112,7 +112,7 @@ std::string EXP_BaseListValue::GetText() std::string strListRep = "["; std::string commastr = ""; - for (EXP_Value *item : m_pValueArray) { + for (EXP_Value *item : m_valueArray) { strListRep += commastr; strListRep += item->GetText(); commastr = ", "; @@ -134,25 +134,25 @@ void EXP_BaseListValue::SetReleaseOnDestruct(bool bReleaseContents) void EXP_BaseListValue::Remove(int i) { - m_pValueArray.erase(m_pValueArray.begin() + i); + m_valueArray.erase(m_valueArray.begin() + i); } void EXP_BaseListValue::Resize(int num) { - m_pValueArray.resize(num); + m_valueArray.resize(num); } void EXP_BaseListValue::ReleaseAndRemoveAll() { - for (EXP_Value *item : m_pValueArray) { + for (EXP_Value *item : m_valueArray) { item->Release(); } - m_pValueArray.clear(); + m_valueArray.clear(); } int EXP_BaseListValue::GetCount() const { - return m_pValueArray.size(); + return m_valueArray.size(); } #ifdef WITH_PYTHON @@ -462,7 +462,7 @@ PyObject *EXP_BaseListValue::Pyreverse() return nullptr; } - std::reverse(m_pValueArray.begin(), m_pValueArray.end()); + std::reverse(m_valueArray.begin(), m_valueArray.end()); Py_RETURN_NONE; } @@ -568,7 +568,7 @@ PyObject *EXP_BaseListValue::Pyfilter(PyObject *args) EXP_ListValue *result = new EXP_ListValue(); result->SetReleaseOnDestruct(false); - for (EXP_Value *item : m_pValueArray) { + for (EXP_Value *item : m_valueArray) { if (strlen(namestr) == 0 || std::regex_match(item->GetName(), namereg)) { if (strlen(propstr) == 0) { result->Add(item); @@ -598,7 +598,7 @@ PyObject *EXP_BaseListValue::Pyfrom_id(PyObject *value) int numelem = GetCount(); for (int i = 0; i < numelem; i++) { - if (reinterpret_cast(m_pValueArray[i]->m_proxy) == id) { + if (reinterpret_cast(m_valueArray[i]->m_proxy) == id) { return GetValue(i)->GetProxy(); } } diff --git a/source/gameengine/Ketsji/KX_Camera.cpp b/source/gameengine/Ketsji/KX_Camera.cpp index a2fb0777845a..fe724f848321 100644 --- a/source/gameengine/Ketsji/KX_Camera.cpp +++ b/source/gameengine/Ketsji/KX_Camera.cpp @@ -68,11 +68,11 @@ KX_Camera::KX_Camera(void* sgReplicationInfo, KX_Camera::~KX_Camera() { - if (m_delete_node && m_pSGNode) + if (m_delete_node && m_sgNode) { // for shadow camera, avoids memleak - delete m_pSGNode; - m_pSGNode = nullptr; + delete m_sgNode; + m_sgNode = nullptr; } } diff --git a/source/gameengine/Ketsji/KX_FontObject.cpp b/source/gameengine/Ketsji/KX_FontObject.cpp index d43d45c686a2..75c6407994fe 100644 --- a/source/gameengine/Ketsji/KX_FontObject.cpp +++ b/source/gameengine/Ketsji/KX_FontObject.cpp @@ -128,7 +128,7 @@ void KX_FontObject::ProcessReplica() void KX_FontObject::AddMeshUser() { - m_meshUser = new RAS_TextUser(m_pClient_info, m_boundingBox); + m_meshUser = new RAS_TextUser(m_client_info, m_boundingBox); // Make sure the mesh user get the matrix even if the object doesn't move. NodeGetWorldTransform().PackFromAffineTransform(m_meshUser->GetMatrix()); @@ -143,9 +143,9 @@ void KX_FontObject::AddMeshUser() void KX_FontObject::UpdateBuckets() { // Update datas and add mesh slot to be rendered only if the object is not culled. - if (m_pSGNode->IsDirty(SG_Node::DIRTY_RENDER)) { + if (m_sgNode->IsDirty(SG_Node::DIRTY_RENDER)) { NodeGetWorldTransform().PackFromAffineTransform(m_meshUser->GetMatrix()); - m_pSGNode->ClearDirty(SG_Node::DIRTY_RENDER); + m_sgNode->ClearDirty(SG_Node::DIRTY_RENDER); } // Font Objects don't use the glsl shader, this color management code is copied from gpu_shader_material.glsl diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp index b8bb54a8e031..363855c69c22 100644 --- a/source/gameengine/Ketsji/KX_GameObject.cpp +++ b/source/gameengine/Ketsji/KX_GameObject.cpp @@ -110,30 +110,30 @@ KX_GameObject::KX_GameObject( m_lodManager(nullptr), m_currentLodLevel(0), m_meshUser(nullptr), - m_pBlenderObject(nullptr), - m_pBlenderGroupObject(nullptr), + m_blenderObject(nullptr), + m_blenderGroupObject(nullptr), m_bIsNegativeScaling(false), m_objectColor(mt::one4), m_bVisible(true), m_bOccluder(false), m_autoUpdateBounds(false), - m_pPhysicsController(nullptr), - m_pGraphicController(nullptr), + m_physicsController(nullptr), + m_graphicController(nullptr), m_components(nullptr), - m_pInstanceObjects(nullptr), - m_pDupliGroupObject(nullptr), + m_instanceObjects(nullptr), + m_dupliGroupObject(nullptr), m_actionManager(nullptr) #ifdef WITH_PYTHON , m_attr_dict(nullptr), m_collisionCallbacks(nullptr) #endif { - m_pClient_info = new KX_ClientObjectInfo(this, KX_ClientObjectInfo::ACTOR); - m_pSGNode = new SG_Node(this,sgReplicationInfo,callbacks); + m_client_info = new KX_ClientObjectInfo(this, KX_ClientObjectInfo::ACTOR); + m_sgNode = new SG_Node(this,sgReplicationInfo,callbacks); // define the relationship between this node and it's parent. KX_NormalParentRelation *parent_relation = new KX_NormalParentRelation(); - m_pSGNode->SetParentRelation(parent_relation); + m_sgNode->SetParentRelation(parent_relation); }; @@ -147,7 +147,7 @@ KX_GameObject::~KX_GameObject() Py_CLEAR(m_attr_dict); } // Unregister collision callbacks - // Do this before we start freeing physics information like m_pClient_info + // Do this before we start freeing physics information like m_client_info if (m_collisionCallbacks) { UnregisterCollisionCallbacks(); Py_CLEAR(m_collisionCallbacks); @@ -163,33 +163,33 @@ KX_GameObject::~KX_GameObject() // is this delete somewhere ? //if (m_sumoObj) // delete m_sumoObj; - delete m_pClient_info; + delete m_client_info; - //if (m_pSGNode) - // delete m_pSGNode; - if (m_pSGNode) + //if (m_sgNode) + // delete m_sgNode; + if (m_sgNode) { // must go through controllers and make sure they will not use us anymore // This is important for KX_BulletPhysicsControllers that unregister themselves // from the object when they are deleted. SGControllerList::iterator contit; - SGControllerList& controllers = m_pSGNode->GetSGControllerList(); + SGControllerList& controllers = m_sgNode->GetSGControllerList(); for (contit = controllers.begin();contit!=controllers.end();++contit) { (*contit)->ClearNode(); } - m_pSGNode->SetSGClientObject(nullptr); + m_sgNode->SetSGClientObject(nullptr); - /* m_pSGNode is freed in KX_Scene::RemoveNodeDestructObject */ + /* m_sgNode is freed in KX_Scene::RemoveNodeDestructObject */ } - if (m_pGraphicController) + if (m_graphicController) { - delete m_pGraphicController; + delete m_graphicController; } - if (m_pPhysicsController) + if (m_physicsController) { - delete m_pPhysicsController; + delete m_physicsController; } if (m_actionManager) @@ -197,14 +197,14 @@ KX_GameObject::~KX_GameObject() delete m_actionManager; } - if (m_pDupliGroupObject) + if (m_dupliGroupObject) { - m_pDupliGroupObject->Release(); + m_dupliGroupObject->Release(); } - if (m_pInstanceObjects) + if (m_instanceObjects) { - m_pInstanceObjects->Release(); + m_instanceObjects->Release(); } if (m_lodManager) { m_lodManager->Release(); @@ -231,47 +231,47 @@ void KX_GameObject::SetName(const std::string& name) PHY_IPhysicsController* KX_GameObject::GetPhysicsController() { - return m_pPhysicsController; + return m_physicsController; } KX_GameObject* KX_GameObject::GetDupliGroupObject() { - return m_pDupliGroupObject; + return m_dupliGroupObject; } EXP_ListValue *KX_GameObject::GetInstanceObjects() { - return m_pInstanceObjects; + return m_instanceObjects; } void KX_GameObject::AddInstanceObjects(KX_GameObject* obj) { - if (!m_pInstanceObjects) - m_pInstanceObjects = new EXP_ListValue(); + if (!m_instanceObjects) + m_instanceObjects = new EXP_ListValue(); obj->AddRef(); - m_pInstanceObjects->Add(obj); + m_instanceObjects->Add(obj); } void KX_GameObject::RemoveInstanceObject(KX_GameObject* obj) { - BLI_assert(m_pInstanceObjects); - m_pInstanceObjects->RemoveValue(obj); + BLI_assert(m_instanceObjects); + m_instanceObjects->RemoveValue(obj); obj->Release(); } void KX_GameObject::RemoveDupliGroupObject() { - if (m_pDupliGroupObject) { - m_pDupliGroupObject->Release(); - m_pDupliGroupObject = nullptr; + if (m_dupliGroupObject) { + m_dupliGroupObject->Release(); + m_dupliGroupObject = nullptr; } } void KX_GameObject::SetDupliGroupObject(KX_GameObject* obj) { obj->AddRef(); - m_pDupliGroupObject = obj; + m_dupliGroupObject = obj; } void KX_GameObject::AddConstraint(bRigidBodyJointConstraint *cons) @@ -292,7 +292,7 @@ void KX_GameObject::ClearConstraints() KX_GameObject* KX_GameObject::GetParent() { KX_GameObject* result = nullptr; - SG_Node* node = m_pSGNode; + SG_Node* node = m_sgNode; while (node && !result) { @@ -332,9 +332,9 @@ void KX_GameObject::SetParent(KX_GameObject* obj, bool addToCompound, bool ghost RemoveParent(); obj->GetSGNode()->AddChild(GetSGNode()); - if (m_pPhysicsController) + if (m_physicsController) { - m_pPhysicsController->SuspendDynamics(ghost); + m_physicsController->SuspendDynamics(ghost); } // Set us to our new scale, position, and orientation scale2[0] = 1.0f/scale2[0]; @@ -355,19 +355,19 @@ void KX_GameObject::SetParent(KX_GameObject* obj, bool addToCompound, bool ghost Release(); // if the new parent is a compound object, add this object shape to the compound shape. // step 0: verify this object has physical controller - if (m_pPhysicsController && addToCompound) + if (m_physicsController && addToCompound) { // step 1: find the top parent (not necessarily obj) KX_GameObject* rootobj = (KX_GameObject*)obj->GetSGNode()->GetRootSGParent()->GetSGClientObject(); // step 2: verify it has a physical controller and compound shape if (rootobj != nullptr && - rootobj->m_pPhysicsController != nullptr && - rootobj->m_pPhysicsController->IsCompound()) + rootobj->m_physicsController != nullptr && + rootobj->m_physicsController->IsCompound()) { - rootobj->m_pPhysicsController->AddCompoundChild(m_pPhysicsController); + rootobj->m_physicsController->AddCompoundChild(m_physicsController); } } - // graphically, the object hasn't change place, no need to update m_pGraphicController + // graphically, the object hasn't change place, no need to update m_graphicController } } @@ -393,30 +393,30 @@ void KX_GameObject::RemoveParent() if (!rootlist->SearchValue(this)) // object was not in root list, add it now and increment ref count rootlist->Add(CM_AddRef(this)); - if (m_pPhysicsController) + if (m_physicsController) { // in case this controller was added as a child shape to the parent if (rootobj != nullptr && - rootobj->m_pPhysicsController != nullptr && - rootobj->m_pPhysicsController->IsCompound()) + rootobj->m_physicsController != nullptr && + rootobj->m_physicsController->IsCompound()) { - rootobj->m_pPhysicsController->RemoveCompoundChild(m_pPhysicsController); + rootobj->m_physicsController->RemoveCompoundChild(m_physicsController); } - m_pPhysicsController->RestoreDynamics(); - if (m_pPhysicsController->IsDynamic() && (rootobj != nullptr && rootobj->m_pPhysicsController)) + m_physicsController->RestoreDynamics(); + if (m_physicsController->IsDynamic() && (rootobj != nullptr && rootobj->m_physicsController)) { // dynamic object should remember the velocity they had while being parented mt::vec3 childPoint = GetSGNode()->GetWorldPosition(); mt::vec3 rootPoint = rootobj->GetSGNode()->GetWorldPosition(); mt::vec3 relPoint; relPoint = (childPoint-rootPoint); - mt::vec3 linVel = rootobj->m_pPhysicsController->GetVelocity(relPoint); - mt::vec3 angVel = rootobj->m_pPhysicsController->GetAngularVelocity(); - m_pPhysicsController->SetLinearVelocity(linVel, false); - m_pPhysicsController->SetAngularVelocity(angVel, false); + mt::vec3 linVel = rootobj->m_physicsController->GetVelocity(relPoint); + mt::vec3 angVel = rootobj->m_physicsController->GetAngularVelocity(); + m_physicsController->SetLinearVelocity(linVel, false); + m_physicsController->SetAngularVelocity(angVel, false); } } - // graphically, the object hasn't change place, no need to update m_pGraphicController + // graphically, the object hasn't change place, no need to update m_graphicController } } @@ -499,16 +499,16 @@ void KX_GameObject::ProcessReplica() { SCA_IObject::ProcessReplica(); - m_pGraphicController = nullptr; - m_pPhysicsController = nullptr; - m_pSGNode = nullptr; + m_graphicController = nullptr; + m_physicsController = nullptr; + m_sgNode = nullptr; /* Dupli group and instance list are set later in replication. * See KX_Scene::DupliGroupRecurse. */ - m_pDupliGroupObject = nullptr; - m_pInstanceObjects = nullptr; - m_pClient_info = new KX_ClientObjectInfo(*m_pClient_info); - m_pClient_info->m_gameobject = this; + m_dupliGroupObject = nullptr; + m_instanceObjects = nullptr; + m_client_info = new KX_ClientObjectInfo(*m_client_info); + m_client_info->m_gameobject = this; m_actionManager = nullptr; m_state = 0; @@ -550,9 +550,9 @@ static void setGraphicController_recursive(SG_Node* node) void KX_GameObject::ActivateGraphicController(bool recurse) { - if (m_pGraphicController) + if (m_graphicController) { - m_pGraphicController->Activate(m_bVisible); + m_graphicController->Activate(m_bVisible); } if (recurse) { @@ -562,26 +562,26 @@ void KX_GameObject::ActivateGraphicController(bool recurse) void KX_GameObject::SetCollisionGroup(unsigned short group) { - if (m_pPhysicsController) { - m_pPhysicsController->SetCollisionGroup(group); - m_pPhysicsController->RefreshCollisions(); + if (m_physicsController) { + m_physicsController->SetCollisionGroup(group); + m_physicsController->RefreshCollisions(); } } void KX_GameObject::SetCollisionMask(unsigned short mask) { - if (m_pPhysicsController) { - m_pPhysicsController->SetCollisionMask(mask); - m_pPhysicsController->RefreshCollisions(); + if (m_physicsController) { + m_physicsController->SetCollisionMask(mask); + m_physicsController->RefreshCollisions(); } } unsigned short KX_GameObject::GetCollisionGroup() const { - return m_pPhysicsController ? m_pPhysicsController->GetCollisionGroup() : 0; + return m_physicsController ? m_physicsController->GetCollisionGroup() : 0; } unsigned short KX_GameObject::GetCollisionMask() const { - return m_pPhysicsController ? m_pPhysicsController->GetCollisionMask() : 0; + return m_physicsController ? m_physicsController->GetCollisionMask() : 0; } EXP_Value* KX_GameObject::GetReplica() @@ -596,75 +596,75 @@ EXP_Value* KX_GameObject::GetReplica() bool KX_GameObject::IsDynamic() const { - if (m_pPhysicsController) { - return m_pPhysicsController->IsDynamic(); + if (m_physicsController) { + return m_physicsController->IsDynamic(); } return false; } bool KX_GameObject::IsDynamicsSuspended() const { - if (m_pPhysicsController) - return m_pPhysicsController->IsDynamicsSuspended(); + if (m_physicsController) + return m_physicsController->IsDynamicsSuspended(); return false; } float KX_GameObject::getLinearDamping() const { - if (m_pPhysicsController) - return m_pPhysicsController->GetLinearDamping(); + if (m_physicsController) + return m_physicsController->GetLinearDamping(); return 0; } float KX_GameObject::getAngularDamping() const { - if (m_pPhysicsController) - return m_pPhysicsController->GetAngularDamping(); + if (m_physicsController) + return m_physicsController->GetAngularDamping(); return 0; } void KX_GameObject::setLinearDamping(float damping) { - if (m_pPhysicsController) - m_pPhysicsController->SetLinearDamping(damping); + if (m_physicsController) + m_physicsController->SetLinearDamping(damping); } void KX_GameObject::setAngularDamping(float damping) { - if (m_pPhysicsController) - m_pPhysicsController->SetAngularDamping(damping); + if (m_physicsController) + m_physicsController->SetAngularDamping(damping); } void KX_GameObject::setDamping(float linear, float angular) { - if (m_pPhysicsController) - m_pPhysicsController->SetDamping(linear, angular); + if (m_physicsController) + m_physicsController->SetDamping(linear, angular); } void KX_GameObject::ApplyForce(const mt::vec3& force,bool local) { - if (m_pPhysicsController) - m_pPhysicsController->ApplyForce(force,local); + if (m_physicsController) + m_physicsController->ApplyForce(force,local); } void KX_GameObject::ApplyTorque(const mt::vec3& torque,bool local) { - if (m_pPhysicsController) - m_pPhysicsController->ApplyTorque(torque,local); + if (m_physicsController) + m_physicsController->ApplyTorque(torque,local); } void KX_GameObject::ApplyMovement(const mt::vec3& dloc,bool local) { - if (m_pPhysicsController) // (IsDynamic()) + if (m_physicsController) // (IsDynamic()) { - m_pPhysicsController->RelativeTranslate(dloc,local); + m_physicsController->RelativeTranslate(dloc,local); } GetSGNode()->RelativeTranslate(dloc,GetSGNode()->GetSGParent(),local); NodeUpdateGS(0.0f); @@ -676,8 +676,8 @@ void KX_GameObject::ApplyRotation(const mt::vec3& drot,bool local) GetSGNode()->RelativeRotate(rotmat,local); - if (m_pPhysicsController) { // (IsDynamic()) - m_pPhysicsController->RelativeRotate(rotmat,local); + if (m_physicsController) { // (IsDynamic()) + m_physicsController->RelativeRotate(rotmat,local); } NodeUpdateGS(0.0f); } @@ -685,7 +685,7 @@ void KX_GameObject::ApplyRotation(const mt::vec3& drot,bool local) void KX_GameObject::UpdateBlenderObjectMatrix(Object* blendobj) { if (!blendobj) - blendobj = m_pBlenderObject; + blendobj = m_blenderObject; if (blendobj) { const mt::mat3x4 trans = NodeGetWorldTransform(); trans.PackFromAffineTransform(blendobj->obmat); @@ -695,7 +695,7 @@ void KX_GameObject::UpdateBlenderObjectMatrix(Object* blendobj) void KX_GameObject::AddMeshUser() { for (size_t i = 0; i < m_meshes.size(); ++i) { - m_meshUser = m_meshes[i]->AddMeshUser(m_pClient_info, GetDeformer()); + m_meshUser = m_meshes[i]->AddMeshUser(m_client_info, GetDeformer()); // Make sure the mesh user get the matrix even if the object doesn't move. NodeGetWorldTransform().PackFromAffineTransform(m_meshUser->GetMatrix()); } @@ -704,9 +704,9 @@ void KX_GameObject::AddMeshUser() void KX_GameObject::UpdateBuckets() { // Update datas and add mesh slot to be rendered only if the object is not culled. - if (m_pSGNode->IsDirty(SG_Node::DIRTY_RENDER)) { + if (m_sgNode->IsDirty(SG_Node::DIRTY_RENDER)) { NodeGetWorldTransform().PackFromAffineTransform(m_meshUser->GetMatrix()); - m_pSGNode->ClearDirty(SG_Node::DIRTY_RENDER); + m_sgNode->ClearDirty(SG_Node::DIRTY_RENDER); } m_meshUser->SetColor(m_objectColor); @@ -725,8 +725,8 @@ void KX_GameObject::ReplaceMesh(RAS_MeshObject *mesh, bool use_gfx, bool use_phy // Update the new assigned mesh with the physics mesh. if (use_phys) { - if (m_pPhysicsController) { - m_pPhysicsController->ReinstancePhysicsShape(nullptr, use_gfx ? nullptr : mesh); + if (m_physicsController) { + m_physicsController->ReinstancePhysicsShape(nullptr, use_gfx ? nullptr : mesh); } } // Always make sure that the bounding box is updated to the new mesh. @@ -841,11 +841,11 @@ void KX_GameObject::UpdateActivity(float distance) void KX_GameObject::UpdateTransform() { // HACK: saves function call for dynamic object, they are handled differently - if (m_pPhysicsController && !m_pPhysicsController->IsDynamic()) - m_pPhysicsController->SetTransform(); - if (m_pGraphicController) + if (m_physicsController && !m_physicsController->IsDynamic()) + m_physicsController->SetTransform(); + if (m_graphicController) // update the culling tree - m_pGraphicController->SetGraphicTransform(); + m_graphicController->SetGraphicTransform(); } @@ -857,10 +857,10 @@ void KX_GameObject::UpdateTransformFunc(SG_Node* node, void* gameobj, void* scen void KX_GameObject::SynchronizeTransform() { // only used for sensor object, do full synchronization as bullet doesn't do it - if (m_pPhysicsController) - m_pPhysicsController->SetTransform(); - if (m_pGraphicController) - m_pGraphicController->SetGraphicTransform(); + if (m_physicsController) + m_physicsController->SetTransform(); + if (m_graphicController) + m_graphicController->SetGraphicTransform(); } void KX_GameObject::SynchronizeTransformFunc(SG_Node* node, void* gameobj, void* scene) @@ -922,8 +922,8 @@ KX_GameObject::SetVisible( ) { m_bVisible = v; - if (m_pGraphicController) - m_pGraphicController->Activate(m_bVisible); + if (m_graphicController) + m_graphicController->Activate(m_bVisible); if (recursive) setVisible_recursive(GetSGNode(), v); } @@ -1008,10 +1008,10 @@ KX_GameObject::GetLayer( void KX_GameObject::addLinearVelocity(const mt::vec3& lin_vel,bool local) { - if (m_pPhysicsController) + if (m_physicsController) { mt::vec3 lv = local ? NodeGetWorldOrientation() * lin_vel : lin_vel; - m_pPhysicsController->SetLinearVelocity(lv + m_pPhysicsController->GetLinearVelocity(), 0); + m_physicsController->SetLinearVelocity(lv + m_physicsController->GetLinearVelocity(), 0); } } @@ -1019,16 +1019,16 @@ void KX_GameObject::addLinearVelocity(const mt::vec3& lin_vel,bool local) void KX_GameObject::setLinearVelocity(const mt::vec3& lin_vel,bool local) { - if (m_pPhysicsController) - m_pPhysicsController->SetLinearVelocity(lin_vel,local); + if (m_physicsController) + m_physicsController->SetLinearVelocity(lin_vel,local); } void KX_GameObject::setAngularVelocity(const mt::vec3& ang_vel,bool local) { - if (m_pPhysicsController) - m_pPhysicsController->SetAngularVelocity(ang_vel,local); + if (m_physicsController) + m_physicsController->SetAngularVelocity(ang_vel,local); } void KX_GameObject::SetObjectColor(const mt::vec4& rgbavec) @@ -1138,9 +1138,9 @@ void KX_GameObject::AlignAxisToVect(const mt::vec3& dir, int axis, float fac) float KX_GameObject::GetMass() { - if (m_pPhysicsController) + if (m_physicsController) { - return m_pPhysicsController->GetMass(); + return m_physicsController->GetMass(); } return 0.0f; } @@ -1148,9 +1148,9 @@ float KX_GameObject::GetMass() mt::vec3 KX_GameObject::GetLocalInertia() { mt::vec3 local_inertia = mt::zero3; - if (m_pPhysicsController) + if (m_physicsController) { - local_inertia = m_pPhysicsController->GetLocalInertia(); + local_inertia = m_physicsController->GetLocalInertia(); } return local_inertia; } @@ -1159,9 +1159,9 @@ mt::vec3 KX_GameObject::GetLinearVelocity(bool local) { mt::vec3 velocity = mt::zero3, locvel; mt::mat3 ori; - if (m_pPhysicsController) + if (m_physicsController) { - velocity = m_pPhysicsController->GetLinearVelocity(); + velocity = m_physicsController->GetLinearVelocity(); if (local) { @@ -1178,9 +1178,9 @@ mt::vec3 KX_GameObject::GetAngularVelocity(bool local) { mt::vec3 velocity = mt::zero3, locvel; mt::mat3 ori; - if (m_pPhysicsController) + if (m_physicsController) { - velocity = m_pPhysicsController->GetAngularVelocity(); + velocity = m_physicsController->GetAngularVelocity(); if (local) { @@ -1195,25 +1195,25 @@ mt::vec3 KX_GameObject::GetAngularVelocity(bool local) mt::vec3 KX_GameObject::GetGravity() const { - if (!m_pPhysicsController) { + if (!m_physicsController) { return mt::zero3; } - return m_pPhysicsController->GetGravity(); + return m_physicsController->GetGravity(); } void KX_GameObject::SetGravity(const mt::vec3 &gravity) { - if (m_pPhysicsController) { - m_pPhysicsController->SetGravity(gravity); + if (m_physicsController) { + m_physicsController->SetGravity(gravity); } } mt::vec3 KX_GameObject::GetVelocity(const mt::vec3& point) { - if (m_pPhysicsController) + if (m_physicsController) { - return m_pPhysicsController->GetVelocity(point); + return m_physicsController->GetVelocity(point); } return mt::zero3; } @@ -1222,13 +1222,13 @@ mt::vec3 KX_GameObject::GetVelocity(const mt::vec3& point) void KX_GameObject::NodeSetLocalPosition(const mt::vec3& trans) { - if (m_pPhysicsController && !GetSGNode()->GetSGParent()) + if (m_physicsController && !GetSGNode()->GetSGParent()) { // don't update physic controller if the object is a child: // 1) the transformation will not be right // 2) in this case, the physic controller is necessarily a static object // that is updated from the normal kinematic synchronization - m_pPhysicsController->SetPosition(trans); + m_physicsController->SetPosition(trans); } GetSGNode()->SetLocalPosition(trans); @@ -1239,10 +1239,10 @@ void KX_GameObject::NodeSetLocalPosition(const mt::vec3& trans) void KX_GameObject::NodeSetLocalOrientation(const mt::mat3& rot) { - if (m_pPhysicsController && !GetSGNode()->GetSGParent()) + if (m_physicsController && !GetSGNode()->GetSGParent()) { // see note above - m_pPhysicsController->SetOrientation(rot); + m_physicsController->SetOrientation(rot); } GetSGNode()->SetLocalOrientation(rot); } @@ -1257,10 +1257,10 @@ void KX_GameObject::NodeSetGlobalOrientation(const mt::mat3& rot) void KX_GameObject::NodeSetLocalScale(const mt::vec3& scale) { - if (m_pPhysicsController && !GetSGNode()->GetSGParent()) + if (m_physicsController && !GetSGNode()->GetSGParent()) { // see note above - m_pPhysicsController->SetScaling(scale); + m_physicsController->SetScaling(scale); } GetSGNode()->SetLocalScale(scale); } @@ -1270,13 +1270,13 @@ void KX_GameObject::NodeSetLocalScale(const mt::vec3& scale) void KX_GameObject::NodeSetRelativeScale(const mt::vec3& scale) { GetSGNode()->RelativeScale(scale); - if (m_pPhysicsController && (!GetSGNode()->GetSGParent())) + if (m_physicsController && (!GetSGNode()->GetSGParent())) { // see note above // we can use the local scale: it's the same thing for a root object // and the world scale is not yet updated mt::vec3 newscale = GetSGNode()->GetLocalScale(); - m_pPhysicsController->SetScaling(newscale); + m_physicsController->SetScaling(newscale); } } @@ -1308,7 +1308,7 @@ void KX_GameObject::NodeSetWorldScale(const mt::vec3& scale) void KX_GameObject::NodeSetWorldPosition(const mt::vec3& trans) { - SG_Node* parent = m_pSGNode->GetSGParent(); + SG_Node* parent = m_sgNode->GetSGParent(); if (parent != nullptr) { // Make sure the objects have some scale @@ -1335,47 +1335,47 @@ void KX_GameObject::NodeSetWorldPosition(const mt::vec3& trans) void KX_GameObject::NodeUpdateGS(double time) { - m_pSGNode->UpdateWorldData(time); + m_sgNode->UpdateWorldData(time); } const mt::mat3& KX_GameObject::NodeGetWorldOrientation() const { - return m_pSGNode->GetWorldOrientation(); + return m_sgNode->GetWorldOrientation(); } const mt::mat3& KX_GameObject::NodeGetLocalOrientation() const { - return m_pSGNode->GetLocalOrientation(); + return m_sgNode->GetLocalOrientation(); } const mt::vec3& KX_GameObject::NodeGetWorldScaling() const { - return m_pSGNode->GetWorldScaling(); + return m_sgNode->GetWorldScaling(); } const mt::vec3& KX_GameObject::NodeGetLocalScaling() const { - return m_pSGNode->GetLocalScale(); + return m_sgNode->GetLocalScale(); } const mt::vec3& KX_GameObject::NodeGetWorldPosition() const { - return m_pSGNode->GetWorldPosition(); + return m_sgNode->GetWorldPosition(); } const mt::vec3& KX_GameObject::NodeGetLocalPosition() const { - return m_pSGNode->GetLocalPosition(); + return m_sgNode->GetLocalPosition(); } mt::mat3x4 KX_GameObject::NodeGetWorldTransform() const { - return m_pSGNode->GetWorldTransform(); + return m_sgNode->GetWorldTransform(); } mt::mat3x4 KX_GameObject::NodeGetLocalTransform() const { - return m_pSGNode->GetLocalTransform(); + return m_sgNode->GetLocalTransform(); } void KX_GameObject::UpdateBounds(bool force) @@ -1404,8 +1404,8 @@ void KX_GameObject::SetBoundsAabb(const mt::vec3 &aabbMin, const mt::vec3 &aabbM m_cullingNode.GetAabb().Set(aabbMin, aabbMax); // Synchronize the AABB with the graphic controller. - if (m_pGraphicController) { - m_pGraphicController->SetLocalAabb(aabbMin, aabbMax); + if (m_graphicController) { + m_graphicController->SetLocalAabb(aabbMin, aabbMax); } } @@ -1476,7 +1476,7 @@ void KX_GameObject::UnregisterCollisionCallbacks() // If we are the last to unregister on this physics controller if (pe->RemoveCollisionCallback(spc)) { // If we are a sensor object - if (m_pClient_info->isSensor()) + if (m_client_info->isSensor()) // Remove sensor body from physics world pe->RemoveSensor(spc); } @@ -1496,7 +1496,7 @@ void KX_GameObject::RegisterCollisionCallbacks() // If we are the first to register on this physics controller if (pe->RequestCollisionCallback(spc)) { // If we are a sensor object - if (m_pClient_info->isSensor()) + if (m_client_info->isSensor()) // Add sensor body to physics world pe->AddSensor(spc); } @@ -1589,8 +1589,8 @@ void KX_GameObject::UpdateComponents() KX_Scene* KX_GameObject::GetScene() { - BLI_assert(m_pSGNode); - return static_cast(m_pSGNode->GetSGClientInfo()); + BLI_assert(m_sgNode); + return static_cast(m_sgNode->GetSGClientInfo()); } /* --------------------------------------------------------------------- @@ -3569,7 +3569,7 @@ PyObject *KX_GameObject::PySetCollisionMargin(PyObject *value) PYTHON_CHECK_PHYSICS_CONTROLLER(this, "setCollisionMargin", nullptr); - m_pPhysicsController->SetMargin(collisionMargin); + m_physicsController->SetMargin(collisionMargin); Py_RETURN_NONE; } @@ -3583,13 +3583,13 @@ PyObject *KX_GameObject::PyCollide(PyObject *value) return nullptr; } - if (!m_pPhysicsController || !other->GetPhysicsController()) { + if (!m_physicsController || !other->GetPhysicsController()) { PyErr_SetString(PyExc_TypeError, "expected objects with physics controller"); return nullptr; } PHY_IPhysicsEnvironment *env = scene->GetPhysicsEnvironment(); - PHY_CollisionTestResult testResult = env->CheckCollision(m_pPhysicsController, other->GetPhysicsController()); + PHY_CollisionTestResult testResult = env->CheckCollision(m_physicsController, other->GetPhysicsController()); PyObject *result = PyTuple_New(2); if (!testResult.collide) { @@ -3624,7 +3624,7 @@ PyObject *KX_GameObject::PyApplyImpulse(PyObject *args) mt::vec3 impulse; if (PyVecTo(pyattach, attach) && PyVecTo(pyimpulse, impulse)) { - m_pPhysicsController->ApplyImpulse(attach, impulse, (local!=0)); + m_physicsController->ApplyImpulse(attach, impulse, (local!=0)); Py_RETURN_NONE; } diff --git a/source/gameengine/Ketsji/KX_GameObject.h b/source/gameengine/Ketsji/KX_GameObject.h index feebec10616a..12466999bae0 100644 --- a/source/gameengine/Ketsji/KX_GameObject.h +++ b/source/gameengine/Ketsji/KX_GameObject.h @@ -101,15 +101,15 @@ class KX_GameObject : public SCA_IObject, public mt::SimdClassAllocator protected: - KX_ClientObjectInfo* m_pClient_info; + KX_ClientObjectInfo* m_client_info; std::string m_name; int m_layer; std::vector m_meshes; KX_LodManager *m_lodManager; short m_currentLodLevel; RAS_MeshUser *m_meshUser; - struct Object* m_pBlenderObject; - struct Object* m_pBlenderGroupObject; + struct Object* m_blenderObject; + struct Object* m_blenderGroupObject; bool m_bIsNegativeScaling; mt::vec4 m_objectColor; @@ -124,18 +124,18 @@ class KX_GameObject : public SCA_IObject, public mt::SimdClassAllocator bool m_autoUpdateBounds; - PHY_IPhysicsController* m_pPhysicsController; - PHY_IGraphicController* m_pGraphicController; + PHY_IPhysicsController* m_physicsController; + PHY_IGraphicController* m_graphicController; SG_CullingNode m_cullingNode; - SG_Node* m_pSGNode; + SG_Node* m_sgNode; EXP_ListValue *m_components; std::vector m_constraints; - EXP_ListValue *m_pInstanceObjects; - KX_GameObject* m_pDupliGroupObject; + EXP_ListValue *m_instanceObjects; + KX_GameObject* m_dupliGroupObject; // The action manager is used to play/stop/update actions BL_ActionManager* m_actionManager; @@ -183,7 +183,7 @@ class KX_GameObject : public SCA_IObject, public mt::SimdClassAllocator /** * Update the blender object obmat field from the object world position - * if blendobj is nullptr, update the object pointed by m_pBlenderObject + * if blendobj is nullptr, update the object pointed by m_blenderObject * The user must take action to restore the matrix before leaving the GE. * Used in Armature evaluation */ @@ -442,7 +442,7 @@ class KX_GameObject : public SCA_IObject, public mt::SimdClassAllocator void SetPhysicsController(PHY_IPhysicsController *physicscontroller) { - m_pPhysicsController = physicscontroller; + m_physicsController = physicscontroller; } virtual class RAS_Deformer* GetDeformer() @@ -464,12 +464,12 @@ class KX_GameObject : public SCA_IObject, public mt::SimdClassAllocator */ PHY_IGraphicController* GetGraphicController() { - return m_pGraphicController; + return m_graphicController; } void SetGraphicController(PHY_IGraphicController* graphiccontroller) { - m_pGraphicController = graphiccontroller; + m_graphicController = graphiccontroller; } /* * @add/remove the graphic controller to the physic system @@ -526,12 +526,12 @@ class KX_GameObject : public SCA_IObject, public mt::SimdClassAllocator SG_Node* GetSGNode( ) { - return m_pSGNode; + return m_sgNode; } const SG_Node* GetSGNode( ) const { - return m_pSGNode; + return m_sgNode; } /** @@ -540,29 +540,29 @@ class KX_GameObject : public SCA_IObject, public mt::SimdClassAllocator struct Object* GetBlenderObject( ) { - return m_pBlenderObject; + return m_blenderObject; } void SetBlenderObject(struct Object* obj) { - m_pBlenderObject = obj; + m_blenderObject = obj; } struct Object* GetBlenderGroupObject( ) { - return m_pBlenderGroupObject; + return m_blenderGroupObject; } void SetBlenderGroupObject(struct Object* obj) { - m_pBlenderGroupObject = obj; + m_blenderGroupObject = obj; } bool IsDupliGroup() { - return (m_pBlenderObject && - (m_pBlenderObject->transflag & OB_DUPLIGROUP) && - m_pBlenderObject->dup_group != nullptr) ? true : false; + return (m_blenderObject && + (m_blenderObject->transflag & OB_DUPLIGROUP) && + m_blenderObject->dup_group != nullptr) ? true : false; } /** @@ -575,7 +575,7 @@ class KX_GameObject : public SCA_IObject, public mt::SimdClassAllocator */ void SetSGNode(SG_Node* node ) { - m_pSGNode = node; + m_sgNode = node; } /// Is it a dynamic/physics object ? @@ -588,7 +588,7 @@ class KX_GameObject : public SCA_IObject, public mt::SimdClassAllocator */ bool IsVertexParent( ) { - return (m_pSGNode && m_pSGNode->GetSGParent() && m_pSGNode->GetSGParent()->IsVertexParent()); + return (m_sgNode && m_sgNode->GetSGParent() && m_sgNode->GetSGParent()->IsVertexParent()); } /// \see KX_RayCast @@ -888,7 +888,7 @@ class KX_GameObject : public SCA_IObject, public mt::SimdClassAllocator */ void SetUseDebugProperties(bool debug, bool recursive); - KX_ClientObjectInfo* getClientInfo() { return m_pClient_info; } + KX_ClientObjectInfo* getClientInfo() { return m_client_info; } std::vector GetChildren() const; std::vector GetChildrenRecursive() const; diff --git a/source/gameengine/Ketsji/KX_Scene.cpp b/source/gameengine/Ketsji/KX_Scene.cpp index ce3ae3c1ee11..a7a0d75d1dcb 100644 --- a/source/gameengine/Ketsji/KX_Scene.cpp +++ b/source/gameengine/Ketsji/KX_Scene.cpp @@ -1005,7 +1005,7 @@ bool KX_Scene::NewRemoveObject(KX_GameObject *gameobj) } } - /* If the object is the dupligroup proxy, you have to cleanup all m_pDupliGroupObject's in all + /* If the object is the dupligroup proxy, you have to cleanup all m_dupliGroupObject's in all * instances refering to this group. */ if (gameobj->GetInstanceObjects()) { for (KX_GameObject *instance : gameobj->GetInstanceObjects()) {