MeshLib
 
Loading...
Searching...
No Matches
Data Model

This chapter represents documentation about data models. More...

Topics

 Features
 
 Viewport group
 
 Visual Object group
 

Classes

class  MR::ObjectChildrenHolder
 
class  MR::Object
 named object in the data model More...
 
class  MR::ObjectDistanceMap
 
class  MR::ObjectGcode
 
class  MR::ObjectLines
 
class  MR::ObjectLinesHolder
 
struct  MR::MeshLoadInfo
 information about loading process and mesh construction from primitives More...
 
class  MR::ObjectMesh
 
class  MR::ObjectPoints
 
class  MR::ObjectVoxels
 
class  MR::SceneRoot
 
class  MR::XfBasedCache< T >
 
class  MR::ObjectLabel
 

Functions

template<typename T >
std::shared_ptr< const T > MR::Object::find () const
 finds a direct child by type
 
template<typename T >
std::shared_ptr< const T > MR::Object::find (const std::string_view &name) const
 finds a direct child by name and type
 
enum class  MR::ObjectSelectivityType { MR::ObjectSelectivityType::Selectable , MR::ObjectSelectivityType::Selected , MR::ObjectSelectivityType::Any }
 
template<typename ObjectT = Object>
std::shared_ptr< ObjectT > MR::asSelectivityType (std::shared_ptr< Object > obj, const ObjectSelectivityType &type)
 if input object is of given type then returns another pointer on it
 
template<typename ObjectT = Object>
std::vector< std::shared_ptr< ObjectT > > MR::getAllObjectsInTree (Object *root, const ObjectSelectivityType &type=ObjectSelectivityType::Selectable)
 
template<typename ObjectT = Object>
std::vector< std::shared_ptr< ObjectT > > MR::getAllObjectsInTree (Object &root, const ObjectSelectivityType &type=ObjectSelectivityType::Selectable)
 
template<typename ObjectT = Object>
std::vector< std::shared_ptr< ObjectT > > MR::getTopmostVisibleObjects (Object *root, const ObjectSelectivityType &type=ObjectSelectivityType::Selectable)
 Returns all topmost visible objects of given type (if an object is returned, its children are not) excluding root.
 
template<typename ObjectT = Object>
std::vector< std::shared_ptr< ObjectT > > MR::getTopmostVisibleObjects (Object &root, const ObjectSelectivityType &type=ObjectSelectivityType::Selectable)
 
template<typename ObjectT = Object>
std::shared_ptr< ObjectT > MR::getDepthFirstObject (Object *root, const ObjectSelectivityType &type)
 return first object of given type in depth-first traverse order excluding root
 
template<typename ObjectT = Object>
std::shared_ptr< ObjectT > MR::getDepthFirstObject (Object &root, const ObjectSelectivityType &type)
 
MRMESH_API std::shared_ptr< ObjectMR::createObject (const std::string &className)
 the function to create new object instance by registered class name
 

Detailed Description

This chapter represents documentation about data models.

Enumeration Type Documentation

◆ ObjectSelectivityType

enum class MR::ObjectSelectivityType
strong
Enumerator
Selectable 
Selected 
Any 

Function Documentation

◆ asSelectivityType()

template<typename ObjectT = Object>
std::shared_ptr< ObjectT > MR::asSelectivityType ( std::shared_ptr< Object > obj,
const ObjectSelectivityType & type )

if input object is of given type then returns another pointer on it

◆ createObject()

MRMESH_API std::shared_ptr< Object > MR::createObject ( const std::string & className)

the function to create new object instance by registered class name

◆ find() [1/2]

template<typename T >
std::shared_ptr< const T > MR::Object::find ( ) const

finds a direct child by type

◆ find() [2/2]

template<typename T >
std::shared_ptr< const T > MR::Object::find ( const std::string_view & name) const

finds a direct child by name and type

◆ getAllObjectsInTree() [1/2]

template<typename ObjectT = Object>
std::vector< std::shared_ptr< ObjectT > > MR::getAllObjectsInTree ( Object & root,
const ObjectSelectivityType & type = ObjectSelectivityType::Selectable )
inline

◆ getAllObjectsInTree() [2/2]

template<typename ObjectT = Object>
std::vector< std::shared_ptr< ObjectT > > MR::getAllObjectsInTree ( Object * root,
const ObjectSelectivityType & type = ObjectSelectivityType::Selectable )

Traverses tree and collect objects of given type excluding root returns vector

◆ getDepthFirstObject() [1/2]

template<typename ObjectT = Object>
std::shared_ptr< ObjectT > MR::getDepthFirstObject ( Object & root,
const ObjectSelectivityType & type )
inline

◆ getDepthFirstObject() [2/2]

template<typename ObjectT = Object>
std::shared_ptr< ObjectT > MR::getDepthFirstObject ( Object * root,
const ObjectSelectivityType & type )

return first object of given type in depth-first traverse order excluding root

◆ getTopmostVisibleObjects() [1/2]

template<typename ObjectT = Object>
std::vector< std::shared_ptr< ObjectT > > MR::getTopmostVisibleObjects ( Object & root,
const ObjectSelectivityType & type = ObjectSelectivityType::Selectable )
inline

◆ getTopmostVisibleObjects() [2/2]

template<typename ObjectT = Object>
std::vector< std::shared_ptr< ObjectT > > MR::getTopmostVisibleObjects ( Object * root,
const ObjectSelectivityType & type = ObjectSelectivityType::Selectable )

Returns all topmost visible objects of given type (if an object is returned, its children are not) excluding root.