You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
52 lines
905 B
C++
52 lines
905 B
C++
#pragma once
|
|
|
|
#include "actionitem.h"
|
|
|
|
namespace NAction
|
|
{
|
|
|
|
/**
|
|
* 网格修改类,我们只备份修改参数
|
|
* 其它图元修改,我们都是直接备份的,但是到了网格这里,由于它内存占用非常高,如果也这么做,会导致内存占用大增
|
|
*/
|
|
class CActionModifiedMeshItem : public CActionItem
|
|
{
|
|
public:
|
|
CActionModifiedMeshItem();
|
|
CActionModifiedMeshItem(CSigmaDoc * ppDoc, UINT actionType);
|
|
|
|
std::string GetActionName() const override
|
|
{
|
|
return typeid(*this).name();
|
|
}
|
|
|
|
/**
|
|
* 备份旧参数
|
|
*
|
|
* \param pOne 要被备份的网格对象
|
|
*/
|
|
void BackupOldArguments(COne* pOne);
|
|
|
|
/**
|
|
* 备份新参数
|
|
*
|
|
*/
|
|
void BackupNewArguments();
|
|
|
|
void Undo(void) override;
|
|
void Redo(void) override;
|
|
|
|
void accept(CActionVisitor& visitor) override;
|
|
|
|
friend class BlobSerializer;
|
|
private:
|
|
CString GetArguments() const;
|
|
void SetArguments(CString& arguments);
|
|
|
|
COne* m_pOne = nullptr;
|
|
CString m_oldArguments;
|
|
CString m_newArguments;
|
|
};
|
|
|
|
}
|