Classes | |
struct | MR::MeshLoad::ObjLoadSettings |
struct | MR::MeshLoad::NamedMesh |
Functions | |
MRMESH_API Expected< std::vector< NamedMesh > > | MR::MeshLoad::fromSceneObjFile (const std::filesystem::path &file, bool combineAllObjects, const ObjLoadSettings &settings={}) |
loads meshes from .obj file | |
MRMESH_API Expected< std::vector< NamedMesh > > | MR::MeshLoad::fromSceneObjFile (std::istream &in, bool combineAllObjects, const std::filesystem::path &dir, const ObjLoadSettings &settings={}) |
MRMESH_API Expected< std::vector< NamedMesh > > | MR::MeshLoad::fromSceneObjFile (const char *data, size_t size, bool combineAllObjects, const std::filesystem::path &dir, const ObjLoadSettings &settings={}) |
MRMESH_API Expected< std::vector< std::shared_ptr< Object > > > | MR::MeshLoad::loadObjectFromObj (const std::filesystem::path &results, std::string *warnings=nullptr, ProgressCallback cb={}) |
Variables | |
bool | MR::MeshLoad::ObjLoadSettings::customXf = false |
if true then vertices will be returned relative to some transformation to avoid precision loss | |
bool | MR::MeshLoad::ObjLoadSettings::countSkippedFaces = false |
if true, the number of skipped faces (faces than can't be created) will be counted | |
ProgressCallback | MR::MeshLoad::ObjLoadSettings::callback |
callback for set progress and stop process | |
std::string | MR::MeshLoad::NamedMesh::name |
Mesh | MR::MeshLoad::NamedMesh::mesh |
VertUVCoords | MR::MeshLoad::NamedMesh::uvCoords |
VertColors | MR::MeshLoad::NamedMesh::colors |
Vector< std::filesystem::path, TextureId > | MR::MeshLoad::NamedMesh::textureFiles |
Vector< TextureId, FaceId > | MR::MeshLoad::NamedMesh::texturePerFace |
std::optional< Color > | MR::MeshLoad::NamedMesh::diffuseColor |
AffineXf3f | MR::MeshLoad::NamedMesh::xf |
transform of the loaded mesh, not identity only if ObjLoadSettings.customXf | |
int | MR::MeshLoad::NamedMesh::skippedFaceCount = 0 |
counter of skipped faces (faces than can't be created), not zero only if ObjLoadSettings.countSkippedFaces | |
int | MR::MeshLoad::NamedMesh::duplicatedVertexCount = 0 |
counter of duplicated vertices (that created for resolve non-manifold geometry) | |
MRMESH_API Expected< std::vector< NamedMesh > > MR::MeshLoad::fromSceneObjFile | ( | const char * | data, |
size_t | size, | ||
bool | combineAllObjects, | ||
const std::filesystem::path & | dir, | ||
const ObjLoadSettings & | settings = {} ) |
loads meshes from memory array with .obj file contents
dir | working directory where materials and textures are located |
MRMESH_API Expected< std::vector< NamedMesh > > MR::MeshLoad::fromSceneObjFile | ( | const std::filesystem::path & | file, |
bool | combineAllObjects, | ||
const ObjLoadSettings & | settings = {} ) |
loads meshes from .obj file
MRMESH_API Expected< std::vector< NamedMesh > > MR::MeshLoad::fromSceneObjFile | ( | std::istream & | in, |
bool | combineAllObjects, | ||
const std::filesystem::path & | dir, | ||
const ObjLoadSettings & | settings = {} ) |
loads meshes from a stream with .obj file contents important on Windows: in stream must be open in binary mode
dir | working directory where materials and textures are located |
MRMESH_API Expected< std::vector< std::shared_ptr< Object > > > MR::MeshLoad::loadObjectFromObj | ( | const std::filesystem::path & | results, |
std::string * | warnings = nullptr, | ||
ProgressCallback | cb = {} ) |
ProgressCallback MR::MeshLoad::ObjLoadSettings::callback |
callback for set progress and stop process
VertColors MR::MeshLoad::NamedMesh::colors |
bool MR::MeshLoad::ObjLoadSettings::countSkippedFaces = false |
if true, the number of skipped faces (faces than can't be created) will be counted
bool MR::MeshLoad::ObjLoadSettings::customXf = false |
if true then vertices will be returned relative to some transformation to avoid precision loss
std::optional<Color> MR::MeshLoad::NamedMesh::diffuseColor |
int MR::MeshLoad::NamedMesh::duplicatedVertexCount = 0 |
counter of duplicated vertices (that created for resolve non-manifold geometry)
Mesh MR::MeshLoad::NamedMesh::mesh |
std::string MR::MeshLoad::NamedMesh::name |
int MR::MeshLoad::NamedMesh::skippedFaceCount = 0 |
counter of skipped faces (faces than can't be created), not zero only if ObjLoadSettings.countSkippedFaces
Vector<std::filesystem::path, TextureId> MR::MeshLoad::NamedMesh::textureFiles |
Vector<TextureId, FaceId> MR::MeshLoad::NamedMesh::texturePerFace |
VertUVCoords MR::MeshLoad::NamedMesh::uvCoords |
AffineXf3f MR::MeshLoad::NamedMesh::xf |
transform of the loaded mesh, not identity only if ObjLoadSettings.customXf