|
Cogs.Core
|
Wrapper for mapped stream data automatically updating the Mesh resource mapped from when destructed. More...
#include <Mesh.h>
Public Member Functions | |
| MappedStream (struct Mesh *mesh, Element *data, VertexDataType::EVertexDataType type) | |
| Constructs a MappedStream from the given mesh for updating the mesh. | |
| MappedStream (MappedStream &other)=delete | |
| Disabled copy constructor. | |
| MappedStream (MappedStream &&other) | |
| Move construct the wrapper from other. | |
| ~MappedStream () | |
| Destructs the mapped stream wrapper. | |
| constexpr Element & | operator[] (const size_t index) |
| Access the Element at the given index. | |
| constexpr const Element & | operator[] (const size_t index) const |
| constexpr bool | isValid () const |
| Returns true if stream mapping successful. | |
| constexpr VertexDataType::EVertexDataType | getDataType () const |
Public Attributes | |
| Element * | data |
| Pointer to the element data mapped from the Mesh data stream. | |
Private Attributes | |
| struct Mesh * | mesh |
| Pointer to the mapped mesh. | |
| VertexDataType::EVertexDataType | type |
| Type index of the mesh data stream. | |
Wrapper for mapped stream data automatically updating the Mesh resource mapped from when destructed.
MappedStream instances are returned when mapping Mesh data streams and provide easy scoped access to the mapped data.
Use
| Type | of elements contained in the stream, e.g glm::vec3 for position data. |
|
inline |
Constructs a MappedStream from the given mesh for updating the mesh.
|
inline |
| Cogs::Core::MappedStream< Element >::~MappedStream |
|
inlineconstexpr |
|
inlineconstexpr |
|
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(). |
|
inlineconstexpr |
| Element* Cogs::Core::MappedStream< Element >::data |
|
private |
|
private |