MaterialX 1.39.1
|
Class to represent a mesh data stream. More...
#include <Mesh.h>
Public Member Functions | |
MeshStream (const string &name, const string &type, unsigned int index) | |
void | reserve (size_t elementCount) |
Reserve memory for a given number of elements. | |
void | resize (size_t elementCount) |
Resize data to an given number of elements. | |
const string & | getName () const |
Get stream name. | |
const string & | getType () const |
Get stream attribute name. | |
unsigned int | getIndex () const |
Get stream index. | |
MeshFloatBuffer & | getData () |
Return the raw float vector. | |
const MeshFloatBuffer & | getData () const |
Return the raw float vector. | |
template<class T > | |
T & | getElement (size_t index) |
template<class T > | |
const T & | getElement (size_t index) const |
unsigned int | getStride () const |
Get stride between elements. | |
void | setStride (unsigned int stride) |
Set stride between elements. | |
size_t | getSize () const |
Get the number of elements. | |
void | transform (const Matrix44 &matrix) |
Transform elements by a matrix. | |
Static Public Member Functions | |
static MeshStreamPtr | create (const string &name, const string &type, unsigned int index=0) |
Create a new mesh stream. | |
Protected Attributes | |
string | _name |
string | _type |
unsigned int | _index |
MeshFloatBuffer | _data |
unsigned int | _stride |
Class to represent a mesh data stream.