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

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

#include <MRPartialChangeMeshAction.h>

+ Inheritance diagram for MR::PartialChangeMeshTopologyAction:

Public Member Functions

 PartialChangeMeshTopologyAction (std::string name, std::shared_ptr< ObjectMesh > obj, CmpOld, const MeshTopology &oldTopology)
 
 PartialChangeMeshTopologyAction (std::string name, std::shared_ptr< ObjectMesh > obj, SetNew, MeshTopology &&newTopology)
 use this constructor to set new object's topology and remember its difference from existed topology 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 topology (e.g. a modification of small region)

Constructor & Destructor Documentation

◆ PartialChangeMeshTopologyAction() [1/2]

MR::PartialChangeMeshTopologyAction::PartialChangeMeshTopologyAction ( std::string name,
std::shared_ptr< ObjectMesh > obj,
CmpOld ,
const MeshTopology & oldTopology )
inline

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

◆ PartialChangeMeshTopologyAction() [2/2]

MR::PartialChangeMeshTopologyAction::PartialChangeMeshTopologyAction ( std::string name,
std::shared_ptr< ObjectMesh > obj,
SetNew ,
MeshTopology && newTopology )
inline

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

Member Function Documentation

◆ action()

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

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

Implements MR::HistoryAction.

◆ heapBytes()

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

returns the amount of memory this object occupies on heap

Implements MR::HistoryAction.

◆ name()

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

Implements MR::HistoryAction.


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