gKit2 light
|
representation des donnees d'un fichier wavefront .obj More...
Go to the source code of this file.
Classes | |
struct | MaterialData |
representation d'une matiere texturee. More... | |
struct | MaterialDataLib |
ensemble de matieres texturees. More... | |
struct | MeshData |
Functions | |
std::string | pathname (const std::string &filename) |
MeshData | read_mesh_data (const char *filename) |
charge un fichier wavefront .obj et renvoie les donnees. More... | |
MaterialDataLib | read_material_data (const char *filename) |
charge un ensemble de matieres texturees. More... | |
void | bounds (const MeshData &data, Point &pmin, Point &pmax) |
renvoie l'englobant. More... | |
void | normals (MeshData &data) |
(re-) calcule les normales des sommets. utiliser avant les reindexations, cf indices() et vertices(). More... | |
MeshData | vertices (MeshData &data) |
construit les sommets. prepare l'affichage openGL, avec glDrawArrays(). More... | |
representation des donnees d'un fichier wavefront .obj
Definition in file mesh_data.h.
struct MaterialDataLib |
ensemble de matieres texturees.
Definition at line 39 of file mesh_data.h.
Class Members | ||
---|---|---|
vector< string > | names | |
vector< MaterialData > | data |
struct MeshData |
Definition at line 46 of file mesh_data.h.
Class Members | ||
---|---|---|
vector< vec3 > | positions | |
vector< vec2 > | texcoords | |
vector< vec3 > | normals | |
vector< int > | position_indices | |
vector< int > | texcoord_indices | |
vector< int > | normal_indices | |
vector< MaterialData > | materials | |
vector< int > | material_indices |
std::string pathname | ( | const std::string & | filename | ) |
MeshData read_mesh_data | ( | const char * | filename | ) |
charge un fichier wavefront .obj et renvoie les donnees.
Definition at line 16 of file mesh_data.cpp.
MaterialDataLib read_material_data | ( | const char * | filename | ) |
charge un ensemble de matieres texturees.
Definition at line 202 of file mesh_data.cpp.
renvoie l'englobant.
Definition at line 290 of file mesh_data.cpp.
void normals | ( | MeshData & | data | ) |
(re-) calcule les normales des sommets. utiliser avant les reindexations, cf indices() et vertices().
Definition at line 307 of file mesh_data.cpp.
construit les sommets. prepare l'affichage openGL, avec glDrawArrays().
Definition at line 350 of file mesh_data.cpp.