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

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

#include <MRPartialChangeMeshAction.h>

+ Inheritance diagram for MR::PartialChangeMeshPointsAction:

Public Member Functions

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

Constructor & Destructor Documentation

◆ PartialChangeMeshPointsAction() [1/2]

MR::PartialChangeMeshPointsAction::PartialChangeMeshPointsAction ( std::string name,
std::shared_ptr< ObjectMesh > obj,
CmpOld ,
const VertCoords & oldPoints )
inline

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

◆ PartialChangeMeshPointsAction() [2/2]

MR::PartialChangeMeshPointsAction::PartialChangeMeshPointsAction ( std::string name,
std::shared_ptr< ObjectMesh > obj,
SetNew ,
VertCoords && newPoints )
inline

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

Member Function Documentation

◆ action()

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

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

Implements MR::HistoryAction.

◆ heapBytes()

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

returns the amount of memory this object occupies on heap

Implements MR::HistoryAction.

◆ name()

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

Implements MR::HistoryAction.


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