V-ART
|
A mesh is part of an graphical object, in which faces are made of vertices according to some rule of formation. More...
#include <mesh.h>
Public Types | |
enum | MeshType { NONE, POINTS, LINES, LINE_STRIP, LINE_LOOP, TRIANGLES, TRIANGLE_STRIP, TRIANGLE_FAN, QUADS, QUAD_STRIP, POLYGON } |
Public Member Functions | |
Mesh () | |
Creates an uninitialized mesh. More... | |
Mesh (const Mesh &mesh) | |
Mesh & | operator= (const Mesh &mesh) |
bool | DrawInstanceOGL () const |
Draws the mesh assuming that its MeshObject is optimized. More... | |
void | IncrementIndices (unsigned int increment) |
Returns the mesh type as OpenGL enum. More... | |
Public Attributes | |
std::vector< unsigned int > | indexVec |
indexes of the vertices (start at 0) defining faces More... | |
std::vector< unsigned int > | normIndVec |
indexes of the normals (for unoptimized meshes) More... | |
Material | material |
MeshType | type |
Friends | |
std::ostream & | operator<< (std::ostream &output, const Mesh &mesh) |
std::ostream & | operator<< (std::ostream &output, const MeshType mt) |
A mesh is part of an graphical object, in which faces are made of vertices according to some rule of formation.
The mesh is the basic building block of an mesh object (MeshObject). It has a single material, and indexes to vertices that define faces according to a rule (on a triangle strip, for instance, the first 3 indexes from a face, and then each new index from a new face together with the last 2 indexes). A mesh degenerates to a single polygon if the mesh object has no pratical rule of formation.
enum VART::Mesh::MeshType |
VART::Mesh::Mesh | ( | const Mesh & | mesh | ) |
bool VART::Mesh::DrawInstanceOGL | ( | ) | const |
Draws the mesh assuming that its MeshObject is optimized.
void VART::Mesh::IncrementIndices | ( | unsigned int | increment | ) |
Returns the mesh type as OpenGL enum.
Definition at line 27 of file mesh.cpp.
Referenced by VART::MeshObject::MergeWith().
VART::Mesh & VART::Mesh::operator= | ( | const Mesh & | mesh | ) |
|
friend |
|
friend |
std::vector<unsigned int> VART::Mesh::indexVec |
indexes of the vertices (start at 0) defining faces
Definition at line 62 of file mesh.h.
Referenced by VART::MeshObject::AddFace(), VART::Box::MakeBox(), VART::MeshObject::MakeBox(), Mesh(), VART::operator<<(), operator=(), and VART::MeshObject::ReadFromOBJ().
Material VART::Mesh::material |
Definition at line 65 of file mesh.h.
Referenced by VART::Box::MakeBox(), VART::MeshObject::MakeBox(), Mesh(), operator=(), and VART::MeshObject::ReadFromOBJ().
std::vector<unsigned int> VART::Mesh::normIndVec |
indexes of the normals (for unoptimized meshes)
Definition at line 64 of file mesh.h.
Referenced by VART::MeshObject::AddFace(), Mesh(), operator=(), and VART::MeshObject::ReadFromOBJ().
MeshType VART::Mesh::type |
Definition at line 66 of file mesh.h.
Referenced by VART::MeshObject::AddFace(), VART::Box::MakeBox(), VART::MeshObject::MakeBox(), Mesh(), VART::operator<<(), operator=(), and VART::MeshObject::ReadFromOBJ().