Developer Documentation
ACG::MeshCompilerDefaultFaceInput Class Reference
Inheritance diagram for ACG::MeshCompilerDefaultFaceInput:
ACG::MeshCompilerFaceInput SBFReader

Public Member Functions

 MeshCompilerDefaultFaceInput (int _numFaces, int _numIndices)
 
int getNumFaces () const override
 
int getNumIndices () const override
 
int getFaceSize (const int _faceID) const override
 
int getSingleFaceAttr (const int _faceID, const int _faceCorner, const int _attrID) const override
 
bool getFaceAttr (const int _faceID, const int _attrID, int *_out) const override
 
void dbgWriteToObjFile (FILE *_file, int _posAttrID=0, int _normalAttrID=-1, int _texcAttrID=-1)
 
void setFaceData (int _faceID, int _size, int *_data, int _attrID=0)
 
- Public Member Functions inherited from ACG::MeshCompilerFaceInput
virtual int getNumFaces () const =0
 
virtual int getNumIndices () const =0
 
virtual int getFaceSize (const int _faceID) const =0
 
virtual int getSingleFaceAttr (const int _faceID, const int _faceCorner, const int _attrID) const
 
virtual bool getFaceAttr (const int _faceID, const int _attrID, int *_out) const
 
virtual int * getFaceAttr (const int _faceID, const int _attrID) const
 
virtual int getVertexAdjCount (const int _vertexID) const
 
virtual int getVertexAdjFace (const int _vertexID, const int _k) const
 

Protected Attributes

int numFaces_
 
int numIndices_
 
std::vector< int > faceOffset_
 
std::vector< int > faceSize_
 
std::vector< int > faceData_ [16]
 

Detailed Description

Definition at line 193 of file MeshCompiler.hh.

Constructor & Destructor Documentation

◆ MeshCompilerDefaultFaceInput()

ACG::MeshCompilerDefaultFaceInput::MeshCompilerDefaultFaceInput ( int  _numFaces,
int  _numIndices 
)

Definition at line 1193 of file MeshCompiler.cc.

◆ ~MeshCompilerDefaultFaceInput()

virtual ACG::MeshCompilerDefaultFaceInput::~MeshCompilerDefaultFaceInput ( )
inlinevirtual

Definition at line 197 of file MeshCompiler.hh.

Member Function Documentation

◆ dbgWriteToObjFile()

void ACG::MeshCompilerDefaultFaceInput::dbgWriteToObjFile ( FILE *  _file,
int  _posAttrID = 0,
int  _normalAttrID = -1,
int  _texcAttrID = -1 
)

Definition at line 4087 of file MeshCompiler.cc.

◆ getFaceAttr()

bool ACG::MeshCompilerDefaultFaceInput::getFaceAttr ( const int  _faceID,
const int  _attrID,
int *  _out 
) const
overridevirtual

Get an index buffer of a face for a specific attribute channel.

Parameters
_faceIDface index
_attrIDattribute channel
_outpointer to output buffer, use getFaceSize(_faceID) to get the size needed to store face data
Returns
true if successful, false otherwise

Reimplemented from ACG::MeshCompilerFaceInput.

Definition at line 4117 of file MeshCompiler.cc.

◆ getFaceSize()

int ACG::MeshCompilerDefaultFaceInput::getFaceSize ( const int  _faceID) const
inlineoverridevirtual

Get number of vertices per face.

Parameters
_faceIDface index

Implements ACG::MeshCompilerFaceInput.

Definition at line 202 of file MeshCompiler.hh.

◆ getNumFaces()

int ACG::MeshCompilerDefaultFaceInput::getNumFaces ( ) const
inlineoverridevirtual

Implements ACG::MeshCompilerFaceInput.

Definition at line 199 of file MeshCompiler.hh.

◆ getNumIndices()

int ACG::MeshCompilerDefaultFaceInput::getNumIndices ( ) const
inlineoverridevirtual

Get total number of indices in one attribute channel.

i.e. total number of position indices of the whole mesh

Implements ACG::MeshCompilerFaceInput.

Definition at line 200 of file MeshCompiler.hh.

◆ getSingleFaceAttr()

int ACG::MeshCompilerDefaultFaceInput::getSingleFaceAttr ( const int  _faceID,
const int  _faceCorner,
const int  _attrID 
) const
overridevirtual

Get a single vertex-index entry of a face.

Parameters
_faceIDface index
_faceCornervertex corner of the face
_attrIDattribute channel
Returns
index-data if successful, -1 otherwise

Reimplemented from ACG::MeshCompilerFaceInput.

Definition at line 4128 of file MeshCompiler.cc.

◆ setFaceData()

void ACG::MeshCompilerDefaultFaceInput::setFaceData ( int  _faceID,
int  _size,
int *  _data,
int  _attrID = 0 
)

Definition at line 4141 of file MeshCompiler.cc.

Member Data Documentation

◆ faceData_

std::vector<int> ACG::MeshCompilerDefaultFaceInput::faceData_[16]
protected

Definition at line 224 of file MeshCompiler.hh.

◆ faceOffset_

std::vector<int> ACG::MeshCompilerDefaultFaceInput::faceOffset_
protected

Definition at line 220 of file MeshCompiler.hh.

◆ faceSize_

std::vector<int> ACG::MeshCompilerDefaultFaceInput::faceSize_
protected

Definition at line 221 of file MeshCompiler.hh.

◆ numFaces_

int ACG::MeshCompilerDefaultFaceInput::numFaces_
protected

Definition at line 215 of file MeshCompiler.hh.

◆ numIndices_

int ACG::MeshCompilerDefaultFaceInput::numIndices_
protected

Definition at line 216 of file MeshCompiler.hh.


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