scimesh
0.3.4
Headless CPU-only 3D software renderer for scientific mesh visualization
Loading...
Searching...
No Matches
obj_io.cpp
Go to the documentation of this file.
1
#include <
scimesh/obj_io.h
>
2
#include <
scimesh/fs_mesh_converter.h
>
3
#include "libfs.h"
4
5
namespace
scimesh
{
6
namespace
obj_io {
7
8
Mesh
read_obj
(
const
std::string &
path
) {
9
fs::Mesh
fs_mesh
;
10
fs::Mesh::from_obj(&
fs_mesh
,
path
);
11
12
// Convert to scimesh Mesh. Normals are not loaded from OBJ — call
13
// compute_vertex_normals() on the result if lighting is needed.
14
// Texture coordinates (vt) and materials (mtllib) are not loaded.
15
return
convert_fs_mesh
(
fs_mesh
);
16
}
17
18
}
// namespace obj_io
19
}
// namespace scimesh
fs_mesh_converter.h
Convert FreeSurfer meshes (libfs) to scimesh Mesh objects.
scimesh::obj_io::read_obj
Mesh read_obj(const std::string &path)
Load a mesh from a Wavefront OBJ file.
Definition
obj_io.cpp:8
scimesh
Definition
camera.cpp:8
scimesh::convert_fs_mesh
Mesh convert_fs_mesh(const fs::Mesh &fs_mesh)
Convert a FreeSurfer mesh to a scimesh Mesh (no colors).
Definition
fs_mesh_converter.h:37
obj_io.h
Read Wavefront OBJ files (.obj).
scimesh::Mesh
A 3D triangle mesh using an indexed face set representation.
Definition
mesh.h:76
x
int x
Left edge of the bitmap, in image pixels.
Definition
text.cpp:223
src
core
obj_io.cpp
Generated by
1.9.8