|
CeresEngine 0.2.0
A game development framework
|
Represents the memory position of a single vertex element. More...
#include <CeresEngine/Mesh/VertexLayout.hpp>
Public Member Functions | |
| size_t | operator[] (const size_t index) const |
Computes the absolute offset of the vertex at position index. | |
| template<typename T > | |
| StridedMemoryView< const T > | view (const MemoryView< const Byte > view, const size_t count=0) const |
Returns a StridedMemoryView that allows iterating over every vertex of of this element in a vertex buffer. | |
| template<typename T > | |
| StridedMemoryView< T > | view (const MemoryView< Byte > view, const size_t count=0) const |
Returns a StridedMemoryView that allows iterating over every vertex of of this element in a vertex buffer. | |
Public Attributes | |
| VertexElement | element |
| The vertex element description. | |
| size_t | offset = 0 |
| The offset to where this vertex element starts. | |
| size_t | stride = 0 |
| The stride, the amount of bytes to skip to reach the next vertex data. | |
Represents the memory position of a single vertex element.
Computes the absolute offset of the vertex at position index.
| index | The index whose vertex address should be calculated. |
index can be found, relative from the start of the vertex buffer.
|
inline |
Returns a StridedMemoryView that allows iterating over every vertex of of this element in a vertex buffer.
| T | The vertex element type. |
| view | A MemoryView of the vertex buffer. |
| count | The number of vertices in the view buffer. |
StridedMemoryView that iterates over every vertex in the buffer.
|
inline |
Returns a StridedMemoryView that allows iterating over every vertex of of this element in a vertex buffer.
| T | The vertex element type. |
| view | A MemoryView of the vertex buffer. |
| count | The number of vertices in the view buffer. |
StridedMemoryView that iterates over every vertex in the buffer. | VertexElement CeresEngine::VertexLayoutElement::element |
The vertex element description.
Describes type, size and semantic of a vertex element.
| size_t CeresEngine::VertexLayoutElement::offset = 0 |
The offset to where this vertex element starts.
| size_t CeresEngine::VertexLayoutElement::stride = 0 |
The stride, the amount of bytes to skip to reach the next vertex data.