MeshLib C++ Docs
Loading...
Searching...
No Matches
MR::ChangeVertsColorMapAction< T > Class Template Reference

#include <MRChangeVertsColorMapAction.h>

+ Inheritance diagram for MR::ChangeVertsColorMapAction< T >:

Public Types

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

Public Member Functions

 ChangeVertsColorMapAction (const std::string &name, const std::shared_ptr< T > &obj)
 use this constructor to remember object's vertex colors before making any changes in them
 
 ChangeVertsColorMapAction (const std::string &name, const std::shared_ptr< T > &obj, VertColors &&newVertsColorMap)
 use this constructor to remember object's vertex colors and immediate set new value
 
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
 

Static Public Member Functions

static void setObjectDirty (const std::shared_ptr< T > &obj)
 

Detailed Description

template<typename T>
class MR::ChangeVertsColorMapAction< T >

History action for vertsColorMap change

Member Typedef Documentation

◆ Obj

template<typename T >
using MR::ChangeVertsColorMapAction< T >::Obj = T

Constructor & Destructor Documentation

◆ ChangeVertsColorMapAction() [1/2]

template<typename T >
MR::ChangeVertsColorMapAction< T >::ChangeVertsColorMapAction ( const std::string & name,
const std::shared_ptr< T > & obj )
inline

use this constructor to remember object's vertex colors before making any changes in them

◆ ChangeVertsColorMapAction() [2/2]

template<typename T >
MR::ChangeVertsColorMapAction< T >::ChangeVertsColorMapAction ( const std::string & name,
const std::shared_ptr< T > & obj,
VertColors && newVertsColorMap )
inline

use this constructor to remember object's vertex colors and immediate set new value

Member Function Documentation

◆ action()

template<typename T >
virtual void MR::ChangeVertsColorMapAction< T >::action ( HistoryAction::Type actionType)
inlineoverridevirtual

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

Implements MR::HistoryAction.

◆ heapBytes()

template<typename T >
virtual size_t MR::ChangeVertsColorMapAction< T >::heapBytes ( ) const
inlinenodiscardoverridevirtual

returns the amount of memory this object occupies on heap

Implements MR::HistoryAction.

◆ name()

template<typename T >
virtual std::string MR::ChangeVertsColorMapAction< T >::name ( ) const
inlineoverridevirtual

Implements MR::HistoryAction.

◆ setObjectDirty()

template<typename T >
static void MR::ChangeVertsColorMapAction< T >::setObjectDirty ( const std::shared_ptr< T > & obj)
inlinestatic

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