Public Member Functions | Private Member Functions | List of all members
lvr2::ObjIO Class Reference

A basic implementation of the obj file format. More...

#include <ObjIO.hpp>

Inheritance diagram for lvr2::ObjIO:
Inheritance graph
[legend]

Public Member Functions

 ObjIO ()
 Constructor. More...
 
ModelPtr read (string filename)
 Parse the given file and load supported elements. More...
 
void save (string filename)
 Writes the mesh to an obj file. More...
 
 ~ObjIO ()
 
- Public Member Functions inherited from lvr2::BaseIO
 BaseIO ()
 
virtual ModelPtr getModel ()
 Get the model for io operations. More...
 
virtual ModelPtr read (std::string filename)=0
 Parse the given file and load supported elements. More...
 
virtual void save (ModelPtr model, std::string filename)
 Set the model and save the loaded elements to the given file. More...
 
virtual void save (std::string filename)=0
 Save the loaded elements to the given file. More...
 
virtual void setModel (ModelPtr m)
 Set the model for io operations to use. More...
 
virtual ~BaseIO ()
 

Private Member Functions

void parseMtlFile (map< string, int > &matNames, vector< Material > &materials, vector< Texture > &textures, string mtlname)
 

Additional Inherited Members

- Protected Attributes inherited from lvr2::BaseIO
ModelPtr m_model
 

Detailed Description

A basic implementation of the obj file format.

Definition at line 53 of file ObjIO.hpp.

Constructor & Destructor Documentation

◆ ObjIO()

lvr2::ObjIO::ObjIO ( )
inline

Constructor.

Definition at line 60 of file ObjIO.hpp.

◆ ~ObjIO()

lvr2::ObjIO::~ObjIO ( )
inline

Definition at line 65 of file ObjIO.hpp.

Member Function Documentation

◆ parseMtlFile()

void lvr2::ObjIO::parseMtlFile ( map< string, int > &  matNames,
vector< Material > &  materials,
vector< Texture > &  textures,
string  mtlname 
)
private

Definition at line 83 of file ObjIO.cpp.

◆ read()

ModelPtr lvr2::ObjIO::read ( string  filename)

Parse the given file and load supported elements.

Parameters
filenameThe file to read.

Definition at line 170 of file ObjIO.cpp.

◆ save()

void lvr2::ObjIO::save ( string  filename)

Writes the mesh to an obj file.

Parameters
modelThe model containing all mesh data
filenameThe file name to use

Definition at line 337 of file ObjIO.cpp.


The documentation for this class was generated from the following files:


lvr2
Author(s): Thomas Wiemann , Sebastian Pütz , Alexander Mock , Lars Kiesow , Lukas Kalbertodt , Tristan Igelbrink , Johan M. von Behren , Dominik Feldschnieders , Alexander Löhr
autogenerated on Wed Mar 2 2022 00:37:27