rtVTK  0.6.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends
Classes | Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes
Core::Mesh Class Reference

Storage and manipulation of object data. More...

List of all members.

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 &)
TexturegenTexture (map< string, Texture * > &, const Material &, const Material::Type)

Protected Attributes

vector< Materialm
vector< Trianglet
vector< Vertexv
uint nbytes

Detailed Description

Storage and manipulation of object data.


Constructor & Destructor Documentation

Core::Mesh::Mesh ( const string &  filename)

References load().


Member Function Documentation

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]
Todo:
TODO(cpg) - cplusplus-ify me!
Bug:
XXX(cpg) - not yet (fully) implemented, but why not!?!

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]
bool Core::Mesh::loadOBJ ( const string &  filename) [protected]
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

Member Data Documentation

vector<Material> Core::Mesh::m [protected]
uint Core::Mesh::nbytes [protected]

Referenced by loadIW(), loadOBJ(), read(), and write().

vector<Triangle> Core::Mesh::t [protected]
const int Core::Mesh::undefined = 0x7ffffff0 [static]
vector<Vertex> Core::Mesh::v [protected]

The documentation for this class was generated from the following files:
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends