GPU-Accelerated Coverage
0.1.0
Compute coverage tours for known environment with articulated objects on GPU
|
Class representing a mesh, corresponding to Assimp's aiMesh. More...
#include <Mesh.h>
Public Types | |
enum | BUFFERS { VERTEX_BUFFER, COLOR_BUFFER, TEXCOORD_BUFFER, NORMAL_BUFFER, INDEX_BUFFER } |
Buffer semantics. More... | |
typedef std::vector< Bone * > | Bones |
Vector of bones attached to this mesh. | |
Public Member Functions | |
Mesh (const aiMesh *const mesh, const size_t id, const std::vector< Material * > &materials) | |
Constructor. More... | |
~Mesh () | |
Destructor. | |
void | render (const LocationsMaterial *const locations, const bool hasTesselationShader) const |
Renders the mesh. More... | |
void | toDot (FILE *dot) const |
Write Graphviz Dot node representing this mesh to file for debugging. More... | |
size_t | getId () |
Returns the unique ID of this mesh. More... | |
const std::string & | getName () |
Returns the name of this mesh for logging. More... | |
Bones & | getBones () |
Material * | getMaterial () |
Protected Attributes | |
const size_t | id |
Unique ID, see getId(). | |
const std::string | name |
Name of this mesh, see getName(). | |
Material * | material |
Material associated with this mesh, see getMaterial(). | |
GLuint | vao |
Vertex array object. | |
GLuint | vbo [5] |
Vertex buffers (vertex position, color, texture coordinate, normal, index) | |
unsigned int | elementCount |
Number of indices used in the primitives to draw. | |
Bones | bones |
Bones associated with this mesh. | |
Class representing a mesh, corresponding to Assimp's aiMesh.
Buffer semantics.
This enum is also used by other classes that render mesh-like visible objects, e.g. CoordinateAxes and Dot.
gpu_coverage::Mesh::Mesh | ( | const aiMesh *const | mesh, |
const size_t | id, | ||
const std::vector< Material * > & | materials | ||
) |
Constructor.
mesh | The Assimp aiMesh for creating this mesh. |
id | Unique ID of this mesh. |
materials | Vector of materials loaded beforehand. |
|
inline |
Returns the bones attached to this mesh.
|
inline |
Returns the unique ID of this mesh.
|
inline |
Returns the material associated with this mesh if applicable, otherwise NULL
|
inline |
Returns the name of this mesh for logging.
If available, the name included in the input file read by Assimp is used, otherwise a generic string is constructed.
void gpu_coverage::Mesh::render | ( | const LocationsMaterial *const | locations, |
const bool | hasTesselationShader | ||
) | const |
Renders the mesh.
locations | Location variables of the material variables in the current shader. |
hasTesselationShader | True if a tesselation shader is active. |
void gpu_coverage::Mesh::toDot | ( | FILE * | dot | ) | const |
Write Graphviz Dot node representing this mesh to file for debugging.
[in] | dot | Output Dot file. |