Eidolon
|
#include <RenderTypes.h>
Public Member Functions | |
MatrixVertexBuffer (Vec3Matrix *vecs, ColorMatrix *cols=NULL, IndexMatrix *extinds=NULL) throw (RenderException) | |
Create the buffer from these matrices, vecs.m() in (1,2,4). The caller is responsible for deleting these when appropriate. More... | |
MatrixVertexBuffer (const VertexBuffer *buf) throw (RenderException) | |
Copy the data from `buf' into internal matrices which this object is responsible for and will delete in its destructor. More... | |
virtual | ~MatrixVertexBuffer () |
sval | getIndex (sval i) const |
virtual vec3 | getVertex (int i) const |
Returns the i'th vertex, i<numVertices() More... | |
virtual vec3 | getNormal (int i) const |
Returns the i'th normal, i<numVertices() More... | |
virtual color | getColor (int i) const |
Returns the i'th color, i<numVertices() More... | |
virtual vec3 | getUVWCoord (int i) const |
Returns the i'th UVW texture coord, i<numVertices() More... | |
virtual sval | numVertices () const |
Returns number of total vertices. More... | |
virtual bool | hasNormal () const |
Returns true if the buffer contains normal data. More... | |
virtual bool | hasColor () const |
Returns true if the buffer contains color data. More... | |
virtual bool | hasUVWCoord () const |
Returns true if the buffer contains texture coord data. More... | |
![]() | |
virtual | ~VertexBuffer () |
Private Attributes | |
Vec3Matrix * | vecs |
ColorMatrix * | cols |
IndexMatrix * | extinds |
sval | numverts |
bool | deleteMatrices |
Implementation of a VertexBuffer which uses matrices for storage. This assumes the input Vec3Matrix has 1, 2, or 4 columns, which are the position, normal, xi coordinate, and UVW coordinate components per node. The method hasNormal() returns true if there's more than one column, and hasUVWCoord() is true if there's more than 3, therefore the xi column must be present but is ignored. A copy constructor allows the copying of buffer data into a MatrixVertexBuffer object which retains ownership of the internal matrices and delete them when cleaned up. Matrices passed in through the normal constructor remain the responsibility of the caller.
|
inline |
Create the buffer from these matrices, vecs.m() in (1,2,4). The caller is responsible for deleting these when appropriate.
|
inline |
Copy the data from `buf' into internal matrices which this object is responsible for and will delete in its destructor.
|
inlinevirtual |
|
inlinevirtual |
Returns the i'th color, i<numVertices()
Reimplemented from VertexBuffer.
|
inlinevirtual |
Returns the i'th normal, i<numVertices()
Reimplemented from VertexBuffer.
|
inlinevirtual |
Returns the i'th UVW texture coord, i<numVertices()
Reimplemented from VertexBuffer.
|
inlinevirtual |
Returns the i'th vertex, i<numVertices()
Reimplemented from VertexBuffer.
|
inlinevirtual |
Returns true if the buffer contains color data.
Reimplemented from VertexBuffer.
|
inlinevirtual |
Returns true if the buffer contains normal data.
Reimplemented from VertexBuffer.
|
inlinevirtual |
Returns true if the buffer contains texture coord data.
Reimplemented from VertexBuffer.
|
inlinevirtual |
Returns number of total vertices.
Reimplemented from VertexBuffer.
|
private |
|
private |
|
private |
|
private |
|
private |