![]() |
CUGL 3.0
Cornell University Game Library
|
#include <CUObjModel.h>
Public Member Functions | |
VertexInfo () | |
bool | operator== (const VertexInfo &rhs) const |
bool | operator!= (const VertexInfo &rhs) const |
Public Attributes | |
int | pindex |
int | tindex |
int | nindex |
This class represents the indices of an OBJ vertex.
All shapes in the OBJ file format are represented by three values: the position, the texture coordinate, and the normal (though the last two are optional). For compact representation, these values are stored individually in ModelInfo
and indexed by position. As GLSL shaders do not permit these values to be streamed independently, this information must be flattened before rendering.
Indices must be a value >= 0. Setting an index to a negative value means that it is undefined/unsupported. In practice, only the position index must be defined.
|
inline |
Creates an uninitalized VertexInfo value.
All indices start off as undefined.
|
inline |
Returns true if the VertexInfo rhs is not equivalent to this one.
All equivalence is determined attribute comparison
rhs | The VertexInfo to compare |
|
inline |
Returns true if the VertexInfo rhs is equivalent to this one.
All equivalence is determined by attribute comparison.
rhs | The VertexInfo to compare |
int cugl::scene3::VertexInfo::nindex |
The index of the vertex normal in the model (-1 if undefined)
int cugl::scene3::VertexInfo::pindex |
The index of the vertex position in the model (-1 if undefined)
int cugl::scene3::VertexInfo::tindex |
The index of the texture coordinate in the model (-1 if undefined)