Storage and manipulation of object data. More...
Classes | |
struct | Material |
Definition of guidelines for an object's interaction with light energy. More... | |
struct | Sphere |
Storage of spherical shapes. More... | |
struct | Triangle |
Storage of triangular shapes. More... | |
struct | Vertex |
Storage of object's vertices. More... | |
Public Member Functions | |
Mesh (const string &) | |
Mesh () | |
~Mesh () | |
const vector< Material > & | materials () const |
const vector< Triangle > & | triangles () const |
const vector< Vertex > & | vertices () const |
Vector | diagonal () const |
vector< Material > & | materials () |
vector< Triangle > & | triangles () |
vector< Vertex > & | vertices () |
bool | load (const string &) |
bool | read (istream &) |
bool | write (ostream &) const |
Static Public Attributes | |
static const int | undefined = 0x7ffffff0 |
Protected Member Functions | |
bool | loadML (const string &) |
void | loadML (ifstream &) |
bool | loadOBJ (const string &) |
bool | loadMTL (vector< Material > &, map< string, int > &, string &, const string &) |
bool | loadIW (const string &) |
Texture * | genTexture (map< string, Texture * > &, const Material &, const Material::Type) |
Protected Attributes | |
vector< Material > | m |
vector< Triangle > | t |
vector< Vertex > | v |
uint | nbytes |
Storage and manipulation of object data.
Core::Mesh::Mesh | ( | const string & | filename | ) |
References load().
Core::Mesh::Mesh | ( | ) |
Vector Core::Mesh::diagonal | ( | ) | const |
References v.
Referenced by rtVTK::MainWindow::slotLoadScene().
Texture * Core::Mesh::genTexture | ( | map< string, Texture * > & | tmap, |
const Material & | material, | ||
const Material::Type | type | ||
) | [protected] |
bool Core::Mesh::load | ( | const string & | filename | ) |
References loadIW(), loadML(), and loadOBJ().
Referenced by Mesh(), and rtVTK::MainWindow::slotLoadMesh().
bool Core::Mesh::loadIW | ( | const string & | filename | ) | [protected] |
References Core::RGB< T >::clamp(), Core::Mesh::Material::color, Core::Mesh::Material::Diffuse, Core::Mesh::Material::Emissive, genTexture(), m, nbytes, Core::Mesh::Material::Specular, t, Core::Mesh::Material::tex, and v.
Referenced by load().
bool Core::Mesh::loadML | ( | const string & | filename | ) | [protected] |
Referenced by load().
void Core::Mesh::loadML | ( | ifstream & | fin | ) | [protected] |
bool Core::Mesh::loadMTL | ( | vector< Material > & | clean_m, |
map< string, int > & | mID_map, | ||
string & | fnameMTL, | ||
const string & | filename | ||
) | [protected] |
References Core::RGB< T >::clamp(), Core::Mesh::Material::Diffuse, Core::Mesh::Material::Emissive, m, Core::matchDirectory(), and Core::Mesh::Material::Specular.
Referenced by loadOBJ().
bool Core::Mesh::loadOBJ | ( | const string & | filename | ) | [protected] |
References Core::Mesh::Material::Diffuse, Core::Mesh::Material::Emissive, genTexture(), loadMTL(), m, nbytes, Core::Mesh::Material::Specular, t, Core::Mesh::Material::tex, undefined, and v.
Referenced by load().
const vector< Mesh::Material > & Core::Mesh::materials | ( | ) | const [inline] |
References m.
Referenced by rtVTK::glRenderer::drawWireframe().
vector< Mesh::Material > & Core::Mesh::materials | ( | ) | [inline] |
References m.
bool Core::Mesh::read | ( | istream & | in | ) |
const vector< Mesh::Triangle > & Core::Mesh::triangles | ( | ) | const [inline] |
References t.
Referenced by rtVTK::glRenderer::drawWireframe().
vector< Mesh::Triangle > & Core::Mesh::triangles | ( | ) | [inline] |
References t.
const vector< Mesh::Vertex > & Core::Mesh::vertices | ( | ) | const [inline] |
References v.
Referenced by rtVTK::glRenderer::drawWireframe().
vector< Mesh::Vertex > & Core::Mesh::vertices | ( | ) | [inline] |
References v.
bool Core::Mesh::write | ( | ostream & | out | ) | const |
vector<Material> Core::Mesh::m [protected] |
uint Core::Mesh::nbytes [protected] |
vector<Triangle> Core::Mesh::t [protected] |
Referenced by loadIW(), loadML(), loadOBJ(), Core::Mesh::Vertex::read(), read(), triangles(), Core::Mesh::Vertex::write(), and write().
const int Core::Mesh::undefined = 0x7ffffff0 [static] |
Referenced by rtVTK::glRenderer::drawWireframe(), and loadOBJ().
vector<Vertex> Core::Mesh::v [protected] |
Referenced by diagonal(), loadIW(), loadML(), loadOBJ(), read(), vertices(), and write().