[Bf-blender-cvs] [88d05a9] temp-bge-cleanup: Special cleanup for BL_DeformableGameObject
Porteries Tristan
noreply at git.blender.org
Mon May 4 21:07:41 CEST 2015
Commit: 88d05a92289751142108de7f0303e778ac5627e7
Author: Porteries Tristan
Date: Mon May 4 20:47:12 2015 +0200
Branches: temp-bge-cleanup
https://developer.blender.org/rB88d05a92289751142108de7f0303e778ac5627e7
Special cleanup for BL_DeformableGameObject
===================================================================
M source/gameengine/Converter/BL_DeformableGameObject.cpp
M source/gameengine/Converter/BL_DeformableGameObject.h
===================================================================
diff --git a/source/gameengine/Converter/BL_DeformableGameObject.cpp b/source/gameengine/Converter/BL_DeformableGameObject.cpp
index b3c34a0..e8f4112 100644
--- a/source/gameengine/Converter/BL_DeformableGameObject.cpp
+++ b/source/gameengine/Converter/BL_DeformableGameObject.cpp
@@ -66,8 +66,7 @@ bool BL_DeformableGameObject::SetActiveAction(BL_ShapeActionActuator *act, short
m_activeAct = NULL;
}
- if (priority <= m_activePriority)
- {
+ if (priority <= m_activePriority) {
if (m_activeAct && (m_activeAct != act))
m_activeAct->SetBlendTime(0.0f); /* Reset the blend timer */
m_activeAct = act;
@@ -86,16 +85,13 @@ bool BL_DeformableGameObject::GetShape(vector<float> &shape)
{
shape.clear();
BL_ShapeDeformer *shape_deformer = dynamic_cast<BL_ShapeDeformer *>(m_pDeformer);
- if (shape_deformer)
- {
+ if (shape_deformer) {
// this check is normally superfluous: a shape deformer can only be created if the mesh
// has relative keys
Key *key = shape_deformer->GetKey();
- if (key && key->type == KEY_RELATIVE)
- {
+ if (key && key->type == KEY_RELATIVE) {
KeyBlock *kb;
- for (kb = (KeyBlock *)key->block.first; kb; kb = (KeyBlock *)kb->next)
- {
+ for (kb = (KeyBlock *)key->block.first; kb; kb = (KeyBlock *)kb->next) {
shape.push_back(kb->curval);
}
}
@@ -108,9 +104,7 @@ void BL_DeformableGameObject::SetDeformer(class RAS_Deformer *deformer)
m_pDeformer = deformer;
SG_QList::iterator<RAS_MeshSlot> mit(m_meshSlots);
- for (mit.begin(); !mit.end(); ++mit)
- {
+ for (mit.begin(); !mit.end(); ++mit) {
(*mit)->SetDeformer(deformer);
}
}
-
diff --git a/source/gameengine/Converter/BL_DeformableGameObject.h b/source/gameengine/Converter/BL_DeformableGameObject.h
index 6ed848a..8893292 100644
--- a/source/gameengine/Converter/BL_DeformableGameObject.h
+++ b/source/gameengine/Converter/BL_DeformableGameObject.h
@@ -43,6 +43,7 @@
#include <vector>
class BL_ShapeActionActuator;
+class RAS_Deformer;
struct Key;
class BL_DeformableGameObject : public KX_GameObject
@@ -70,19 +71,20 @@ public:
KX_GameObject(sgReplicationInfo, callbacks),
m_pDeformer(NULL),
m_activeAct(NULL),
- m_lastframe(0.0),
+ m_lastframe(0.0f),
m_blendobj(blendobj),
m_activePriority(9999)
{
m_isDeformable = true;
- };
+ }
virtual ~BL_DeformableGameObject();
- bool SetActiveAction(class BL_ShapeActionActuator *act, short priority, double curtime);
+
+ bool SetActiveAction(BL_ShapeActionActuator *act, short priority, double curtime);
bool GetShape(vector<float> &shape);
- virtual void SetDeformer(class RAS_Deformer *deformer);
- virtual class RAS_Deformer *GetDeformer()
+ virtual void SetDeformer(RAS_Deformer *deformer);
+ virtual RAS_Deformer *GetDeformer()
{
return m_pDeformer;
}
@@ -93,7 +95,7 @@ protected:
RAS_Deformer *m_pDeformer;
- class BL_ShapeActionActuator *m_activeAct;
+ BL_ShapeActionActuator *m_activeAct;
double m_lastframe;
Object *m_blendobj;
short m_activePriority;
More information about the Bf-blender-cvs
mailing list