|
Terminus
|
The Geometry class wraps the vertices data of one drawable object. More...
#include <geometry.h>
Public Member Functions | |
| Geometry (const std::vector< unsigned short > &indexBuffer, const std::vector< Vertex > &vertexBuffer) | |
| General geometry constructor. More... | |
| Geometry (const std::vector< unsigned short > &indexBuffer, const std::vector< Vertex > &vertexBuffer, const QVector3D &minBBox, const QVector3D &maxBBox) | |
| virtual | ~Geometry () |
| virtual const QVector3D & | bBoxMin () const |
| virtual const QVector3D & | bBoxMax () const |
| virtual void | setAttributes (Program &program) |
| The geometry specific attributes position, texture coordinate and normal vector are set on the used program. More... | |
| virtual void | draw (QOpenGLFunctions &gl) const |
| By invoking the draw function, both index and vertex buffer are going to be bound and the geometry will be drawn. More... | |
Protected Member Functions | |
| virtual void | calculateBBox () |
| virtual void | allocate () const |
| virtual void | deallocate () const |
Protected Attributes | |
| bool | m_isOnGPU |
| QOpenGLBuffer * | m_vbo |
| QOpenGLBuffer * | m_ibo |
| unsigned int | m_elementCount |
| std::vector< Vertex > | m_vertexBuffer |
| std::vector< unsigned short > | m_indexBuffer |
| QVector3D | m_bBoxMin |
| QVector3D | m_bBoxMax |
The Geometry class wraps the vertices data of one drawable object.
Vertices data is stored as an index and a vertex buffer. In order to get rendered, a game object has to reference one geometry.
| terminus::Geometry::Geometry | ( | const std::vector< unsigned short > & | indexBuffer, |
| const std::vector< Vertex > & | vertexBuffer | ||
| ) |
General geometry constructor.
| indexBuffer | |
| vertexBuffer | Supplied geometry data will be stored in the respective member. If no BBox values are given, the BBox will be calculated automatically. |
| terminus::Geometry::Geometry | ( | const std::vector< unsigned short > & | indexBuffer, |
| const std::vector< Vertex > & | vertexBuffer, | ||
| const QVector3D & | minBBox, | ||
| const QVector3D & | maxBBox | ||
| ) |
|
virtual |
|
protectedvirtual |
|
virtual |
|
virtual |
|
protectedvirtual |
|
protectedvirtual |
|
virtual |
By invoking the draw function, both index and vertex buffer are going to be bound and the geometry will be drawn.
| gl |
|
virtual |
The geometry specific attributes position, texture coordinate and normal vector are set on the used program.
| program |
|
protected |
|
protected |
|
protected |
|
mutableprotected |
|
protected |
|
mutableprotected |
|
mutableprotected |
|
protected |
1.8.9.1