diff --git a/src/Core/Scene/CSceneNode.cpp b/src/Core/Scene/CSceneNode.cpp index d67c5197..4260a5ef 100644 --- a/src/Core/Scene/CSceneNode.cpp +++ b/src/Core/Scene/CSceneNode.cpp @@ -13,21 +13,9 @@ uint32 CSceneNode::smNumNodes = 0; CColor CSceneNode::skSelectionTint = CColor::Integral(39, 154, 167); CSceneNode::CSceneNode(CScene *pScene, uint32 NodeID, CSceneNode *pParent) - : mpScene(pScene) + : _mID(NodeID) , mpParent(pParent) - , _mID(NodeID) - , mPosition(CVector3f::skZero) - , mRotation(CQuaternion::skIdentity) - , mScale(CVector3f::skOne) - , _mTransformDirty(true) - , _mInheritsPosition(true) - , _mInheritsRotation(true) - , _mInheritsScale(true) - , mLightLayerIndex(0) - , mLightCount(0) - , mMouseHovering(false) - , mSelected(false) - , mVisible(true) + , mpScene(pScene) { smNumNodes++; diff --git a/src/Core/Scene/CSceneNode.h b/src/Core/Scene/CSceneNode.h index 802b82d9..8c062a8b 100644 --- a/src/Core/Scene/CSceneNode.h +++ b/src/Core/Scene/CSceneNode.h @@ -71,11 +71,11 @@ class CSceneNode : public IRenderable private: mutable CTransform4f _mCachedTransform; mutable CAABox _mCachedAABox; - mutable bool _mTransformDirty; + mutable bool _mTransformDirty = true; - bool _mInheritsPosition; - bool _mInheritsRotation; - bool _mInheritsScale; + bool _mInheritsPosition = true; + bool _mInheritsRotation = true; + bool _mInheritsScale = true; uint32 _mID; @@ -85,18 +85,18 @@ protected: CSceneNode *mpParent; CScene *mpScene; - CVector3f mPosition; - CQuaternion mRotation; - CVector3f mScale; + CVector3f mPosition{CVector3f::skZero}; + CQuaternion mRotation{CQuaternion::skIdentity}; + CVector3f mScale{CVector3f::skOne}; CAABox mLocalAABox; - bool mMouseHovering; - bool mSelected; - bool mVisible; + bool mMouseHovering = false; + bool mSelected = false; + bool mVisible = true; std::list mChildren; - uint32 mLightLayerIndex; - uint32 mLightCount; + uint32 mLightLayerIndex = 0; + uint32 mLightCount = 0; CLight* mLights[8]; CColor mAmbientColor;