ug4
ug::LoaderObj Class Reference

#include <loader_obj.h>

Classes

class  Material
 
class  Object
 

Public Types

typedef std::vector< MaterialMaterialVector
 
typedef ObjectVector::iterator ObjectIterator
 
typedef std::vector< Object * > ObjectVector
 

Public Member Functions

void clear ()
 
const Materialget_material (int index) const
 
const Objectget_object (int index) const
 
bool load_file (const char *strFilename, bool convertQuadsToTris=true)
 
int num_materials () const
 
int num_objects () const
 
int num_points ()
 
int num_uvs ()
 
ObjectIterator objects_begin ()
 
ObjectIterator objects_end ()
 
const ug::vector3point (int index) const
 
std::vector< ug::vector3 >::const_iterator points_begin ()
 
std::vector< ug::vector3 >::const_iterator points_end ()
 
const ug::vector2uv (int index) const
 
std::vector< ug::vector2 >::const_iterator uv_begin ()
 
std::vector< ug::vector2 >::const_iterator uv_end ()
 
 ~LoaderObj ()
 

Protected Member Functions

int get_material_index_by_name (const char *name) const
 

Protected Attributes

MaterialVector m_vMaterials
 
ObjectVector m_vObjects
 
std::vector< ug::vector3m_vPoints
 
std::vector< ug::vector2m_vTexCoords
 

Member Typedef Documentation

◆ MaterialVector

◆ ObjectIterator

typedef ObjectVector::iterator ug::LoaderObj::ObjectIterator

◆ ObjectVector

typedef std::vector<Object*> ug::LoaderObj::ObjectVector

Constructor & Destructor Documentation

◆ ~LoaderObj()

ug::LoaderObj::~LoaderObj ( )

Member Function Documentation

◆ clear()

void ug::LoaderObj::clear ( )

◆ get_material()

const Material& ug::LoaderObj::get_material ( int  index) const
inline

References m_vMaterials.

Referenced by ug::LoadGridFromOBJ().

◆ get_material_index_by_name()

int ug::LoaderObj::get_material_index_by_name ( const char *  name) const
protected

References name.

◆ get_object()

const Object* ug::LoaderObj::get_object ( int  index) const
inline

References m_vObjects.

◆ load_file()

◆ num_materials()

int ug::LoaderObj::num_materials ( ) const
inline

References m_vMaterials.

Referenced by ug::LoadGridFromOBJ().

◆ num_objects()

int ug::LoaderObj::num_objects ( ) const
inline

References m_vObjects.

◆ num_points()

int ug::LoaderObj::num_points ( )
inline

References m_vPoints.

Referenced by ug::LoadGridFromOBJ().

◆ num_uvs()

int ug::LoaderObj::num_uvs ( )
inline

References m_vTexCoords.

◆ objects_begin()

ObjectIterator ug::LoaderObj::objects_begin ( )
inline

References m_vObjects.

Referenced by ug::LoadGridFromOBJ().

◆ objects_end()

ObjectIterator ug::LoaderObj::objects_end ( )
inline

References m_vObjects.

Referenced by ug::LoadGridFromOBJ().

◆ point()

const ug::vector3* ug::LoaderObj::point ( int  index) const
inline

References m_vPoints.

Referenced by ug::LoadGridFromOBJ().

◆ points_begin()

std::vector<ug::vector3>::const_iterator ug::LoaderObj::points_begin ( )
inline

References m_vPoints.

◆ points_end()

std::vector<ug::vector3>::const_iterator ug::LoaderObj::points_end ( )
inline

References m_vPoints.

◆ uv()

const ug::vector2* ug::LoaderObj::uv ( int  index) const
inline

References m_vTexCoords.

Referenced by ug::LoadGridFromOBJ().

◆ uv_begin()

std::vector<ug::vector2>::const_iterator ug::LoaderObj::uv_begin ( )
inline

References m_vTexCoords.

◆ uv_end()

std::vector<ug::vector2>::const_iterator ug::LoaderObj::uv_end ( )
inline

References m_vTexCoords.

Member Data Documentation

◆ m_vMaterials

MaterialVector ug::LoaderObj::m_vMaterials
protected

Referenced by get_material(), and num_materials().

◆ m_vObjects

ObjectVector ug::LoaderObj::m_vObjects
protected

◆ m_vPoints

std::vector<ug::vector3> ug::LoaderObj::m_vPoints
protected

◆ m_vTexCoords

std::vector<ug::vector2> ug::LoaderObj::m_vTexCoords
protected

Referenced by num_uvs(), uv(), uv_begin(), and uv_end().


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