AGL
A graphics library
|
Draw a capsule mesh. More...
#include <capsule.h>
Public Member Functions | |
Capsule (float rad, float length, GLuint sl, GLuint st) | |
Public Member Functions inherited from agl::TriangleMesh | |
virtual void | render () const |
Draw this mesh. More... | |
Public Member Functions inherited from agl::Mesh | |
GLuint | vao () const |
Return the vertex array object corresponding to this mesh. | |
bool | hasUV () const |
Return whether this mesh has UV coordinates defined. | |
bool | isDynamic () const |
Query whether or not this is a dynamic mesh. More... | |
Protected Member Functions | |
void | init () override |
Override init to specifiy vertex data for the mesh. More... | |
Protected Member Functions inherited from agl::TriangleMesh | |
void | initBuffers (std::vector< GLuint > *indices, std::vector< GLfloat > *points, std::vector< GLfloat > *normals, std::vector< GLfloat > *texCoords=nullptr, std::vector< GLfloat > *tangents=nullptr) |
Call initBuffers from init() to set the data for this mesh. More... | |
Protected Member Functions inherited from agl::Mesh | |
int | numVertices () const |
Get the number of vertices. | |
void | setVertexData (VertexAttribute type, int vertexId, const glm::vec4 &data) |
Set vertex properties. More... | |
glm::vec4 | vertexData (VertexAttribute type, int vertexId) const |
Get vertex properties. More... | |
virtual void | setIsDynamic (bool on) |
Set whether or not this is a dynamic mesh. More... | |
void | initBuffers (std::vector< GLfloat > *points, std::vector< GLfloat > *normals, std::vector< GLfloat > *texCoords=nullptr, std::vector< GLfloat > *tangents=nullptr) |
Call initBuffers from init() to set the data for this mesh. More... | |
virtual void | deleteBuffers () |
Additional Inherited Members | |
Protected Types inherited from agl::Mesh | |
enum | VertexAttribute { INDEX = 0, POSITION, NORMAL, UV, TANGENT, NUM_ATTRIBUTES } |
Protected Attributes inherited from agl::TriangleMesh | |
GLuint | _nIndices = 0 |
Protected Attributes inherited from agl::Mesh | |
GLuint | _nVerts = 0 |
GLuint | _vao = 0 |
bool | _hasUV = false |
bool | _isDynamic = false |
bool | _initialized = false |
std::vector< GLuint > | _buffers |
std::vector< GLfloat > | _data [5] |
Draw a capsule mesh.
|
overrideprotectedvirtual |
Override init to specifiy vertex data for the mesh.
init() will be called automatically the first time render() is called. Overridden implementations of init() should call initBuffers.
Implements agl::Mesh.