#include <ObjLoader.h>
Inherits cinder::geom::Source.
|
| ObjLoader (std::shared_ptr< IStreamCinder > stream, bool includeNormals=true, bool includeTexCoords=true, bool optimize=true) |
|
| ObjLoader (DataSourceRef dataSource, bool includeNormals=true, bool includeTexCoords=true, bool optimize=true) |
|
| ObjLoader (DataSourceRef dataSource, DataSourceRef materialSource, bool includeNormals=true, bool includeTexCoords=true, bool optimize=true) |
|
ObjLoader & | groupIndex (size_t groupIndex) |
|
ObjLoader & | groupName (const std::string &groupName) |
|
bool | hasGroup (const std::string &groupName) const |
|
size_t | getNumGroups () const |
|
const std::vector< Group > & | getGroups () const |
|
size_t | getNumVertices () const override |
|
size_t | getNumIndices () const override |
|
geom::Primitive | getPrimitive () const override |
|
uint8_t | getAttribDims (geom::Attrib attr) const override |
|
geom::AttribSet | getAvailableAttribs () const override |
|
void | loadInto (geom::Target *target, const geom::AttribSet &requestedAttribs) const override |
|
Source * | clone () const override |
|
Loads Alias|Wavefront .OBJ file format.
Example usage:
cinder::ObjLoader::ObjLoader |
( |
std::shared_ptr< IStreamCinder > |
stream, |
|
|
bool |
includeNormals = true , |
|
|
bool |
includeTexCoords = true , |
|
|
bool |
optimize = true |
|
) |
| |
Constructs and does the parsing of the file
- Parameters
-
includeNormals | if false texture coordinates will be skipped, which can provide a faster load time |
includeTexCoords | if false normasls will be skipped, which can provide a faster load time |
cinder::ObjLoader::ObjLoader |
( |
DataSourceRef |
dataSource, |
|
|
bool |
includeNormals = true , |
|
|
bool |
includeTexCoords = true , |
|
|
bool |
optimize = true |
|
) |
| |
Constructs and does the parsing of the file
- Parameters
-
includeNormals | if false texture coordinates will be skipped, which can provide a faster load time |
includeTexCoords | if false normasls will be skipped, which can provide a faster load time |
cinder::ObjLoader::ObjLoader |
( |
DataSourceRef |
dataSource, |
|
|
DataSourceRef |
materialSource, |
|
|
bool |
includeNormals = true , |
|
|
bool |
includeTexCoords = true , |
|
|
bool |
optimize = true |
|
) |
| |
Constructs and does the parsing of the file
- Parameters
-
includeNormals | if false texture coordinates will be skipped, which can provide a faster load time |
includeTexCoords | if false normasls will be skipped, which can provide a faster load time |
ObjLoader & cinder::ObjLoader::groupIndex |
( |
size_t |
groupIndex | ) |
|
Loads a specific group index from the file
ObjLoader & cinder::ObjLoader::groupName |
( |
const std::string & |
groupName | ) |
|
Loads a specific group name from the file
bool cinder::ObjLoader::hasGroup |
( |
const std::string & |
groupName | ) |
const |
Returns whether the file contains a group labeled with groupName
size_t cinder::ObjLoader::getNumGroups |
( |
| ) |
const |
Returns the total number of groups.
const std::vector<Group>& cinder::ObjLoader::getGroups |
( |
| ) |
const |
Returns a vector<> of the Groups in the OBJ.
size_t cinder::ObjLoader::getNumVertices |
( |
| ) |
const |
|
overridevirtual |
size_t cinder::ObjLoader::getNumIndices |
( |
| ) |
const |
|
overridevirtual |
uint8_t cinder::ObjLoader::getAttribDims |
( |
geom::Attrib |
attr | ) |
const |
|
overridevirtual |
Source* cinder::ObjLoader::clone |
( |
| ) |
const |
|
overridevirtual |
void cinder::geom::Source::copyIndicesNonIndexed |
( |
uint16_t * |
dest | ) |
const |
|
protectedinherited |
Builds a sequential list of vertices to simulate an indexed geometry when Source is non-indexed. Assumes dest contains storage for getNumVertices() entries.
void cinder::geom::Source::copyIndicesNonIndexed |
( |
uint32_t * |
dest | ) |
const |
|
protectedinherited |
Builds a sequential list of vertices to simulate an indexed geometry when Source is non-indexed. Assumes dest contains storage for getNumVertices() entries.
template<typename T >
void cinder::geom::Source::forceCopyIndicesTrianglesImpl |
( |
T * |
dest | ) |
const |
|
protectedinherited |
The documentation for this class was generated from the following files: