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 |
| class | MR::ObjectMesh |
| class | MR::ObjectPoints |
| class | MR::SceneRoot |
| class | MR::XfBasedCache< T > |
| class | MR::ObjectLabel |
| class | MR::ObjectVoxels |
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 | |
| std::shared_ptr< Object > | MR::createObject (const std::string &className) |
| the function to create new object instance by registered class name | |
| Expected< LoadedObjectMesh > | MR::makeObjectMeshFromFile (const std::filesystem::path &file, const ProgressCallback &cb={}) |
| loads mesh from given file in new object | |
| Expected< LoadedObject > | MR::makeObjectFromMeshFile (const std::filesystem::path &file, const ProgressCallback &cb={}, bool returnOnlyMesh=false) |
| loads data from given file and makes either ObjectMesh, ObjectLines or ObjectPoints (if the file has points or edges but not faces) | |
| Expected< ObjectLines > | MR::makeObjectLinesFromFile (const std::filesystem::path &file, ProgressCallback callback={}) |
| loads lines from given file in new object | |
| Expected< ObjectPoints > | MR::makeObjectPointsFromFile (const std::filesystem::path &file, ProgressCallback callback={}) |
| loads points from given file in new object | |
| Expected< ObjectDistanceMap > | MR::makeObjectDistanceMapFromFile (const std::filesystem::path &file, ProgressCallback callback={}) |
| loads distance map from given file in new object | |
| Expected< ObjectGcode > | MR::makeObjectGcodeFromFile (const std::filesystem::path &file, ProgressCallback callback={}) |
| loads gcode from given file in new object | |
| Expected< LoadedObjects > | MR::loadObjectFromFile (const std::filesystem::path &filename, const ProgressCallback &callback={}) |
| load all objects (or any type: mesh, lines, points, voxels or scene) from file | |
| bool | MR::isSupportedFileInSubfolders (const std::filesystem::path &folder) |
| checks if there are any supported files folder and subfolders | |
| Expected< LoadedObject > | MR::loadSceneFromAnySupportedFormat (const std::filesystem::path &path, const ProgressCallback &callback={}) |
| tries to load scene from every format listed in SceneFormatFilters | |
| LoadedObject | MR::makeObjectMesh (std::string objName, LoadedMeshData data) |
| constructs new ObjectMesh from the given data | |
| Expected< LoadedObject > | MR::deserializeObjectTree (const std::filesystem::path &path, const FolderCallback &postDecompress={}, const ProgressCallback &progressCb={}) |
| loads objects tree from given scene file (zip/mru) | |
| Expected< LoadedObject > | MR::deserializeObjectTreeFromFolder (const std::filesystem::path &folder, const ProgressCallback &progressCb={}) |
| loads objects tree from given scene folder | |
| IOFilters | MR::getAllFilters () |
| returns filters for all supported file formats for all types of objects | |
This chapter represents documentation about data models.
| std::shared_ptr< Object > MR::createObject | ( | const std::string & | className | ) |
#include <MRMesh/MRObjectFactory.h>
the function to create new object instance by registered class name
| Expected< LoadedObject > MR::deserializeObjectTree | ( | const std::filesystem::path & | path, |
| const FolderCallback & | postDecompress = {}, | ||
| const ProgressCallback & | progressCb = {} ) |
#include <MRMesh/MRObjectLoad.h>
loads objects tree from given scene file (zip/mru)
format specification: children are saved under folder with name of their parent object all objects parameters are saved in one JSON file in the root folder
if postDecompress is set, it is called after decompression loading is controlled with Object::deserializeModel_ and Object::deserializeFields_
| Expected< LoadedObject > MR::deserializeObjectTreeFromFolder | ( | const std::filesystem::path & | folder, |
| const ProgressCallback & | progressCb = {} ) |
#include <MRMesh/MRObjectLoad.h>
loads objects tree from given scene folder
format specification: children are saved under folder with name of their parent object all objects parameters are saved in one JSON file in the root folder
loading is controlled with Object::deserializeModel_ and Object::deserializeFields_
| std::shared_ptr< const T > MR::Object::find | ( | ) | const |
| std::shared_ptr< const T > MR::Object::find | ( | const std::string_view & | name | ) | const |
|
nodiscard |
#include <MRMesh/MRObjectLoad.h>
returns filters for all supported file formats for all types of objects
|
nodiscard |
#include <MRMesh/MRObjectLoad.h>
checks if there are any supported files folder and subfolders
| Expected< LoadedObjects > MR::loadObjectFromFile | ( | const std::filesystem::path & | filename, |
| const ProgressCallback & | callback = {} ) |
#include <MRMesh/MRObjectLoad.h>
load all objects (or any type: mesh, lines, points, voxels or scene) from file
| callback | - callback function to set progress (for progress bar) |
| Expected< LoadedObject > MR::loadSceneFromAnySupportedFormat | ( | const std::filesystem::path & | path, |
| const ProgressCallback & | callback = {} ) |
#include <MRMesh/MRObjectLoad.h>
tries to load scene from every format listed in SceneFormatFilters
| Expected< ObjectDistanceMap > MR::makeObjectDistanceMapFromFile | ( | const std::filesystem::path & | file, |
| ProgressCallback | callback = {} ) |
#include <MRMesh/MRObjectLoad.h>
loads distance map from given file in new object
| Expected< LoadedObject > MR::makeObjectFromMeshFile | ( | const std::filesystem::path & | file, |
| const ProgressCallback & | cb = {}, | ||
| bool | returnOnlyMesh = false ) |
#include <MRMesh/MRObjectLoad.h>
loads data from given file and makes either ObjectMesh, ObjectLines or ObjectPoints (if the file has points or edges but not faces)
if true the function can return only ObjectMesh and never other object type
| Expected< ObjectGcode > MR::makeObjectGcodeFromFile | ( | const std::filesystem::path & | file, |
| ProgressCallback | callback = {} ) |
#include <MRMesh/MRObjectLoad.h>
loads gcode from given file in new object
| Expected< ObjectLines > MR::makeObjectLinesFromFile | ( | const std::filesystem::path & | file, |
| ProgressCallback | callback = {} ) |
#include <MRMesh/MRObjectLoad.h>
loads lines from given file in new object
|
nodiscard |
#include <MRMesh/MRObjectLoad.h>
constructs new ObjectMesh from the given data
| Expected< LoadedObjectMesh > MR::makeObjectMeshFromFile | ( | const std::filesystem::path & | file, |
| const ProgressCallback & | cb = {} ) |
#include <MRMesh/MRObjectLoad.h>
loads mesh from given file in new object
| Expected< ObjectPoints > MR::makeObjectPointsFromFile | ( | const std::filesystem::path & | file, |
| ProgressCallback | callback = {} ) |
#include <MRMesh/MRObjectLoad.h>
loads points from given file in new object