Improved Node interface
Former-commit-id: cbc204748d8cf30771743f26270324dee6ada242
This commit is contained in:
@@ -21,49 +21,46 @@ class NAZARA_API NzNode
|
||||
NzNode(const NzNode& node);
|
||||
virtual ~NzNode();
|
||||
|
||||
NzQuaternionf GetDerivedRotation() const;
|
||||
NzVector3f GetDerivedScale() const;
|
||||
NzVector3f GetDerivedTranslation() const;
|
||||
bool GetInheritPosition() const;
|
||||
bool GetInheritRotation() const;
|
||||
bool GetInheritScale() const;
|
||||
bool GetInheritTranslation() const;
|
||||
NzVector3f GetInitialPosition() const;
|
||||
NzQuaternionf GetInitialRotation() const;
|
||||
NzVector3f GetInitialScale() const;
|
||||
NzVector3f GetInitialTranslation() const;
|
||||
const NzNode* GetParent() const;
|
||||
NzQuaternionf GetRotation() const;
|
||||
NzVector3f GetScale() const;
|
||||
NzVector3f GetTranslation() const;
|
||||
NzVector3f GetPosition(nzCoordSys coordSys = nzCoordSys_Global) const;
|
||||
NzQuaternionf GetRotation(nzCoordSys coordSys = nzCoordSys_Global) const;
|
||||
NzVector3f GetScale(nzCoordSys coordSys = nzCoordSys_Global) const;
|
||||
const NzMatrix4f& GetTransformMatrix() const;
|
||||
|
||||
NzNode& Interpolate(const NzNode& nodeA, const NzNode& nodeB, float interpolation);
|
||||
|
||||
NzNode& Move(const NzVector3f& movement, nzCoordSys coordSys = nzCoordSys_Local);
|
||||
NzNode& Move(float movementX, float movementY, float movementZ, nzCoordSys coordSys = nzCoordSys_Local);
|
||||
|
||||
NzNode& Rotate(const NzQuaternionf& rotation, nzCoordSys coordSys = nzCoordSys_Local);
|
||||
|
||||
NzNode& Scale(const NzVector3f& scale);
|
||||
NzNode& Scale(float scale);
|
||||
NzNode& Scale(float scaleX, float scaleY, float scaleZ);
|
||||
|
||||
NzNode& Translate(const NzVector3f& movement, nzCoordSys coordSys = nzCoordSys_Local);
|
||||
NzNode& Translate(float movementX, float movementY, float movementZ, nzCoordSys coordSys = nzCoordSys_Local);
|
||||
|
||||
void SetInheritRotation(bool inheritRotation);
|
||||
void SetInheritScale(bool inheritScale);
|
||||
void SetInheritTranslation(bool inheritTranslation);
|
||||
void SetInheritPosition(bool inheritPosition);
|
||||
void SetInitialRotation(const NzQuaternionf& quat);
|
||||
void SetInitialScale(const NzVector3f& scale);
|
||||
void SetInitialScale(float scale);
|
||||
void SetInitialScale(float scaleX, float scaleY, float scaleZ);
|
||||
void SetInitialTranslation(const NzVector3f& translation);
|
||||
void SetInitialTranslation(float translationX, float translationXY, float translationZ);
|
||||
void SetInitialPosition(const NzVector3f& translation);
|
||||
void SetInitialPosition(float translationX, float translationXY, float translationZ);
|
||||
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);
|
||||
void SetPosition(float translationX, float translationXY, float translationZ, nzCoordSys coordSys = nzCoordSys_Local);
|
||||
void SetRotation(const NzQuaternionf& quat, nzCoordSys coordSys = nzCoordSys_Local);
|
||||
void SetScale(const NzVector3f& scale, nzCoordSys coordSys = nzCoordSys_Local);
|
||||
void SetScale(float scale, nzCoordSys coordSys = nzCoordSys_Local);
|
||||
void SetScale(float scaleX, float scaleY, float scaleZ, nzCoordSys coordSys = nzCoordSys_Local);
|
||||
void SetTranslation(const NzVector3f& translation, nzCoordSys coordSys = nzCoordSys_Local);
|
||||
void SetTranslation(float translationX, float translationXY, float translationZ, nzCoordSys coordSys = nzCoordSys_Local);
|
||||
|
||||
NzNode& operator=(const NzNode& node);
|
||||
|
||||
@@ -80,17 +77,17 @@ class NAZARA_API NzNode
|
||||
NzQuaternionf m_initialRotation;
|
||||
NzQuaternionf m_rotation;
|
||||
NzString m_name;
|
||||
mutable NzVector3f m_derivedTranslation;
|
||||
mutable NzVector3f m_derivedPosition;
|
||||
mutable NzVector3f m_derivedScale;
|
||||
NzVector3f m_initialPosition;
|
||||
NzVector3f m_initialScale;
|
||||
NzVector3f m_initialTranslation;
|
||||
NzVector3f m_position;
|
||||
NzVector3f m_scale;
|
||||
NzVector3f m_translation;
|
||||
const NzNode* m_parent;
|
||||
mutable bool m_derivedUpdated;
|
||||
bool m_inheritPosition;
|
||||
bool m_inheritRotation;
|
||||
bool m_inheritScale;
|
||||
bool m_inheritTranslation;
|
||||
mutable bool m_matrixUpdated;
|
||||
};
|
||||
|
||||
|
||||
@@ -22,8 +22,8 @@ struct NzSequence
|
||||
struct NzSequenceJoint
|
||||
{
|
||||
NzQuaternionf rotation;
|
||||
NzVector3f position;
|
||||
NzVector3f scale;
|
||||
NzVector3f translation;
|
||||
};
|
||||
|
||||
#endif // NAZARA_SEQUENCE_HPP
|
||||
|
||||
Reference in New Issue
Block a user