35 #include <gpu_coverage/Bone.h> 36 #include <gpu_coverage/Programs.h> 38 #include <assimp/scene.h> 39 #include <assimp/mesh.h> 46 struct LocationsCommonRender;
61 VERTEX_BUFFER, COLOR_BUFFER, TEXCOORD_BUFFER, NORMAL_BUFFER, INDEX_BUFFER
63 typedef std::vector<Bone*>
Bones;
71 Mesh(
const aiMesh *
const mesh,
const size_t id,
const std::vector<Material*>& materials);
89 void toDot(FILE *dot)
const;
Class representing a mesh, corresponding to Assimp's aiMesh.
Definition: Mesh.h:52
void toDot(FILE *dot) const
Write Graphviz Dot node representing this mesh to file for debugging.
GLuint vao
Vertex array object.
Definition: Mesh.h:130
void render(const LocationsMaterial *const locations, const bool hasTesselationShader) const
Renders the mesh.
Bones bones
Bones associated with this mesh.
Definition: Mesh.h:134
Material * material
Material associated with this mesh, see getMaterial().
Definition: Mesh.h:129
Locations of material shader variables.
Definition: Programs.h:142
const std::string & getName()
Returns the name of this mesh for logging.
Definition: Mesh.h:106
Mesh(const aiMesh *const mesh, const size_t id, const std::vector< Material * > &materials)
Constructor.
Definition: AbstractCamera.h:41
Bones & getBones()
Definition: Mesh.h:114
const size_t id
Unique ID, see getId().
Definition: Mesh.h:127
Represents a mesh material corresponding to Assimp's aiMaterial.
Definition: Material.h:43
std::vector< Bone * > Bones
Vector of bones attached to this mesh.
Definition: Mesh.h:63
GLuint vbo[5]
Vertex buffers (vertex position, color, texture coordinate, normal, index)
Definition: Mesh.h:131
size_t getId()
Returns the unique ID of this mesh.
Definition: Mesh.h:95
BUFFERS
Buffer semantics.
Definition: Mesh.h:60
Material * getMaterial()
Definition: Mesh.h:122
const std::string name
Name of this mesh, see getName().
Definition: Mesh.h:128
unsigned int elementCount
Number of indices used in the primitives to draw.
Definition: Mesh.h:133