MeshLib C++ Docs
Loading...
Searching...
No Matches
MR::PartialChangeMeshAction Class Reference

Undo action for efficiently storage of partial change in mesh (e.g. a modification of small region) More...

#include <MRPartialChangeMeshAction.h>

+ Inheritance diagram for MR::PartialChangeMeshAction:

Public Member Functions

 PartialChangeMeshAction (std::string name, std::shared_ptr< ObjectMesh > obj, CmpOld, const Mesh &oldMesh)
 
 PartialChangeMeshAction (std::string name, std::shared_ptr< ObjectMesh > obj, SetNew, std::shared_ptr< Mesh > &&newMesh)
 use this constructor to set new object's mesh and remember its difference from existed mesh for future undoing
 
virtual std::string name () const override
 
virtual void action (HistoryAction::Type) override
 This function is called on history action (undo, redo, etc.)
 
virtual size_t heapBytes () const override
 returns the amount of memory this object occupies on heap
 
- Public Member Functions inherited from MR::HistoryAction
virtual ~HistoryAction ()=default
 

Additional Inherited Members

- Public Types inherited from MR::HistoryAction
enum class  Type { Undo , Redo }
 

Detailed Description

Undo action for efficiently storage of partial change in mesh (e.g. a modification of small region)

Constructor & Destructor Documentation

◆ PartialChangeMeshAction() [1/2]

MR::PartialChangeMeshAction::PartialChangeMeshAction ( std::string name,
std::shared_ptr< ObjectMesh > obj,
CmpOld ,
const Mesh & oldMesh )
inline

use this constructor after the object already contains new mesh, and old mesh is passed to remember the difference for future undoing

◆ PartialChangeMeshAction() [2/2]

MR::PartialChangeMeshAction::PartialChangeMeshAction ( std::string name,
std::shared_ptr< ObjectMesh > obj,
SetNew ,
std::shared_ptr< Mesh > && newMesh )
inline

use this constructor to set new object's mesh and remember its difference from existed mesh for future undoing

Member Function Documentation

◆ action()

virtual void MR::PartialChangeMeshAction::action ( HistoryAction::Type actionType)
inlineoverridevirtual

This function is called on history action (undo, redo, etc.)

Implements MR::HistoryAction.

◆ heapBytes()

virtual size_t MR::PartialChangeMeshAction::heapBytes ( ) const
inlinenodiscardoverridevirtual

returns the amount of memory this object occupies on heap

Implements MR::HistoryAction.

◆ name()

virtual std::string MR::PartialChangeMeshAction::name ( ) const
inlineoverridevirtual

Implements MR::HistoryAction.


The documentation for this class was generated from the following file: