CUGL 3.0
Cornell University Game Library
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
cugl::scene3::VertexInfo Class Reference

#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
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ VertexInfo()

cugl::scene3::VertexInfo::VertexInfo ( )
inline

Creates an uninitalized VertexInfo value.

All indices start off as undefined.

Member Function Documentation

◆ operator!=()

bool cugl::scene3::VertexInfo::operator!= ( const VertexInfo rhs) const
inline

Returns true if the VertexInfo rhs is not equivalent to this one.

All equivalence is determined attribute comparison

Parameters
rhsThe VertexInfo to compare
Returns
true if the VertexInfo rhs is not equivalent to this one.

◆ operator==()

bool cugl::scene3::VertexInfo::operator== ( const VertexInfo rhs) const
inline

Returns true if the VertexInfo rhs is equivalent to this one.

All equivalence is determined by attribute comparison.

Parameters
rhsThe VertexInfo to compare
Returns
true if the VertexInfo rhs is equivalent to this one.

Member Data Documentation

◆ nindex

int cugl::scene3::VertexInfo::nindex

The index of the vertex normal in the model (-1 if undefined)

◆ pindex

int cugl::scene3::VertexInfo::pindex

The index of the vertex position in the model (-1 if undefined)

◆ tindex

int cugl::scene3::VertexInfo::tindex

The index of the texture coordinate in the model (-1 if undefined)


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