Utility/Node: Get[Position|Rotation|Scale) now defaults to local space

This commit is contained in:
Lynix 2019-12-12 09:56:43 +01:00
parent bcc10a1ee2
commit 1dbe71474d
4 changed files with 6 additions and 5 deletions

View File

@ -203,6 +203,7 @@ Nazara Engine:
- ⚠ Constraint2D are no longer managed by references and are now handled objects - ⚠ Constraint2D are no longer managed by references and are now handled objects
- ⚠ Removed all Set methods from math classes taking their own type (e.g. Box::Set(Box)) - ⚠ Removed all Set methods from math classes taking their own type (e.g. Box::Set(Box))
- Added Matrix4::Decompose - Added Matrix4::Decompose
- ⚠ Node::Get[Position|Rotation|Scale] now defaults to local space
Nazara Development Kit: Nazara Development Kit:
- Added ImageWidget (#139) - Added ImageWidget (#139)

View File

@ -59,7 +59,7 @@ namespace Ndk
{ {
WidgetEntry& entry = m_widgetEntries[index]; WidgetEntry& entry = m_widgetEntries[index];
Nz::Vector3f pos = entry.widget->GetPosition(); Nz::Vector3f pos = entry.widget->GetPosition(Nz::CoordSys_Global);
Nz::Vector2f size = entry.widget->GetSize(); Nz::Vector2f size = entry.widget->GetSize();
entry.box.Set(pos.x, pos.y, pos.z, size.x, size.y, 1.f); entry.box.Set(pos.x, pos.y, pos.z, size.x, size.y, 1.f);

View File

@ -336,7 +336,7 @@ namespace Ndk
if (IsRegisteredToCanvas()) if (IsRegisteredToCanvas())
m_canvas->NotifyWidgetBoxUpdate(m_canvasIndex); m_canvas->NotifyWidgetBoxUpdate(m_canvasIndex);
Nz::Vector2f widgetPos = Nz::Vector2f(GetPosition()); Nz::Vector2f widgetPos = Nz::Vector2f(GetPosition(Nz::CoordSys_Global));
Nz::Vector2f widgetSize = GetSize(); Nz::Vector2f widgetSize = GetSize();
Nz::Rectf widgetRect(widgetPos.x, widgetPos.y, widgetSize.x, widgetSize.y); Nz::Rectf widgetRect(widgetPos.x, widgetPos.y, widgetSize.x, widgetSize.y);

View File

@ -41,10 +41,10 @@ namespace Nz
virtual Vector3f GetLeft() const; virtual Vector3f GetLeft() const;
virtual NodeType GetNodeType() const; virtual NodeType GetNodeType() const;
const Node* GetParent() const; const Node* GetParent() const;
Vector3f GetPosition(CoordSys coordSys = CoordSys_Global) const; Vector3f GetPosition(CoordSys coordSys = CoordSys_Local) const;
virtual Vector3f GetRight() const; virtual Vector3f GetRight() const;
Quaternionf GetRotation(CoordSys coordSys = CoordSys_Global) const; Quaternionf GetRotation(CoordSys coordSys = CoordSys_Local) const;
Vector3f GetScale(CoordSys coordSys = CoordSys_Global) const; Vector3f GetScale(CoordSys coordSys = CoordSys_Local) const;
const Matrix4f& GetTransformMatrix() const; const Matrix4f& GetTransformMatrix() const;
virtual Vector3f GetUp() const; virtual Vector3f GetUp() const;