105 std::vector<OBJ::Group>::const_iterator
beginGroups ()
const {
return this->_groups.begin(); }
107 std::vector<OBJ::Group>::const_iterator
endGroups ()
const {
return this->_groups.end(); }
111 std::string _mtlLibName;
114 std::vector<OBJ::Material> _materials;
115 std::vector<OBJ::Group> _groups;
118 bool readMaterial (std::string m);
A model from an OBJ file.
Definition obj.hpp:84
int numMaterials() const
the number of materials associated with this model
Definition obj.hpp:96
const OBJ::Material & material(int i) const
get a material
Definition obj.hpp:98
Model(std::string filename)
int numGroups() const
the number of groups in this model
Definition obj.hpp:101
std::vector< OBJ::Group >::const_iterator endGroups() const
terminator for looping over the groups in the model
Definition obj.hpp:107
const OBJ::Group & group(int i) const
get a group by index
Definition obj.hpp:103
std::vector< OBJ::Group >::const_iterator beginGroups() const
iterator for looping over the groups in the model
Definition obj.hpp:105
const cs237::AABBf_t & bounds() const
the model's axis-aligned bounding box
Definition obj.hpp:93
@ MapComponent
there is a map for the component
Definition obj.hpp:45
@ UniformComponent
there is a uniform value for the component
Definition obj.hpp:44
@ DefaultComponent
the component is not specified in the material
Definition obj.hpp:43
@ Specular
include specular highlights
Definition obj.hpp:26
@ Diffuse
ambient + diffuse
Definition obj.hpp:25
@ NoLight
just use color component
Definition obj.hpp:24
glm::vec2 * txtCoords
array of nVerts texture coordinates (or nullptr)
Definition obj.hpp:78
uint32_t nIndices
the number of indices (3 * number of triangles)
Definition obj.hpp:75
std::string name
name of this group
Definition obj.hpp:72
glm::vec3 * norms
array of nVerts normal vectors (or nullptr)
Definition obj.hpp:77
uint32_t * indices
Definition obj.hpp:79
glm::vec3 * verts
array of nVerts vertex coordinates
Definition obj.hpp:76
uint32_t nVerts
the number of vertices in this group.
Definition obj.hpp:74
int material
index to material for group (-1 for no material)
Definition obj.hpp:73
Structure that defines a material in a model.
Definition obj.hpp:49
std::string ambientMap
optional texture map for ambient
Definition obj.hpp:61
int ambientC
how is the ambient light specified?
Definition obj.hpp:52
int diffuseC
how is the diffuse light specified?
Definition obj.hpp:54
glm::vec3 ambient
uniform ambient component
Definition obj.hpp:56
std::string diffuseMap
optional texture map for diffuse lighting
Definition obj.hpp:63
int specularC
how is the specular light specified?
Definition obj.hpp:55
float shininess
uniform specular exponent
Definition obj.hpp:60
glm::vec3 specular
uniform specular component
Definition obj.hpp:59
glm::vec3 diffuse
uniform diffuse component
Definition obj.hpp:58
std::string normalMap
optional normal map for bump mapping
Definition obj.hpp:65
int illum
illumination mode (NoLight, etc.)
Definition obj.hpp:51
int emissiveC
how is the emissive light specified?
Definition obj.hpp:53
std::string specularMap
optional texture map for specular highlights
Definition obj.hpp:64
std::string name
name of material
Definition obj.hpp:50
glm::vec3 emissive
uniform emissive component
Definition obj.hpp:57
std::string emissiveMap
optional texture map for emissive lighting
Definition obj.hpp:62
Axis-Aligned Bounding Box parameterized over the scalar type.
Definition cs237-aabb.hpp:28