mirror of
https://github.com/AxioDL/PrimeWorldEditor.git
synced 2025-12-20 18:29:13 +00:00
Split off lots of editor functionality into new abstract INodeEditor class and viewport functionality into CBasicViewport class; added viewport subclasses and undo/redo system in the World Editor
This commit is contained in:
34
UI/undo/CScaleNodeCommand.h
Normal file
34
UI/undo/CScaleNodeCommand.h
Normal file
@@ -0,0 +1,34 @@
|
||||
#ifndef CSCALENODECOMMAND_H
|
||||
#define CSCALENODECOMMAND_H
|
||||
|
||||
#include <QUndoCommand>
|
||||
#include <QList>
|
||||
#include <Scene/CSceneNode.h>
|
||||
#include "../INodeEditor.h"
|
||||
|
||||
class CScaleNodeCommand : public QUndoCommand
|
||||
{
|
||||
struct SNodeScale
|
||||
{
|
||||
CSceneNode *pNode;
|
||||
CVector3f initialPos;
|
||||
CVector3f initialScale;
|
||||
CVector3f newPos;
|
||||
CVector3f newScale;
|
||||
};
|
||||
QList<SNodeScale> mNodeList;
|
||||
INodeEditor *mpEditor;
|
||||
bool mCommandEnded;
|
||||
|
||||
public:
|
||||
CScaleNodeCommand();
|
||||
CScaleNodeCommand(INodeEditor *pEditor, const QList<CSceneNode*>& nodes, const CVector3f& pivot, const CVector3f& delta);
|
||||
~CScaleNodeCommand();
|
||||
int id() const;
|
||||
bool mergeWith(const QUndoCommand *other);
|
||||
void undo();
|
||||
void redo();
|
||||
static CScaleNodeCommand* End();
|
||||
};
|
||||
|
||||
#endif // CScaleNODECOMMAND_H
|
||||
Reference in New Issue
Block a user