MeshLib C Docs
Loading...
Searching...
No Matches
MRGltf.h File Reference
#include <MRCMisc/common.h>
#include <MRCMisc/exports.h>

Go to the source code of this file.

Typedefs

typedef struct MR_Object MR_Object
typedef struct MR_SceneSave_Settings MR_SceneSave_Settings
typedef struct MR_expected_std_shared_ptr_MR_Object_std_string MR_expected_std_shared_ptr_MR_Object_std_string

Functions

MRC_API MR_expected_std_shared_ptr_MR_Object_std_stringMR_deserializeObjectTreeFromGltf (const char *file, const char *file_end, MR_PassBy callback_pass_by, MR_std_function_bool_from_float *callback)
MRC_API MR_expected_void_std_stringMR_serializeObjectTreeToGltf (const MR_Object *root, const char *file, const char *file_end, const MR_SceneSave_Settings *settings)

Typedef Documentation

◆ MR_expected_std_shared_ptr_MR_Object_std_string

Stores either a std::shared_ptr<MR::Object> that represents success or a std::string that represents an error. Supported MR_PassBy modes: MR_PassBy_DefaultConstruct, MR_PassBy_Copy, MR_PassBy_Move (and MR_PassBy_DefaultArgument and MR_PassBy_NoObject if supported by the callee).

◆ MR_Object

typedef struct MR_Object MR_Object

named object in the data model Generated from class MR::Object. Base classes: Direct: (non-virtual) MR::ObjectChildrenHolder Derived classes: Direct: (non-virtual) MR::SceneRootObject MR::VisualObject Indirect: (non-virtual) MR::AddVisualProperties<MR::FeatureObject, MR::DimensionsVisualizePropertyType::diameter, MR::DimensionsVisualizePropertyType::angle, MR::DimensionsVisualizePropertyType::length> MR::AddVisualProperties<MR::FeatureObject, MR::DimensionsVisualizePropertyType::diameter, MR::DimensionsVisualizePropertyType::length> MR::AddVisualProperties<MR::FeatureObject, MR::DimensionsVisualizePropertyType::diameter> MR::AngleMeasurementObject MR::CircleObject MR::ConeObject MR::CylinderObject MR::DistanceMeasurementObject MR::FeatureObject MR::LineObject MR::MeasurementObject MR::ObjectDistanceMap MR::ObjectGcode MR::ObjectLabel MR::ObjectLines MR::ObjectLinesHolder MR::ObjectMesh MR::ObjectMeshHolder MR::ObjectPoints MR::ObjectPointsHolder MR::ObjectVoxels MR::PlaneObject MR::PointMeasurementObject MR::PointObject MR::RadiusMeasurementObject MR::SphereObject Supported MR_PassBy modes: MR_PassBy_DefaultConstruct, MR_PassBy_Move (and MR_PassBy_DefaultArgument and MR_PassBy_NoObject if supported by the callee).

◆ MR_SceneSave_Settings

Generated from class MR::SceneSave::Settings. Derived classes: Direct: (non-virtual) MR::ObjectSave::Settings Supported MR_PassBy modes: MR_PassBy_DefaultConstruct, MR_PassBy_Copy, MR_PassBy_Move (and MR_PassBy_DefaultArgument and MR_PassBy_NoObject if supported by the callee).

Function Documentation

◆ MR_deserializeObjectTreeFromGltf()

MRC_API MR_expected_std_shared_ptr_MR_Object_std_string * MR_deserializeObjectTreeFromGltf ( const char * file,
const char * file_end,
MR_PassBy callback_pass_by,
MR_std_function_bool_from_float * callback )

Generated from function MR::deserializeObjectTreeFromGltf. Parameter file is a UTF-8 encoded filesystem path. Parameter callback has a default argument: {}, pass MR_PassBy_DefaultArgument and a null pointer to use it. Never returns null. Returns an instance allocated on the heap! Must call MR_expected_std_shared_ptr_MR_Object_std_string_Destroy() to free it when you're done using it.

◆ MR_serializeObjectTreeToGltf()

MRC_API MR_expected_void_std_string * MR_serializeObjectTreeToGltf ( const MR_Object * root,
const char * file,
const char * file_end,
const MR_SceneSave_Settings * settings )

Generated from function MR::serializeObjectTreeToGltf. Parameter root can not be null. It is a single object. Parameter file is a UTF-8 encoded filesystem path. Parameter settings can not be null. It is a single object. Never returns null. Returns an instance allocated on the heap! Must call MR_expected_void_std_string_Destroy() to free it when you're done using it.