CMSC23700 Common Code Library
Support code for CS23700 programming projects
OBJ::Model Class Reference

A model from an OBJ file. More...

#include <obj.hxx>

Public Member Functions

 Model (std::string filename)
 
 ~Model ()
 
const cs237::AABBfBBox () const
 the model's axis-aligned bounding box More...
 
int NumMaterials () const
 the number of materials associated with this model More...
 
const OBJ::MaterialMaterial (int i) const
 get a material More...
 
int NumGroups () const
 the number of groups in this model More...
 
const OBJ::GroupGroup (int i) const
 get a group by index More...
 
std::vector< OBJ::Group >::const_iterator beginGroups () const
 iterator for looping over the groups in the module More...
 
std::vector< OBJ::Group >::const_iterator endGroups () const
 terminator for looping over the groups in the module More...
 

Detailed Description

A model from an OBJ file.

Constructor & Destructor Documentation

OBJ::Model::Model ( std::string  filename)

create a Model by loading it from the specified OBJ file

Parameters
filenamethe path of the OBJ file to be loaded
OBJ::Model::~Model ( )

Member Function Documentation

const cs237::AABBf& OBJ::Model::BBox ( ) const
inline

the model's axis-aligned bounding box

std::vector<OBJ::Group>::const_iterator OBJ::Model::beginGroups ( ) const
inline

iterator for looping over the groups in the module

std::vector<OBJ::Group>::const_iterator OBJ::Model::endGroups ( ) const
inline

terminator for looping over the groups in the module

const OBJ::Group& OBJ::Model::Group ( int  i) const
inline

get a group by index

const OBJ::Material& OBJ::Model::Material ( int  i) const
inline

get a material

int OBJ::Model::NumGroups ( ) const
inline

the number of groups in this model

int OBJ::Model::NumMaterials ( ) const
inline

the number of materials associated with this model


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