Utility/Node: Add a constructor taking translation/rotation/scale
This commit is contained in:
parent
0656b388bc
commit
40b6102977
|
|
@ -16,7 +16,7 @@ namespace Nz
|
|||
class NAZARA_UTILITY_API NodeComponent : public Node
|
||||
{
|
||||
public:
|
||||
NodeComponent() = default;
|
||||
using Node::Node;
|
||||
NodeComponent(const NodeComponent&) = default;
|
||||
NodeComponent(NodeComponent&&) noexcept = default;
|
||||
~NodeComponent() = default;
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ namespace Nz
|
|||
public:
|
||||
enum class Invalidation;
|
||||
|
||||
inline Node();
|
||||
inline Node(const Vector3f& translation = Vector3f::Zero(), const Quaternionf& rotation = Quaternionf::Identity(), const Vector3f& scale = Vector3f::Unit());
|
||||
inline Node(const Node& node);
|
||||
inline Node(Node&& node) noexcept;
|
||||
virtual ~Node();
|
||||
|
|
|
|||
|
|
@ -9,13 +9,13 @@
|
|||
|
||||
namespace Nz
|
||||
{
|
||||
inline Node::Node() :
|
||||
inline Node::Node(const Vector3f& translation, const Quaternionf& rotation, const Vector3f& scale) :
|
||||
m_initialRotation(Quaternionf::Identity()),
|
||||
m_rotation(Quaternionf::Identity()),
|
||||
m_rotation(rotation),
|
||||
m_initialPosition(Vector3f::Zero()),
|
||||
m_initialScale(Vector3f(1.f, 1.f, 1.f)),
|
||||
m_position(Vector3f::Zero()),
|
||||
m_scale(Vector3f(1.f, 1.f, 1.f)),
|
||||
m_position(translation),
|
||||
m_scale(scale),
|
||||
m_parent(nullptr),
|
||||
m_derivedUpdated(false),
|
||||
m_inheritPosition(true),
|
||||
|
|
|
|||
Loading…
Reference in New Issue