Loads Alias|Wavefront .OBJ file format.
More...
#include <ObjLoader.h>
List of all members.
Classes |
| struct | Face |
| struct | Group |
| struct | Material |
Public Member Functions |
| | ObjLoader (std::shared_ptr< IStream > aStream, bool includeUVs=true) |
| | ObjLoader (DataSourceRef dataSource, bool includeUVs=true) |
| | ObjLoader (DataSourceRef dataSource, DataSourceRef materialSource, bool includeUVs=true) |
| | ~ObjLoader () |
| void | load (TriMesh *destTriMesh, boost::tribool loadNormals=boost::logic::indeterminate, boost::tribool loadTexCoords=boost::logic::indeterminate, bool optimizeVertices=true) |
| void | load (size_t groupIndex, TriMesh *destTriMesh, boost::tribool loadNormals=boost::logic::indeterminate, boost::tribool loadTexCoords=boost::logic::indeterminate, bool optimizeVertices=true) |
| size_t | getNumGroups () const |
| | Returns the total number of groups.
|
| const std::vector< Group > & | getGroups () const |
| | Returns a vector<> of the Groups in the OBJ.
|
Static Public Member Functions |
| static void | write (DataTargetRef dataTarget, const TriMesh &mesh, bool writeNormals=true, bool writeUVs=true) |
| | Writes a new OBJ file to dataTarget.
|
Detailed Description
Loads Alias|Wavefront .OBJ file format.
Currently does not support anything but polygonal data
Example usage:
Constructor & Destructor Documentation
Constructs and does the parsing of the file
- Parameters:
-
| includeUVs | if false UV coordinates will be skipped, which can provide a faster load time |
Constructs and does the parsing of the file
- Parameters:
-
| includeUVs | if false UV coordinates will be skipped, which can provide a faster load time |
Constructs and does the parsing of the file
- Parameters:
-
| includeUVs | if false UV coordinates will be skipped, which can provide a faster load time |
Member Function Documentation
| void cinder::ObjLoader::load |
( |
TriMesh * |
destTriMesh, |
|
|
boost::tribool |
loadNormals = boost::logic::indeterminate, |
|
|
boost::tribool |
loadTexCoords = boost::logic::indeterminate, |
|
|
bool |
optimizeVertices = true |
|
) |
| |
Loads all the groups present in the file into a single TriMesh
- Parameters:
-
| destTriMesh | the destination TriMesh, whose contents are cleared first |
| loadNormals | should normals be loaded or generated if not present. Default determines from the contents of the file |
| loadTexCoords | should 2D texture coordinates be loaded or set to zero if not present. Default determines from the contents of the file |
| optimizeVertices | should the loader minimze the vertices by identifying shared vertices between faces. |
| void cinder::ObjLoader::load |
( |
size_t |
groupIndex, |
|
|
TriMesh * |
destTriMesh, |
|
|
boost::tribool |
loadNormals = boost::logic::indeterminate, |
|
|
boost::tribool |
loadTexCoords = boost::logic::indeterminate, |
|
|
bool |
optimizeVertices = true |
|
) |
| |
Loads a particular group into a TriMesh
- Parameters:
-
| loadNormals | should normals be loaded or generated if not present. Default determines from the contents of the file |
| loadTexCoords | should 2D texture coordinates be loaded or set to zero if not present. Default determines from the contents of the file |
| optimizeVertices | should the loader minimize the vertices by identifying shared vertices between faces. |
Writes a new OBJ file to dataTarget.
- Warning:
- - this method will be moved in the future
Returns the total number of groups.
Returns a vector<> of the Groups in the OBJ.
The documentation for this class was generated from the following files: