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

class for storing and changing visual object properties based on the object tags More...

#include <MRVisualObjectTag.h>

Static Public Member Functions

static MRVIEWER_API VisualObjectTagManagerinstance ()
 get access to the global instance
 
static MRVIEWER_API const std::unordered_map< std::string, VisualObjectTag > & storage ()
 get read-only access to the visual object tags' storage
 
static MRVIEWER_API std::string registerTag (VisualObjectTag tag)
 add visual object tag
 
static MRVIEWER_API void registerTag (std::string id, VisualObjectTag tag)
 add visual object tag with custom id
 
static MRVIEWER_API void updateTag (const std::string &visTagId, VisualObjectTag tag)
 update visual object tag; linked objects are NOT updated automatically
 
static MRVIEWER_API void unregisterTag (const std::string &visTagId)
 remove visual object tag; linked objects are NOT updated automatically
 
static MRVIEWER_API std::vector< std::shared_ptr< Object > > getAllObjectsWithTag (Object *root, const std::string &visTagId, const ObjectSelectivityType &type=ObjectSelectivityType::Selectable)
 find all object in given object tree with the visual object tag
 
static MRVIEWER_API void update (VisualObject &visObj, const std::string &visTagId)
 update visual object properties according to whether given object has the visual object tag or not
 

Friends

MRVIEWER_API void deserializeFromJson (const Json::Value &root, VisualObjectTagManager &manager)
 

Detailed Description

class for storing and changing visual object properties based on the object tags

Member Function Documentation

◆ getAllObjectsWithTag()

static MRVIEWER_API std::vector< std::shared_ptr< Object > > MR::VisualObjectTagManager::getAllObjectsWithTag ( Object * root,
const std::string & visTagId,
const ObjectSelectivityType & type = ObjectSelectivityType::Selectable )
static

find all object in given object tree with the visual object tag

◆ instance()

static MRVIEWER_API VisualObjectTagManager & MR::VisualObjectTagManager::instance ( )
static

get access to the global instance

◆ registerTag() [1/2]

static MRVIEWER_API void MR::VisualObjectTagManager::registerTag ( std::string id,
VisualObjectTag tag )
static

add visual object tag with custom id

◆ registerTag() [2/2]

static MRVIEWER_API std::string MR::VisualObjectTagManager::registerTag ( VisualObjectTag tag)
static

add visual object tag

◆ storage()

static MRVIEWER_API const std::unordered_map< std::string, VisualObjectTag > & MR::VisualObjectTagManager::storage ( )
static

get read-only access to the visual object tags' storage

◆ unregisterTag()

static MRVIEWER_API void MR::VisualObjectTagManager::unregisterTag ( const std::string & visTagId)
static

remove visual object tag; linked objects are NOT updated automatically

◆ update()

static MRVIEWER_API void MR::VisualObjectTagManager::update ( VisualObject & visObj,
const std::string & visTagId )
static

update visual object properties according to whether given object has the visual object tag or not

◆ updateTag()

static MRVIEWER_API void MR::VisualObjectTagManager::updateTag ( const std::string & visTagId,
VisualObjectTag tag )
static

update visual object tag; linked objects are NOT updated automatically

Friends And Related Symbol Documentation

◆ deserializeFromJson

MRVIEWER_API void deserializeFromJson ( const Json::Value & root,
VisualObjectTagManager & manager )
friend

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