Read an OBJ file into a volcart::ITKMesh.
More...
#include <vc/core/io/OBJReader.hpp>
|
void | setPath (const filesystem::path &p) |
| Set the OBJ file path.
|
|
auto | read () -> ITKMesh::Pointer |
| Read the mesh from file.
|
|
auto | getMesh () -> ITKMesh::Pointer |
| Return the parsed mesh.
|
|
auto | getUVMap () -> UVMap::Pointer |
| Return parsed UV information. More...
|
|
auto | getTextureMat () -> cv::Mat |
| Return texture image as cv::Mat. More...
|
|
Read an OBJ file into a volcart::ITKMesh.
- Author
- Zack Anderson, Seth Parker
- Date
- 02/09/2017
Supports image mapped meshes. Image path is parsed from the OBJ's mtl include. Other material properties are currently ignored. Throws volcart::IOException on error.
Definition at line 29 of file OBJReader.hpp.
◆ Face
◆ VertexRefs
◆ RefType
◆ build_mesh_()
void volcart::io::OBJReader::build_mesh_ |
( |
| ) |
|
|
private |
Construct a mesh from the parsed information
◆ classify_vertref_()
auto volcart::io::OBJReader::classify_vertref_ |
( |
const std::string & |
ref | ) |
-> RefType |
|
private |
◆ getTextureMat()
auto volcart::io::OBJReader::getTextureMat |
( |
| ) |
-> cv::Mat |
Return texture image as cv::Mat.
If no texture image was read from MTL file or if the file does not exist, throws a volcart::IOException.
◆ getUVMap()
Return parsed UV information.
If no UV information is read, returns an empty volcart::UVMap.
◆ parse_()
void volcart::io::OBJReader::parse_ |
( |
| ) |
|
|
private |
◆ parse_face_()
void volcart::io::OBJReader::parse_face_ |
( |
const std::vector< std::string > & |
strs | ) |
|
|
private |
◆ parse_mtllib_()
void volcart::io::OBJReader::parse_mtllib_ |
( |
const std::vector< std::string > & |
strs | ) |
|
|
private |
Handle parsed mtllib lines
◆ parse_normal_()
void volcart::io::OBJReader::parse_normal_ |
( |
const std::vector< std::string > & |
strs | ) |
|
|
private |
Handle parsed vertex normal lines
◆ parse_tcoord_()
void volcart::io::OBJReader::parse_tcoord_ |
( |
const std::vector< std::string > & |
strs | ) |
|
|
private |
Handle parsed vertex UV coordinate lines
◆ parse_vertex_()
void volcart::io::OBJReader::parse_vertex_ |
( |
const std::vector< std::string > & |
strs | ) |
|
|
private |
Handle parsed vertex lines
◆ reset_()
void volcart::io::OBJReader::reset_ |
( |
| ) |
|
|
private |
Clear all temporary data structures
◆ faces_
◆ mesh_
ITKMesh::Pointer volcart::io::OBJReader::mesh_ |
|
private |
Internal representation of mesh structure
Definition at line 107 of file OBJReader.hpp.
◆ normals_
std::vector<cv::Vec3d> volcart::io::OBJReader::normals_ |
|
private |
◆ path_
filesystem::path volcart::io::OBJReader::path_ |
|
private |
◆ textureMat_
cv::Mat volcart::io::OBJReader::textureMat_ |
|
private |
Internal representation of texture image
Definition at line 111 of file OBJReader.hpp.
◆ texturePath_
filesystem::path volcart::io::OBJReader::texturePath_ |
|
private |
◆ uvMap_
◆ uvs_
std::vector<cv::Vec2d> volcart::io::OBJReader::uvs_ |
|
private |
List of parsed vertex UV coordinates
Definition at line 118 of file OBJReader.hpp.
◆ vertices_
std::vector<cv::Vec3d> volcart::io::OBJReader::vertices_ |
|
private |
The documentation for this class was generated from the following file: