.obj (Wavefront) file parser class. The file format has to be somewhat specific, with triangulated faces and containing the normals. Such a file can be exported from Blender for example (see blender.org). From the file menu, select Export > Wavefront (.obj). Then from the "Export OBJ" menu, only select "Write Normals", "Triangulate Faces" and "Keep Vertex Order".
More...
#include <WavefrontFile.hpp>
|
| | WavefrontFile (const std::string &filePath) |
| | Constructor.
|
| |
| void | load (Model &model, const std::string &meshName) override |
| | Load data from the Wavefront file into a Model.
|
| |
| std::vector< std::string > | getMeshNames () override |
| | Get a list of the names of the meshes contained in the file.
|
| |
| | File (const std::string &fileLocation) |
| | Constructor.
|
| |
|
|
std::string | fullPath = "" |
| | The path to the file being parsed.
|
| |
.obj (Wavefront) file parser class. The file format has to be somewhat specific, with triangulated faces and containing the normals. Such a file can be exported from Blender for example (see blender.org). From the file menu, select Export > Wavefront (.obj). Then from the "Export OBJ" menu, only select "Write Normals", "Triangulate Faces" and "Keep Vertex Order".
◆ WavefrontFile()
| small3d::WavefrontFile::WavefrontFile |
( |
const std::string & | filePath | ) |
|
|
explicit |
Constructor.
- Parameters
-
| filePath | Path to wavefront file |
◆ getMeshNames()
| std::vector< std::string > small3d::WavefrontFile::getMeshNames |
( |
| ) |
|
|
overridevirtual |
Get a list of the names of the meshes contained in the file.
- Returns
- The list of mesh names
Implements small3d::File.
◆ load()
| void small3d::WavefrontFile::load |
( |
Model & | model, |
|
|
const std::string & | meshName ) |
|
overridevirtual |
Load data from the Wavefront file into a Model.
- Parameters
-
| model | The model to load the data to |
| meshName | The name of the mesh to load |
Implements small3d::File.
The documentation for this class was generated from the following files: