~HistoryHandler();
void CleanHistory();
StateType* Undo(StateType* State);
+ StateType* UndoKeepCurrent();
StateType* Redo(StateType* State);
+ StateType* RedoKeepCurrent();
void Save(StateType* State);
StateType* GetPrevious();
StateType* GetNext();
MeshManagerModel(std::vector<vtkPolyData*> meshList);
~MeshManagerModel();
+ void SetHistory(int maxCapacity);
void ResetHistory();
void ResetAll();
+ void SetReferencePoint(std::vector<double> point);
+ std::vector<double> GetReferencePoint();
+ void SetReferenceNormal(std::vector<double> normal);
+ std::vector<double> GetReferenceNormal();
+
void SetMeshBase(vtkPolyData* mesh);
void SetMeshMemoryMode(vtkPolyData* mesh);
+ void MeshMemoryModeOn();
+ void MeshMemoryModeOff();
void CopySetMeshBase(vtkPolyData* mesh);
void ResetMeshTemp();
//void ResetMeshTemp_();
void NextMesh();
void PreviousMesh();
+ void SaveMemoryMode();
void Undo();
void Redo();
int currentMesh;
int meshId;
int lastModified;
+ bool memoryMode;
+ std::vector<double> referencePoint;
+ std::vector<double> referenceNormal;
class ManagerState{
public:
ManagerState(std::vector<std::shared_ptr<MeshModel>> meshesToSave, int meshId, int modifiedId);
+ ManagerState(std::vector<std::shared_ptr<MeshModel>> meshesToSave, int meshId, int modifiedId, std::vector<double> refPoint, std::vector<double> refNormal);
~ManagerState();
std::vector<std::shared_ptr<MeshModel>>& GetMeshes();
int GetMeshId();
int GetModifiedPos();
- private:
+ std::vector<double>& GetReferencePoint();
+
std::vector<std::shared_ptr<MeshModel>> savedMeshes;
int savedModifiedPos;
int savedId;
+ std::vector<double> referencePoint;
+ std::vector<double> referenceNormal;
};
void Save();
void RestoreState(ManagerState* state);
+ void RestoreStateMemoryMode(ManagerState* state);
HistoryHandler<ManagerState> *history;