MeshLib Documentation
Loading...
Searching...
No Matches
MR::ChangeTextureAction Class Reference

#include <MRChangeMeshAction.h>

+ Inheritance diagram for MR::ChangeTextureAction:

Public Types

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

Public Member Functions

 ChangeTextureAction (std::string name, const std::shared_ptr< ObjectMeshHolder > &obj)
 use this constructor to remember object's textures before making any changes in them
 
 ChangeTextureAction (std::string name, const std::shared_ptr< ObjectMeshHolder > &obj, Vector< MeshTexture, TextureId > &&newTextures)
 use this constructor to remember object's textures 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< ObjectMeshHolder > &obj)
 

Detailed Description

History action for texture change

Member Typedef Documentation

◆ Obj

Constructor & Destructor Documentation

◆ ChangeTextureAction() [1/2]

MR::ChangeTextureAction::ChangeTextureAction ( std::string name,
const std::shared_ptr< ObjectMeshHolder > & obj )
inline

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

◆ ChangeTextureAction() [2/2]

MR::ChangeTextureAction::ChangeTextureAction ( std::string name,
const std::shared_ptr< ObjectMeshHolder > & obj,
Vector< MeshTexture, TextureId > && newTextures )
inline

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

Member Function Documentation

◆ action()

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

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

Implements MR::HistoryAction.

◆ heapBytes()

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

returns the amount of memory this object occupies on heap

Implements MR::HistoryAction.

◆ name()

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

Implements MR::HistoryAction.

◆ setObjectDirty()

static void MR::ChangeTextureAction::setObjectDirty ( const std::shared_ptr< ObjectMeshHolder > & obj)
inlinestatic

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