Moved name attribute from Node to SceneNode
Former-commit-id: 6f920af67cd6c339d132a67b364742fdf172d5e9
This commit is contained in:
parent
e46cb43ef5
commit
090263d847
|
|
@ -18,7 +18,7 @@ class NzScene;
|
|||
|
||||
class NAZARA_API NzSceneNode : public NzNode
|
||||
{
|
||||
friend class NzScene;
|
||||
friend NzScene;
|
||||
|
||||
public:
|
||||
NzSceneNode();
|
||||
|
|
@ -39,6 +39,7 @@ class NAZARA_API NzSceneNode : public NzNode
|
|||
NzVector3f GetDown() const;
|
||||
NzVector3f GetForward() const;
|
||||
NzVector3f GetLeft() const;
|
||||
const NzString& GetName() const;
|
||||
nzNodeType GetNodeType() const final;
|
||||
NzVector3f GetRight() const;
|
||||
NzScene* GetScene() const;
|
||||
|
|
@ -51,6 +52,8 @@ class NAZARA_API NzSceneNode : public NzNode
|
|||
bool IsDrawingEnabled() const;
|
||||
bool IsVisible() const;
|
||||
|
||||
void SetName(const NzString& name);
|
||||
|
||||
NzSceneNode& operator=(const NzSceneNode& sceneNode);
|
||||
NzSceneNode& operator=(NzSceneNode&& sceneNode) = delete;
|
||||
|
||||
|
|
@ -75,6 +78,8 @@ class NAZARA_API NzSceneNode : public NzNode
|
|||
|
||||
private:
|
||||
void UpdateVisibility(const NzFrustumf& frustum);
|
||||
|
||||
NzString m_name;
|
||||
};
|
||||
|
||||
#endif // NAZARA_SCENENODE_HPP
|
||||
|
|
|
|||
|
|
@ -35,7 +35,6 @@ class NAZARA_API NzNode
|
|||
NzQuaternionf GetInitialRotation() const;
|
||||
NzVector3f GetInitialScale() const;
|
||||
virtual NzVector3f GetLeft() const;
|
||||
const NzString& GetName() const;
|
||||
virtual nzNodeType GetNodeType() const;
|
||||
const NzNode* GetParent() const;
|
||||
NzVector3f GetPosition(nzCoordSys coordSys = nzCoordSys_Global) const;
|
||||
|
|
@ -67,7 +66,6 @@ class NAZARA_API NzNode
|
|||
void SetInitialScale(float scaleX, float scaleY, float scaleZ = 1.f);
|
||||
void SetInitialPosition(const NzVector3f& translation);
|
||||
void SetInitialPosition(float translationX, float translationXY, float translationZ = 0.f);
|
||||
void SetName(const NzString& name);
|
||||
void SetParent(const NzNode* node = nullptr, bool keepDerived = false);
|
||||
void SetParent(const NzNode& node, bool keepDerived = false);
|
||||
void SetPosition(const NzVector3f& translation, nzCoordSys coordSys = nzCoordSys_Local);
|
||||
|
|
@ -103,7 +101,6 @@ class NAZARA_API NzNode
|
|||
mutable NzQuaternionf m_derivedRotation;
|
||||
NzQuaternionf m_initialRotation;
|
||||
NzQuaternionf m_rotation;
|
||||
NzString m_name;
|
||||
mutable NzVector3f m_derivedPosition;
|
||||
mutable NzVector3f m_derivedScale;
|
||||
NzVector3f m_initialPosition;
|
||||
|
|
|
|||
|
|
@ -93,6 +93,11 @@ NzVector3f NzSceneNode::GetLeft() const
|
|||
return NzNode::GetLeft();
|
||||
}
|
||||
|
||||
const NzString& NzSceneNode::GetName() const
|
||||
{
|
||||
return m_name;
|
||||
}
|
||||
|
||||
nzNodeType NzSceneNode::GetNodeType() const
|
||||
{
|
||||
return nzNodeType_Scene;
|
||||
|
|
@ -139,6 +144,11 @@ bool NzSceneNode::IsVisible() const
|
|||
return m_visible;
|
||||
}
|
||||
|
||||
void NzSceneNode::SetName(const NzString& name)
|
||||
{
|
||||
m_name = name;
|
||||
}
|
||||
|
||||
NzSceneNode& NzSceneNode::operator=(const NzSceneNode& sceneNode)
|
||||
{
|
||||
NzNode::operator=(sceneNode);
|
||||
|
|
|
|||
|
|
@ -125,11 +125,6 @@ NzVector3f NzNode::GetLeft() const
|
|||
return m_derivedRotation * NzVector3f::Left();
|
||||
}
|
||||
|
||||
const NzString& NzNode::GetName() const
|
||||
{
|
||||
return m_name;
|
||||
}
|
||||
|
||||
nzNodeType NzNode::GetNodeType() const
|
||||
{
|
||||
return nzNodeType_Default;
|
||||
|
|
@ -413,11 +408,6 @@ void NzNode::SetInitialScale(float scaleX, float scaleY, float scaleZ)
|
|||
InvalidateNode();
|
||||
}
|
||||
|
||||
void NzNode::SetName(const NzString& name)
|
||||
{
|
||||
m_name = name;
|
||||
}
|
||||
|
||||
void NzNode::SetParent(const NzNode* node, bool keepDerived)
|
||||
{
|
||||
#if NAZARA_UTILITY_SAFE
|
||||
|
|
@ -621,7 +611,6 @@ NzNode& NzNode::operator=(const NzNode& node)
|
|||
m_initialPosition = node.m_initialPosition;
|
||||
m_initialRotation = node.m_initialRotation;
|
||||
m_initialScale = node.m_initialScale;
|
||||
m_name = node.m_name;
|
||||
m_position = node.m_position;
|
||||
m_rotation = node.m_rotation;
|
||||
m_scale = node.m_scale;
|
||||
|
|
|
|||
Loading…
Reference in New Issue