MeshLib
 
Loading...
Searching...
No Matches
MRMeshC/MRMeshLoadObj.h
Go to the documentation of this file.
1#pragma once
2
3#include "MRMeshFwd.h"
4#include "MRAffineXf.h"
5
7
18
21
22typedef struct MRMeshLoadNamedMesh
23{
24 const MRString* name;
25 const MRMesh* mesh;
26 // TODO: uvCoords
27 // TODO: colors
28 // TODO: textureFiles
29 // TODO: texturePerFace
30 // TODO: diffuseColor
31
38}
40
42
44
46
48
50MRMESHC_API MRVectorMeshLoadNamedMesh* mrMeshLoadFromSceneObjFile( const char* file, bool combineAllObjects, const MRMeshLoadObjLoadSettings* settings, MRString** errorString );
51
#define MR_EXTERN_C_BEGIN
Definition MRMeshC/MRMeshFwd.h:26
bool(* MRProgressCallback)(float)
Definition MRMeshC/MRMeshFwd.h:47
#define MR_EXTERN_C_END
Definition MRMeshC/MRMeshFwd.h:27
struct MRMesh MRMesh
Definition MRMeshC/MRMeshFwd.h:43
typedefMR_EXTERN_C_BEGIN struct MRString MRString
Definition MRMeshC/MRMeshFwd.h:32
#define MRMESHC_API
Definition MRMeshC/MRMeshFwd.h:19
struct MRVectorMeshLoadNamedMesh MRVectorMeshLoadNamedMesh
Definition MRMeshC/MRMeshLoadObj.h:41
MR_EXTERN_C_BEGIN struct MRMeshLoadObjLoadSettings MRMeshLoadObjLoadSettings
MRMESHC_API void mrVectorMeshLoadNamedMeshFree(MRVectorMeshLoadNamedMesh *vector)
MRMESHC_API size_t mrVectorMeshLoadNamedMeshSize(const MRVectorMeshLoadNamedMesh *vector)
MRMESHC_API MRMeshLoadObjLoadSettings mrMeshLoadObjLoadSettingsNew(void)
returns a default instance
struct MRMeshLoadNamedMesh MRMeshLoadNamedMesh
MRMESHC_API MRVectorMeshLoadNamedMesh * mrMeshLoadFromSceneObjFile(const char *file, bool combineAllObjects, const MRMeshLoadObjLoadSettings *settings, MRString **errorString)
loads meshes from .obj file
MRMESHC_API const MRMeshLoadNamedMesh mrVectorMeshLoadNamedMeshGet(const MRVectorMeshLoadNamedMesh *vector, size_t index)
affine transformation: y = A*x + b, where A in VxV, and b in V
Definition MRMeshC/MRAffineXf.h:10
Definition MRMeshC/MRMeshLoadObj.h:23
int duplicatedVertexCount
counter of duplicated vertices (that created for resolve non-manifold geometry)
Definition MRMeshC/MRMeshLoadObj.h:37
MRAffineXf3f xf
transform of the loaded mesh, not identity only if ObjLoadSettings.customXf
Definition MRMeshC/MRMeshLoadObj.h:33
const MRMesh * mesh
Definition MRMeshC/MRMeshLoadObj.h:25
const MRString * name
Definition MRMeshC/MRMeshLoadObj.h:24
int skippedFaceCount
counter of skipped faces (faces than can't be created), not zero only if ObjLoadSettings....
Definition MRMeshC/MRMeshLoadObj.h:35
Definition MRMeshC/MRMeshLoadObj.h:9
bool countSkippedFaces
if true, the number of skipped faces (faces than can't be created) will be counted
Definition MRMeshC/MRMeshLoadObj.h:13
bool customXf
if true then vertices will be returned relative to some transformation to avoid precision loss
Definition MRMeshC/MRMeshLoadObj.h:11
MRProgressCallback callback
callback for set progress and stop process
Definition MRMeshC/MRMeshLoadObj.h:15