TDME2 1.9.121
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
Face Class Referencefinal

Represents a model face, consisting of vertex, normal, tangent and bitangent vectors, indices and texture coordinate. More...

#include <tdme/engine/model/Face.h>

Collaboration diagram for Face:
Collaboration graph

Public Member Functions

 Face ()
 Public constructor. More...
 
 Face (Node *node, int32_t vi0, int32_t vi1, int32_t vi2, int32_t ni0, int32_t ni1, int32_t ni2)
 Public constructor, requires vertex, normals indices we only support triangulated faces. More...
 
 Face (Node *node, int32_t vi0, int32_t vi1, int32_t vi2, int32_t ni0, int32_t ni1, int32_t ni2, int32_t vt0, int32_t vt1, int32_t vt2)
 Public constructor, requires vertex, normals indices, texture coordinate indices we only support triangulated faces. More...
 
NodegetNode () const
 
const array< int32_t, 3 > & getVertexIndices () const
 
const array< int32_t, 3 > & getNormalIndices () const
 
void setNormalIndices (int32_t ni0, int32_t ni1, int32_t ni2)
 Set normal indices. More...
 
void setTextureCoordinateIndices (int32_t vt0, int32_t vt1, int32_t vt2)
 Set up optional texture coordinate indices. More...
 
const array< int32_t, 3 > & getTextureCoordinateIndices () const
 
void setTangentIndices (int32_t ti0, int32_t ti1, int32_t ti2)
 Set tangent indices. More...
 
const array< int32_t, 3 > & getTangentIndices () const
 
void setBitangentIndices (int32_t bi0, int32_t bi1, int32_t bi2)
 Set bitangent indices. More...
 
const array< int32_t, 3 > & getBitangentIndices () const
 

Private Member Functions

void setIndexedRenderingIndices (const array< int32_t, 3 > &indices)
 Prepared this face for indexed rendering. More...
 

Private Attributes

Nodenode { nullptr }
 
array< int32_t, 3 > vertexIndices {{ -1, -1, -1 }}
 
array< int32_t, 3 > normalIndices {{ -1, -1, -1 }}
 
array< int32_t, 3 > textureCoordinateIndices {{ -1, -1, -1 }}
 
array< int32_t, 3 > tangentIndices {{ -1, -1, -1 }}
 
array< int32_t, 3 > bitangentIndices {{ -1, -1, -1 }}
 

Friends

class tdme::utilities::ModelTools
 

Detailed Description

Represents a model face, consisting of vertex, normal, tangent and bitangent vectors, indices and texture coordinate.

Author
andreas.drewke
Version
$Id$

Definition at line 18 of file Face.h.

Constructor & Destructor Documentation

◆ Face() [1/3]

Face ( )

Public constructor.

Definition at line 9 of file Face.cpp.

◆ Face() [2/3]

Face ( Node node,
int32_t  vi0,
int32_t  vi1,
int32_t  vi2,
int32_t  ni0,
int32_t  ni1,
int32_t  ni2 
)

Public constructor, requires vertex, normals indices we only support triangulated faces.

Parameters
nodemodel
vi0vertex index 0
vi1vertex index 1
vi2vertex index 2
ni0normal index 0
ni1normal index 1
ni2normal index 2

Definition at line 13 of file Face.cpp.

◆ Face() [3/3]

Face ( Node node,
int32_t  vi0,
int32_t  vi1,
int32_t  vi2,
int32_t  ni0,
int32_t  ni1,
int32_t  ni2,
int32_t  vt0,
int32_t  vt1,
int32_t  vt2 
)

Public constructor, requires vertex, normals indices, texture coordinate indices we only support triangulated faces.

Parameters
nodemodel
vi0vertex index 0
vi1vertex index 1
vi2vertex index 2
ni0normal index 0
ni1normal index 1
ni2normal index 2
vt0texture coordinate index 0
vt1texture coordinate index 1
vt2texture coordinate index 2

Definition at line 24 of file Face.cpp.

Member Function Documentation

◆ getBitangentIndices()

const array< int32_t, 3 > & getBitangentIndices ( ) const
inline
Returns
bi tangent indices

Definition at line 141 of file Face.h.

◆ getNode()

Node * getNode ( ) const
inline
Returns
node

Definition at line 74 of file Face.h.

◆ getNormalIndices()

const array< int32_t, 3 > & getNormalIndices ( ) const
inline
Returns
normal indices

Definition at line 88 of file Face.h.

◆ getTangentIndices()

const array< int32_t, 3 > & getTangentIndices ( ) const
inline
Returns
tangent indices

Definition at line 126 of file Face.h.

◆ getTextureCoordinateIndices()

const array< int32_t, 3 > & getTextureCoordinateIndices ( ) const
inline
Returns
texture coordinate indices or null (optional)

Definition at line 111 of file Face.h.

◆ getVertexIndices()

const array< int32_t, 3 > & getVertexIndices ( ) const
inline
Returns
vertex indices

Definition at line 81 of file Face.h.

◆ setBitangentIndices()

void setBitangentIndices ( int32_t  bi0,
int32_t  bi1,
int32_t  bi2 
)

Set bitangent indices.

Parameters
bi0bi0
bi1bi1
bi2bi2

Definition at line 59 of file Face.cpp.

◆ setIndexedRenderingIndices()

void setIndexedRenderingIndices ( const array< int32_t, 3 > &  indices)
private

Prepared this face for indexed rendering.

Parameters
indicesindices

Definition at line 66 of file Face.cpp.

◆ setNormalIndices()

void setNormalIndices ( int32_t  ni0,
int32_t  ni1,
int32_t  ni2 
)

Set normal indices.

Parameters
ni0ni0
ni1ni1
ni2ni2

Definition at line 38 of file Face.cpp.

◆ setTangentIndices()

void setTangentIndices ( int32_t  ti0,
int32_t  ti1,
int32_t  ti2 
)

Set tangent indices.

Parameters
ti0ti0
ti1ti1
ti2ti2

Definition at line 52 of file Face.cpp.

◆ setTextureCoordinateIndices()

void setTextureCoordinateIndices ( int32_t  vt0,
int32_t  vt1,
int32_t  vt2 
)

Set up optional texture coordinate indices.

Parameters
vt0vtX
vt1vtY
vt2vtZ

Definition at line 45 of file Face.cpp.

Friends And Related Function Documentation

◆ tdme::utilities::ModelTools

friend class tdme::utilities::ModelTools
friend

Definition at line 20 of file Face.h.

Member Data Documentation

◆ bitangentIndices

array<int32_t, 3> bitangentIndices {{ -1, -1, -1 }}
private

Definition at line 28 of file Face.h.

◆ node

Node* node { nullptr }
private

Definition at line 23 of file Face.h.

◆ normalIndices

array<int32_t, 3> normalIndices {{ -1, -1, -1 }}
private

Definition at line 25 of file Face.h.

◆ tangentIndices

array<int32_t, 3> tangentIndices {{ -1, -1, -1 }}
private

Definition at line 27 of file Face.h.

◆ textureCoordinateIndices

array<int32_t, 3> textureCoordinateIndices {{ -1, -1, -1 }}
private

Definition at line 26 of file Face.h.

◆ vertexIndices

array<int32_t, 3> vertexIndices {{ -1, -1, -1 }}
private

Definition at line 24 of file Face.h.


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