MeshLib C Docs
Loading...
Searching...
No Matches
MRMeshLoadObj.h
Go to the documentation of this file.
1#pragma once
2
4#include <MRCMesh/MRColor.h>
5#include <MRCMisc/common.h>
6#include <MRCMisc/exports.h>
7
8#include <stdbool.h>
9#include <stddef.h>
10
11#ifdef __cplusplus
12extern "C" {
13#endif
14
15typedef struct MR_Mesh MR_Mesh; // Defined in `#include <MRCMesh/MRMesh.h>`.
16typedef struct MR_TexturePerFace MR_TexturePerFace; // Defined in `#include <MRCMesh/MRVector.h>`.
17typedef struct MR_Vector_std_filesystem_path_MR_TextureId MR_Vector_std_filesystem_path_MR_TextureId; // Defined in `#include <MRCMesh/MRVector.h>`.
18typedef struct MR_VertColors MR_VertColors; // Defined in `#include <MRCMesh/MRVector.h>`.
19typedef struct MR_VertCoords2 MR_VertCoords2; // Defined in `#include <MRCMesh/MRVector.h>`.
20typedef struct MR_expected_MR_LoadedObjects_std_string MR_expected_MR_LoadedObjects_std_string; // Defined in `#include <MRCMisc/expected_MR_LoadedObjects_std_string.h>`.
21typedef struct MR_expected_std_vector_MR_MeshLoad_NamedMesh_std_string MR_expected_std_vector_MR_MeshLoad_NamedMesh_std_string; // Defined in `#include <MRCMisc/expected_std_vector_MR_MeshLoad_NamedMesh_std_string.h>`.
22typedef struct MR_std_function_bool_from_float MR_std_function_bool_from_float; // Defined in `#include <MRCMisc/std_function_bool_from_float.h>`.
23typedef struct MR_std_istream MR_std_istream; // Defined in `#include <MRCMisc/iostream.h>`.
24typedef struct MR_std_optional_MR_Color MR_std_optional_MR_Color; // Defined in `#include <MRCMisc/std_optional_MR_Color.h>`.
25typedef struct MR_std_string MR_std_string; // Defined in `#include <MRCMisc/std_string.h>`.
26
27
31
35
41
46
52
58
63
69
75
80
86
92
97
103
107
112
115MRC_API MR_MeshLoad_ObjLoadSettings *MR_MeshLoad_ObjLoadSettings_ConstructFrom(bool customXf, bool countSkippedFaces, MR_PassBy callback_pass_by, MR_std_function_bool_from_float *callback, bool telemetrySignal);
116
119
122
126
129
132
137
142
147MRC_API void MR_MeshLoad_NamedMesh_Set_name(MR_MeshLoad_NamedMesh *_this, const char *value, const char *value_end);
148
153
158
162
167
172
176
181
186
190
195
200
204
209
214
218
223
228
233
238
244
249
255
261
266
272
278
283
289
293
298
304MRC_API MR_MeshLoad_NamedMesh *MR_MeshLoad_NamedMesh_ConstructFrom(const char *name, const char *name_end, MR_PassBy mesh_pass_by, MR_Mesh *mesh, MR_PassBy uvCoords_pass_by, MR_VertCoords2 *uvCoords, MR_PassBy colors_pass_by, MR_VertColors *colors, MR_PassBy textureFiles_pass_by, MR_Vector_std_filesystem_path_MR_TextureId *textureFiles, MR_PassBy texturePerFace_pass_by, MR_TexturePerFace *texturePerFace, const MR_Color *diffuseColor, MR_AffineXf3f xf, int skippedFaceCount, int duplicatedVertexCount);
305
308
311
315
318
321
326
333MRC_API MR_expected_std_vector_MR_MeshLoad_NamedMesh_std_string *MR_MeshLoad_fromSceneObjFile_3(const char *file, const char *file_end, bool combineAllObjects, const MR_MeshLoad_ObjLoadSettings *settings);
334
345
353MRC_API MR_expected_std_vector_MR_MeshLoad_NamedMesh_std_string *MR_MeshLoad_fromSceneObjFile_5(const char *data, MR_uint64_t size, bool combineAllObjects, const char *dir, const char *dir_end, const MR_MeshLoad_ObjLoadSettings *settings);
354
362
363#ifdef __cplusplus
364} // extern "C"
365#endif
struct MR_std_function_bool_from_float MR_std_function_bool_from_float
Definition MR3mf.h:10
struct MR_TexturePerFace MR_TexturePerFace
Definition MRChangeMeshAction.h:15
struct MR_VertColors MR_VertColors
Definition MRCtm.h:22
struct MR_Mesh MR_Mesh
Definition MRCtm.h:16
struct MR_std_string MR_std_string
Definition MRCtm.h:32
struct MR_VertCoords2 MR_VertCoords2
Definition MRCtm.h:23
struct MR_std_istream MR_std_istream
Definition MRCtm.h:28
struct MR_std_optional_MR_Color MR_std_optional_MR_Color
Definition MRCtm.h:29
struct MR_expected_MR_LoadedObjects_std_string MR_expected_MR_LoadedObjects_std_string
Definition MRE57.h:17
MRC_API MR_AffineXf3f * MR_MeshLoad_NamedMesh_GetMutable_xf(MR_MeshLoad_NamedMesh *_this)
MRC_API const MR_VertCoords2 * MR_MeshLoad_NamedMesh_Get_uvCoords(const MR_MeshLoad_NamedMesh *_this)
MRC_API MR_MeshLoad_ObjLoadSettings * MR_MeshLoad_ObjLoadSettings_ConstructFrom(bool customXf, bool countSkippedFaces, MR_PassBy callback_pass_by, MR_std_function_bool_from_float *callback, bool telemetrySignal)
struct MR_Vector_std_filesystem_path_MR_TextureId MR_Vector_std_filesystem_path_MR_TextureId
Definition MRMeshLoadObj.h:17
MRC_API void MR_MeshLoad_NamedMesh_Set_skippedFaceCount(MR_MeshLoad_NamedMesh *_this, int value)
MRC_API MR_MeshLoad_NamedMesh * MR_MeshLoad_NamedMesh_AssignFromAnother(MR_MeshLoad_NamedMesh *_this, MR_PassBy _other_pass_by, MR_MeshLoad_NamedMesh *_other)
MRC_API void MR_MeshLoad_NamedMesh_Destroy(const MR_MeshLoad_NamedMesh *_this)
Destroys a heap-allocated instance of MR_MeshLoad_NamedMesh. Does nothing if the pointer is null.
MRC_API const MR_MeshLoad_NamedMesh * MR_MeshLoad_NamedMesh_OffsetPtr(const MR_MeshLoad_NamedMesh *ptr, ptrdiff_t i)
Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the...
MRC_API const MR_TexturePerFace * MR_MeshLoad_NamedMesh_Get_texturePerFace(const MR_MeshLoad_NamedMesh *_this)
MRC_API int * MR_MeshLoad_NamedMesh_GetMutable_duplicatedVertexCount(MR_MeshLoad_NamedMesh *_this)
MRC_API void MR_MeshLoad_NamedMesh_Set_texturePerFace(MR_MeshLoad_NamedMesh *_this, MR_PassBy value_pass_by, MR_TexturePerFace *value)
MRC_API MR_MeshLoad_ObjLoadSettings * MR_MeshLoad_ObjLoadSettings_DefaultConstruct(void)
MRC_API void MR_MeshLoad_NamedMesh_Set_duplicatedVertexCount(MR_MeshLoad_NamedMesh *_this, int value)
MRC_API void MR_MeshLoad_NamedMesh_Set_diffuseColor(MR_MeshLoad_NamedMesh *_this, const MR_Color *value)
MRC_API MR_MeshLoad_ObjLoadSettings * MR_MeshLoad_ObjLoadSettings_AssignFromAnother(MR_MeshLoad_ObjLoadSettings *_this, MR_PassBy _other_pass_by, MR_MeshLoad_ObjLoadSettings *_other)
MRC_API void MR_MeshLoad_ObjLoadSettings_Set_telemetrySignal(MR_MeshLoad_ObjLoadSettings *_this, bool value)
struct MR_expected_std_vector_MR_MeshLoad_NamedMesh_std_string MR_expected_std_vector_MR_MeshLoad_NamedMesh_std_string
Definition MRMeshLoadObj.h:21
MRC_API void MR_MeshLoad_NamedMesh_Set_xf(MR_MeshLoad_NamedMesh *_this, MR_AffineXf3f value)
MRC_API void MR_MeshLoad_ObjLoadSettings_DestroyArray(const MR_MeshLoad_ObjLoadSettings *_this)
Destroys a heap-allocated array of MR_MeshLoad_ObjLoadSettings. Does nothing if the pointer is null.
MRC_API const int * MR_MeshLoad_NamedMesh_Get_skippedFaceCount(const MR_MeshLoad_NamedMesh *_this)
MRC_API MR_TexturePerFace * MR_MeshLoad_NamedMesh_GetMutable_texturePerFace(MR_MeshLoad_NamedMesh *_this)
MRC_API bool * MR_MeshLoad_ObjLoadSettings_GetMutable_telemetrySignal(MR_MeshLoad_ObjLoadSettings *_this)
MRC_API const MR_std_function_bool_from_float * MR_MeshLoad_ObjLoadSettings_Get_callback(const MR_MeshLoad_ObjLoadSettings *_this)
MRC_API const bool * MR_MeshLoad_ObjLoadSettings_Get_telemetrySignal(const MR_MeshLoad_ObjLoadSettings *_this)
MRC_API MR_std_optional_MR_Color * MR_MeshLoad_NamedMesh_GetMutable_diffuseColor(MR_MeshLoad_NamedMesh *_this)
MRC_API MR_MeshLoad_ObjLoadSettings * MR_MeshLoad_ObjLoadSettings_OffsetMutablePtr(MR_MeshLoad_ObjLoadSettings *ptr, ptrdiff_t i)
Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the...
MRC_API void MR_MeshLoad_ObjLoadSettings_Set_callback(MR_MeshLoad_ObjLoadSettings *_this, MR_PassBy value_pass_by, MR_std_function_bool_from_float *value)
MRC_API int * MR_MeshLoad_NamedMesh_GetMutable_skippedFaceCount(MR_MeshLoad_NamedMesh *_this)
MRC_API MR_expected_std_vector_MR_MeshLoad_NamedMesh_std_string * MR_MeshLoad_fromSceneObjFile_5(const char *data, MR_uint64_t size, bool combineAllObjects, const char *dir, const char *dir_end, const MR_MeshLoad_ObjLoadSettings *settings)
MRC_API const MR_Vector_std_filesystem_path_MR_TextureId * MR_MeshLoad_NamedMesh_Get_textureFiles(const MR_MeshLoad_NamedMesh *_this)
MRC_API MR_Vector_std_filesystem_path_MR_TextureId * MR_MeshLoad_NamedMesh_GetMutable_textureFiles(MR_MeshLoad_NamedMesh *_this)
MRC_API const bool * MR_MeshLoad_ObjLoadSettings_Get_customXf(const MR_MeshLoad_ObjLoadSettings *_this)
MRC_API MR_MeshLoad_ObjLoadSettings * MR_MeshLoad_ObjLoadSettings_DefaultConstructArray(size_t num_elems)
MRC_API bool * MR_MeshLoad_ObjLoadSettings_GetMutable_countSkippedFaces(MR_MeshLoad_ObjLoadSettings *_this)
MRC_API MR_MeshLoad_NamedMesh * MR_MeshLoad_NamedMesh_ConstructFromAnother(MR_PassBy _other_pass_by, MR_MeshLoad_NamedMesh *_other)
MRC_API void MR_MeshLoad_NamedMesh_Set_uvCoords(MR_MeshLoad_NamedMesh *_this, MR_PassBy value_pass_by, MR_VertCoords2 *value)
MRC_API MR_MeshLoad_NamedMesh * MR_MeshLoad_NamedMesh_ConstructFrom(const char *name, const char *name_end, MR_PassBy mesh_pass_by, MR_Mesh *mesh, MR_PassBy uvCoords_pass_by, MR_VertCoords2 *uvCoords, MR_PassBy colors_pass_by, MR_VertColors *colors, MR_PassBy textureFiles_pass_by, MR_Vector_std_filesystem_path_MR_TextureId *textureFiles, MR_PassBy texturePerFace_pass_by, MR_TexturePerFace *texturePerFace, const MR_Color *diffuseColor, MR_AffineXf3f xf, int skippedFaceCount, int duplicatedVertexCount)
MRC_API MR_VertColors * MR_MeshLoad_NamedMesh_GetMutable_colors(MR_MeshLoad_NamedMesh *_this)
MRC_API void MR_MeshLoad_NamedMesh_DestroyArray(const MR_MeshLoad_NamedMesh *_this)
Destroys a heap-allocated array of MR_MeshLoad_NamedMesh. Does nothing if the pointer is null.
MRC_API const MR_VertColors * MR_MeshLoad_NamedMesh_Get_colors(const MR_MeshLoad_NamedMesh *_this)
MRC_API MR_std_function_bool_from_float * MR_MeshLoad_ObjLoadSettings_GetMutable_callback(MR_MeshLoad_ObjLoadSettings *_this)
MRC_API MR_expected_MR_LoadedObjects_std_string * MR_MeshLoad_loadObjectFromObj(const char *file, const char *file_end, const MR_std_function_bool_from_float *cb)
MRC_API MR_std_string * MR_MeshLoad_NamedMesh_GetMutable_name(MR_MeshLoad_NamedMesh *_this)
MRC_API void MR_MeshLoad_ObjLoadSettings_Destroy(const MR_MeshLoad_ObjLoadSettings *_this)
Destroys a heap-allocated instance of MR_MeshLoad_ObjLoadSettings. Does nothing if the pointer is nul...
MRC_API const MR_std_optional_MR_Color * MR_MeshLoad_NamedMesh_Get_diffuseColor(const MR_MeshLoad_NamedMesh *_this)
MRC_API const bool * MR_MeshLoad_ObjLoadSettings_Get_countSkippedFaces(const MR_MeshLoad_ObjLoadSettings *_this)
MRC_API const MR_Mesh * MR_MeshLoad_NamedMesh_Get_mesh(const MR_MeshLoad_NamedMesh *_this)
MRC_API MR_expected_std_vector_MR_MeshLoad_NamedMesh_std_string * MR_MeshLoad_fromSceneObjFile_3(const char *file, const char *file_end, bool combineAllObjects, const MR_MeshLoad_ObjLoadSettings *settings)
MRC_API void MR_MeshLoad_ObjLoadSettings_Set_customXf(MR_MeshLoad_ObjLoadSettings *_this, bool value)
struct MR_MeshLoad_ObjLoadSettings MR_MeshLoad_ObjLoadSettings
Definition MRMeshLoadObj.h:30
MRC_API const int * MR_MeshLoad_NamedMesh_Get_duplicatedVertexCount(const MR_MeshLoad_NamedMesh *_this)
MRC_API bool * MR_MeshLoad_ObjLoadSettings_GetMutable_customXf(MR_MeshLoad_ObjLoadSettings *_this)
MRC_API void MR_MeshLoad_ObjLoadSettings_Set_countSkippedFaces(MR_MeshLoad_ObjLoadSettings *_this, bool value)
MRC_API MR_MeshLoad_ObjLoadSettings * MR_MeshLoad_ObjLoadSettings_ConstructFromAnother(MR_PassBy _other_pass_by, MR_MeshLoad_ObjLoadSettings *_other)
MRC_API void MR_MeshLoad_NamedMesh_Set_textureFiles(MR_MeshLoad_NamedMesh *_this, MR_PassBy value_pass_by, MR_Vector_std_filesystem_path_MR_TextureId *value)
MRC_API MR_Mesh * MR_MeshLoad_NamedMesh_GetMutable_mesh(MR_MeshLoad_NamedMesh *_this)
MRC_API MR_VertCoords2 * MR_MeshLoad_NamedMesh_GetMutable_uvCoords(MR_MeshLoad_NamedMesh *_this)
struct MR_MeshLoad_NamedMesh MR_MeshLoad_NamedMesh
Definition MRMeshLoadObj.h:34
MRC_API void MR_MeshLoad_NamedMesh_Set_mesh(MR_MeshLoad_NamedMesh *_this, MR_PassBy value_pass_by, MR_Mesh *value)
MRC_API MR_expected_std_vector_MR_MeshLoad_NamedMesh_std_string * MR_MeshLoad_fromSceneObjFile_4(MR_std_istream *in, bool combineAllObjects, const char *dir, const char *dir_end, const MR_MeshLoad_ObjLoadSettings *settings)
MRC_API const MR_MeshLoad_ObjLoadSettings * MR_MeshLoad_ObjLoadSettings_OffsetPtr(const MR_MeshLoad_ObjLoadSettings *ptr, ptrdiff_t i)
Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the...
MRC_API MR_MeshLoad_NamedMesh * MR_MeshLoad_NamedMesh_DefaultConstruct(void)
MRC_API const MR_AffineXf3f * MR_MeshLoad_NamedMesh_Get_xf(const MR_MeshLoad_NamedMesh *_this)
MRC_API MR_MeshLoad_NamedMesh * MR_MeshLoad_NamedMesh_OffsetMutablePtr(MR_MeshLoad_NamedMesh *ptr, ptrdiff_t i)
Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the...
MRC_API const MR_std_string * MR_MeshLoad_NamedMesh_Get_name(const MR_MeshLoad_NamedMesh *_this)
MRC_API void MR_MeshLoad_NamedMesh_Set_colors(MR_MeshLoad_NamedMesh *_this, MR_PassBy value_pass_by, MR_VertColors *value)
MRC_API void MR_MeshLoad_NamedMesh_Set_name(MR_MeshLoad_NamedMesh *_this, const char *value, const char *value_end)
MRC_API MR_MeshLoad_NamedMesh * MR_MeshLoad_NamedMesh_DefaultConstructArray(size_t num_elems)
MR_PassBy
Definition common.h:23
uint64_t MR_uint64_t
Definition common.h:18
#define MRC_API
Definition exports.h:11
virtual std::string name() const override
size_t size() const
Definition MRAffineXf.h:39
Generated from class MR::Color.
Definition MRColor.h:18