Added Node::Get*Direction*
Former-commit-id: e9c4f04da7b92965dc1236313ddebf66d0eaad8d
This commit is contained in:
@@ -60,11 +60,35 @@ void NzNode::EnsureTransformMatrixUpdate() const
|
||||
UpdateTransformMatrix();
|
||||
}
|
||||
|
||||
NzVector3f NzNode::GetBackward() const
|
||||
{
|
||||
if (!m_derivedUpdated)
|
||||
UpdateDerived();
|
||||
|
||||
return m_derivedRotation * NzVector3f::Backward();
|
||||
}
|
||||
|
||||
const std::vector<NzNode*>& NzNode::GetChilds() const
|
||||
{
|
||||
return m_childs;
|
||||
}
|
||||
|
||||
NzVector3f NzNode::GetDown() const
|
||||
{
|
||||
if (!m_derivedUpdated)
|
||||
UpdateDerived();
|
||||
|
||||
return m_derivedRotation * NzVector3f::Down();
|
||||
}
|
||||
|
||||
NzVector3f NzNode::GetForward() const
|
||||
{
|
||||
if (!m_derivedUpdated)
|
||||
UpdateDerived();
|
||||
|
||||
return m_derivedRotation * NzVector3f::Forward();
|
||||
}
|
||||
|
||||
bool NzNode::GetInheritPosition() const
|
||||
{
|
||||
return m_inheritPosition;
|
||||
@@ -95,6 +119,14 @@ NzVector3f NzNode::GetInitialScale() const
|
||||
return m_initialScale;
|
||||
}
|
||||
|
||||
NzVector3f NzNode::GetLeft() const
|
||||
{
|
||||
if (!m_derivedUpdated)
|
||||
UpdateDerived();
|
||||
|
||||
return m_derivedRotation * NzVector3f::Left();
|
||||
}
|
||||
|
||||
const NzString& NzNode::GetName() const
|
||||
{
|
||||
return m_name;
|
||||
@@ -128,6 +160,14 @@ NzVector3f NzNode::GetPosition(nzCoordSys coordSys) const
|
||||
return NzVector3f();
|
||||
}
|
||||
|
||||
NzVector3f NzNode::GetRight() const
|
||||
{
|
||||
if (!m_derivedUpdated)
|
||||
UpdateDerived();
|
||||
|
||||
return m_derivedRotation * NzVector3f::Right();
|
||||
}
|
||||
|
||||
NzQuaternionf NzNode::GetRotation(nzCoordSys coordSys) const
|
||||
{
|
||||
switch (coordSys)
|
||||
@@ -172,6 +212,14 @@ const NzMatrix4f& NzNode::GetTransformMatrix() const
|
||||
return m_transformMatrix;
|
||||
}
|
||||
|
||||
NzVector3f NzNode::GetUp() const
|
||||
{
|
||||
if (!m_derivedUpdated)
|
||||
UpdateDerived();
|
||||
|
||||
return m_derivedRotation * NzVector3f::Up();
|
||||
}
|
||||
|
||||
bool NzNode::HasChilds() const
|
||||
{
|
||||
return !m_childs.empty();
|
||||
|
||||
Reference in New Issue
Block a user