Cogs.Core
|
Wrapper for read-only access to mapped stream data. More...
#include <Mesh.h>
Public Member Functions | |
MappedStreamReadOnly (struct Mesh *mesh, const Element *data, VertexDataType::EVertexDataType type) | |
Constructs a MappedStreamReadOnly from the given mesh for readonly access to the mesh stream. | |
bool | isValid () const |
Returns true if stream mapping successful. | |
constexpr const Element & | operator[] (const size_t index) const |
Access the Element at the given index. | |
VertexDataType::EVertexDataType | getDataType () const |
Public Attributes | |
const Element * | data = nullptr |
Pointer to the element data mapped from the Mesh data stream. | |
Private Attributes | |
struct Mesh * | mesh = nullptr |
Pointer to the mapped mesh. | |
VertexDataType::EVertexDataType | type = VertexDataType::EVertexDataType::Reserved |
Type index of the mesh data stream. | |
Wrapper for read-only access to mapped stream data.
Type | of elements contained in the stream, e.g glm::vec3 for position data. |
|
inline |
Constructs a MappedStreamReadOnly from the given mesh for readonly access to the mesh stream.
|
inline |
|
inline |
Returns true if stream mapping successful.
Definition at line 212 of file Mesh.h.
Referenced by Cogs::Core::generateMeshTangents().
|
inlineconstexpr |
Access the Element at the given index.
index | Index of the element to access. Must be inside the range [start, start + count) given to Mesh::map(). |
const Element* Cogs::Core::MappedStreamReadOnly< Element >::data = nullptr |
|
private |
|
private |