![]() |
CUGL 3.0
Cornell University Game Library
|
#include <CUObjModel.h>
Public Member Functions | |
GroupInfo () | |
Public Attributes | |
bool | touched |
unsigned | index |
GLenum | command |
std::string | object |
std::string | material |
std::unordered_set< std::string > | tags |
std::vector< VertexInfo > | vertices |
std::vector< GLuint > | indices |
std::unordered_map< VertexInfo, GLuint, VertexHasher > | vertCache |
This class represents the attributes of an OBJ render group.
OBJ models are broken up into multiple groups for rendering. A group corresponds to a single draw call to the graphics pipeline. Therefore, we need a new group whenever we have a new material. In addition, OBJ files can explicitly create new groups with the "g" or "s" command. We also create new groups with an "o" command, though that is not standard.
|
inline |
Creates an unintialized GroupInfo with default values
GLenum cugl::scene3::GroupInfo::command |
The drawing command for this group (GL_FALSE for undefined)
unsigned cugl::scene3::GroupInfo::index |
The smoothing index of for this render group (the OBJ s value)
std::vector<GLuint> cugl::scene3::GroupInfo::indices |
The render group shape represented as indexed vertices
std::string cugl::scene3::GroupInfo::material |
The material name for this render group
std::string cugl::scene3::GroupInfo::object |
The object group (the OBJ o value)
std::unordered_set<std::string> cugl::scene3::GroupInfo::tags |
The tags for this render group (the OBJ g values)
bool cugl::scene3::GroupInfo::touched |
Whether this info has received any vertex information (for parsing)
std::unordered_map<VertexInfo,GLuint,VertexHasher> cugl::scene3::GroupInfo::vertCache |
A vertex cache to eliminate redundancy
std::vector<VertexInfo> cugl::scene3::GroupInfo::vertices |
The vertices associated with this group