Utility/Node: Get[Position|Rotation|Scale) now defaults to local space
This commit is contained in:
parent
bcc10a1ee2
commit
1dbe71474d
|
|
@ -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)
|
||||||
|
|
|
||||||
|
|
@ -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);
|
||||||
|
|
|
||||||
|
|
@ -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);
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue