diff --git a/.clang-format b/.clang-format index 5772a80f40..38d035bb50 100644 --- a/.clang-format +++ b/.clang-format @@ -102,3 +102,4 @@ UseTab: Never StatementMacros: - META_Object - META_StateAttribute + - META_Node diff --git a/apps/openmw/mwrender/skyutil.hpp b/apps/openmw/mwrender/skyutil.hpp index d2146e5ae6..84e88c8379 100644 --- a/apps/openmw/mwrender/skyutil.hpp +++ b/apps/openmw/mwrender/skyutil.hpp @@ -187,7 +187,7 @@ namespace MWRender META_Node(MWRender, CameraRelativeTransform) - const osg::Vec3f& getLastViewPoint() const; + const osg::Vec3f& getLastViewPoint() const; bool computeLocalToWorldMatrix(osg::Matrix& matrix, osg::NodeVisitor* nv) const override; diff --git a/components/nifosg/matrixtransform.hpp b/components/nifosg/matrixtransform.hpp index 2447fdaa49..e1e7ff1828 100644 --- a/components/nifosg/matrixtransform.hpp +++ b/components/nifosg/matrixtransform.hpp @@ -17,12 +17,12 @@ namespace NifOsg META_Node(NifOsg, MatrixTransform) - // Hack: account for Transform differences between OSG and NIFs. - // OSG uses a 4x4 matrix, NIF's use a 3x3 rotationScale, float scale, and vec3 position. - // Decomposing the original components from the 4x4 matrix isn't possible, which causes - // problems when a KeyframeController wants to change only one of these components. So - // we store the scale and rotation components separately here. - float mScale{ 0.f }; + // Hack: account for Transform differences between OSG and NIFs. + // OSG uses a 4x4 matrix, NIF's use a 3x3 rotationScale, float scale, and vec3 position. + // Decomposing the original components from the 4x4 matrix isn't possible, which causes + // problems when a KeyframeController wants to change only one of these components. So + // we store the scale and rotation components separately here. + float mScale{ 0.f }; Nif::Matrix3 mRotationScale; // Utility methods to transform the node and keep these components up-to-date. diff --git a/components/sceneutil/lightmanager.hpp b/components/sceneutil/lightmanager.hpp index 3c6ccf6350..133ce66750 100644 --- a/components/sceneutil/lightmanager.hpp +++ b/components/sceneutil/lightmanager.hpp @@ -126,7 +126,7 @@ namespace SceneUtil public: META_Node(SceneUtil, LightSource) - LightSource(); + LightSource(); LightSource(const LightSource& copy, const osg::CopyOp& copyop); @@ -219,7 +219,7 @@ namespace SceneUtil META_Node(SceneUtil, LightManager) - LightManager(bool ffp = true); + LightManager(bool ffp = true); LightManager(const LightManager& copy, const osg::CopyOp& copyop); diff --git a/components/sceneutil/positionattitudetransform.hpp b/components/sceneutil/positionattitudetransform.hpp index 0fd924e5fe..015f58fdff 100644 --- a/components/sceneutil/positionattitudetransform.hpp +++ b/components/sceneutil/positionattitudetransform.hpp @@ -24,7 +24,7 @@ namespace SceneUtil META_Node(SceneUtil, PositionAttitudeTransform) - inline void setPosition(const osg::Vec3f& pos) + inline void setPosition(const osg::Vec3f& pos) { _position = pos; dirtyBound(); diff --git a/components/sceneutil/skeleton.hpp b/components/sceneutil/skeleton.hpp index b141c1e0d6..e7027cc0c2 100644 --- a/components/sceneutil/skeleton.hpp +++ b/components/sceneutil/skeleton.hpp @@ -37,8 +37,8 @@ namespace SceneUtil META_Node(SceneUtil, Skeleton) - /// Retrieve a bone by name. - Bone* getBone(const std::string& name); + /// Retrieve a bone by name. + Bone* getBone(const std::string& name); /// Request an update of bone matrices. May be a no-op if already updated in this frame. void updateBoneMatrices(unsigned int traversalNumber);