mirror of
https://github.com/AxioDL/PrimeWorldEditor.git
synced 2025-07-03 11:45:59 +00:00
CRotateNodeCommand: Make use of override where applicable
This commit is contained in:
parent
c118703ce5
commit
fc2d48df87
@ -3,9 +3,7 @@
|
|||||||
#include "Editor/INodeEditor.h"
|
#include "Editor/INodeEditor.h"
|
||||||
|
|
||||||
CRotateNodeCommand::CRotateNodeCommand()
|
CRotateNodeCommand::CRotateNodeCommand()
|
||||||
: IUndoCommand("Rotate"),
|
: IUndoCommand("Rotate")
|
||||||
mpEditor(nullptr),
|
|
||||||
mCommandEnded(false)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -19,8 +17,7 @@ CRotateNodeCommand::CRotateNodeCommand(
|
|||||||
ETransformSpace TransformSpace
|
ETransformSpace TransformSpace
|
||||||
)
|
)
|
||||||
: IUndoCommand("Rotate"),
|
: IUndoCommand("Rotate"),
|
||||||
mpEditor(pEditor),
|
mpEditor(pEditor)
|
||||||
mCommandEnded(false)
|
|
||||||
{
|
{
|
||||||
mNodeList.reserve(rkNodes.size());
|
mNodeList.reserve(rkNodes.size());
|
||||||
|
|
||||||
|
@ -18,18 +18,19 @@ class CRotateNodeCommand : public IUndoCommand
|
|||||||
CQuaternion NewRot;
|
CQuaternion NewRot;
|
||||||
};
|
};
|
||||||
QList<SNodeRotate> mNodeList;
|
QList<SNodeRotate> mNodeList;
|
||||||
INodeEditor *mpEditor;
|
INodeEditor *mpEditor = nullptr;
|
||||||
bool mCommandEnded;
|
bool mCommandEnded = false;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CRotateNodeCommand();
|
CRotateNodeCommand();
|
||||||
CRotateNodeCommand(INodeEditor *pEditor, const QList<CSceneNode*>& rkNodes, bool UsePivot, const CVector3f& rkPivot, const CQuaternion& rkPivotRotation, const CQuaternion& rkDelta, ETransformSpace TransformSpace);
|
CRotateNodeCommand(INodeEditor *pEditor, const QList<CSceneNode*>& rkNodes, bool UsePivot, const CVector3f& rkPivot, const CQuaternion& rkPivotRotation, const CQuaternion& rkDelta, ETransformSpace TransformSpace);
|
||||||
~CRotateNodeCommand();
|
~CRotateNodeCommand() override;
|
||||||
int id() const;
|
|
||||||
bool mergeWith(const QUndoCommand *pkOther);
|
int id() const override;
|
||||||
void undo();
|
bool mergeWith(const QUndoCommand *pkOther) override;
|
||||||
void redo();
|
void undo() override;
|
||||||
bool AffectsCleanState() const { return true; }
|
void redo() override;
|
||||||
|
bool AffectsCleanState() const override { return true; }
|
||||||
static CRotateNodeCommand* End();
|
static CRotateNodeCommand* End();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user