Assimp  v3.1.1 (June 2014)
Assimp::ObjFileParser Class Reference

Parser for a obj waveform file. More...

Public Types

typedef std::vector< char >::const_iterator ConstDataArrayIt
 
typedef std::vector< char > DataArray
 
typedef std::vector< char >::iterator DataArrayIt
 

Public Member Functions

ObjFile::ModelGetModel () const
 Model getter. More...
 
 ObjFileParser ()
 The default constructor. More...
 
 ObjFileParser (IOStreamBuffer< char > &streamBuffer, const std::string &modelName, IOSystem *io, ProgressHandler *progress, const std::string &originalObjFileName)
 Constructor with data array. More...
 
void setBuffer (std::vector< char > &buffer)
 If you want to load in-core data. More...
 
 ~ObjFileParser ()
 Destructor. More...
 

Static Public Attributes

static const size_t Buffersize = 4096
 

Protected Member Functions

void copyNextWord (char *pBuffer, size_t length)
 Method to copy the new delimited word in the current line. More...
 
void createMesh (const std::string &meshName)
 Creates a new mesh. More...
 
void createObject (const std::string &strObjectName)
 Creates a new object. More...
 
void getComment ()
 Gets a comment. More...
 
void getFace (aiPrimitiveType type)
 Stores the following face. More...
 
void getGroupName ()
 Gets the group name from file. More...
 
void getGroupNumber ()
 Gets the group number from file. More...
 
void getGroupNumberAndResolution ()
 Gets the group number and resolution from file. More...
 
void getHomogeneousVector3 (std::vector< aiVector3D > &point3d_array)
 Stores the following homogeneous vector as a 3D vector. More...
 
void getMaterialDesc ()
 Reads the material description. More...
 
int getMaterialIndex (const std::string &strMaterialName)
 Returns the index of the material. Is -1 if not material was found. More...
 
void getMaterialLib ()
 Gets a a material library. More...
 
void getNewMaterial ()
 Creates a new material. More...
 
size_t getNumComponentsInDataDefinition ()
 Method to copy the new line. More...
 
void getObjectName ()
 Parse object name. More...
 
void getTwoVectors3 (std::vector< aiVector3D > &point3d_array_a, std::vector< aiVector3D > &point3d_array_b)
 Stores the following two 3d vectors on the line. More...
 
void getVector (std::vector< aiVector3D > &point3d_array)
 Stores the vector. More...
 
void getVector2 (std::vector< aiVector2D > &point2d_array)
 Stores the following 3d vector. More...
 
void getVector3 (std::vector< aiVector3D > &point3d_array)
 Stores the following 3d vector. More...
 
bool needsNewMesh (const std::string &rMaterialName)
 Returns true, if a new mesh instance must be created. More...
 
void parseFile (IOStreamBuffer< char > &streamBuffer)
 Parse the loaded file. More...
 
void reportErrorTokenInFace ()
 Error report in token. More...
 

Detailed Description

Parser for a obj waveform file.

Member Typedef Documentation

◆ ConstDataArrayIt

typedef std::vector<char>::const_iterator Assimp::ObjFileParser::ConstDataArrayIt

◆ DataArray

typedef std::vector<char> Assimp::ObjFileParser::DataArray

◆ DataArrayIt

typedef std::vector<char>::iterator Assimp::ObjFileParser::DataArrayIt

Constructor & Destructor Documentation

◆ ObjFileParser() [1/2]

Assimp::ObjFileParser::ObjFileParser ( )

The default constructor.

◆ ObjFileParser() [2/2]

Assimp::ObjFileParser::ObjFileParser ( IOStreamBuffer< char > &  streamBuffer,
const std::string &  modelName,
IOSystem io,
ProgressHandler progress,
const std::string &  originalObjFileName 
)

Constructor with data array.

◆ ~ObjFileParser()

Assimp::ObjFileParser::~ObjFileParser ( )

Destructor.

Member Function Documentation

◆ copyNextWord()

void Assimp::ObjFileParser::copyNextWord ( char *  pBuffer,
size_t  length 
)
protected

Method to copy the new delimited word in the current line.

◆ createMesh()

void Assimp::ObjFileParser::createMesh ( const std::string &  meshName)
protected

Creates a new mesh.

◆ createObject()

void Assimp::ObjFileParser::createObject ( const std::string &  strObjectName)
protected

Creates a new object.

◆ getComment()

void Assimp::ObjFileParser::getComment ( )
protected

Gets a comment.

◆ getFace()

void Assimp::ObjFileParser::getFace ( aiPrimitiveType  type)
protected

Stores the following face.

◆ getGroupName()

void Assimp::ObjFileParser::getGroupName ( )
protected

Gets the group name from file.

◆ getGroupNumber()

void Assimp::ObjFileParser::getGroupNumber ( )
protected

Gets the group number from file.

◆ getGroupNumberAndResolution()

void Assimp::ObjFileParser::getGroupNumberAndResolution ( )
protected

Gets the group number and resolution from file.

◆ getHomogeneousVector3()

void Assimp::ObjFileParser::getHomogeneousVector3 ( std::vector< aiVector3D > &  point3d_array)
protected

Stores the following homogeneous vector as a 3D vector.

◆ getMaterialDesc()

void Assimp::ObjFileParser::getMaterialDesc ( )
protected

Reads the material description.

◆ getMaterialIndex()

int Assimp::ObjFileParser::getMaterialIndex ( const std::string &  strMaterialName)
protected

Returns the index of the material. Is -1 if not material was found.

◆ getMaterialLib()

void Assimp::ObjFileParser::getMaterialLib ( )
protected

Gets a a material library.

◆ GetModel()

ObjFile::Model * Assimp::ObjFileParser::GetModel ( ) const

Model getter.

◆ getNewMaterial()

void Assimp::ObjFileParser::getNewMaterial ( )
protected

Creates a new material.

◆ getNumComponentsInDataDefinition()

size_t Assimp::ObjFileParser::getNumComponentsInDataDefinition ( )
protected

Method to copy the new line.

Get the number of components in a line.

◆ getObjectName()

void Assimp::ObjFileParser::getObjectName ( )
protected

Parse object name.

◆ getTwoVectors3()

void Assimp::ObjFileParser::getTwoVectors3 ( std::vector< aiVector3D > &  point3d_array_a,
std::vector< aiVector3D > &  point3d_array_b 
)
protected

Stores the following two 3d vectors on the line.

◆ getVector()

void Assimp::ObjFileParser::getVector ( std::vector< aiVector3D > &  point3d_array)
protected

Stores the vector.

◆ getVector2()

void Assimp::ObjFileParser::getVector2 ( std::vector< aiVector2D > &  point2d_array)
protected

Stores the following 3d vector.

◆ getVector3()

void Assimp::ObjFileParser::getVector3 ( std::vector< aiVector3D > &  point3d_array)
protected

Stores the following 3d vector.

◆ needsNewMesh()

bool Assimp::ObjFileParser::needsNewMesh ( const std::string &  rMaterialName)
protected

Returns true, if a new mesh instance must be created.

◆ parseFile()

void Assimp::ObjFileParser::parseFile ( IOStreamBuffer< char > &  streamBuffer)
protected

Parse the loaded file.

◆ reportErrorTokenInFace()

void Assimp::ObjFileParser::reportErrorTokenInFace ( )
protected

Error report in token.

◆ setBuffer()

void Assimp::ObjFileParser::setBuffer ( std::vector< char > &  buffer)

If you want to load in-core data.

Member Data Documentation

◆ Buffersize

const size_t Assimp::ObjFileParser::Buffersize = 4096
static

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