Describes the layout of data inside a mesh. More...
Describes the layout of data inside a mesh.
|
noexcept |
Default constructor.
unsigned long long nkGraphics::MeshInputLayout::getHash | ( | ) | const |
nkMemory::StringView nkGraphics::MeshInputLayout::getPositionAttributeName | ( | ) | const |
nkMemory::StringView nkGraphics::MeshInputLayout::getNormalAttributeName | ( | ) | const |
nkMemory::StringView nkGraphics::MeshInputLayout::getTexCoordAttributeName | ( | ) | const |
unsigned int nkGraphics::MeshInputLayout::getComputedAttributeOffset | ( | nkMemory::StringView | name | ) | const |
Computes the offset of one attribute by its name, within its buffer.
name | The name of the attribute which offset is to be computed. |
void nkGraphics::MeshInputLayout::setAttribute | ( | const MeshInputLayoutAttribute & | attribute, |
unsigned int | index | ||
) |
Sets an attribute at a given index, overriding its values.
attribute | The new values to set. |
index | The index of the attribute to override, in the attribute list. |
void nkGraphics::MeshInputLayout::setPositionAttributeName | ( | nkMemory::StringView | value | ) |
Sets the name of the contained attribute that should be considered as providing position information.
value | The name of the attribute. |
void nkGraphics::MeshInputLayout::setNormalAttributeName | ( | nkMemory::StringView | value | ) |
Sets the name of the contained attribute that should be considered as providing normal information.
value | The name of the attribute. |
void nkGraphics::MeshInputLayout::setTexCoordAttributeName | ( | nkMemory::StringView | value | ) |
Sets the name of the contained attribute that should be considered as providing texture coordinate information.
value | The name of the attribute. |
void nkGraphics::MeshInputLayout::addAttribute | ( | const MeshInputLayoutAttribute & | attribute | ) |
Adds an attribute to the layout's list.
attribute | The attribute to append. |
const MeshInputLayoutAttribute* nkGraphics::MeshInputLayout::getAttribute | ( | unsigned int | index | ) | const |
Allows to access an attribute for reading operations.
index | The list index of the attribute to access. |
const MeshInputLayoutAttribute* nkGraphics::MeshInputLayout::getAttribute | ( | nkMemory::StringView | name | ) | const |
Allows to access an attribute for reading operations.
name | The name of the attribute to access. |
unsigned int nkGraphics::MeshInputLayout::getAttributeCount | ( | ) | const |
unsigned int nkGraphics::MeshInputLayout::getTotalDeclarationSlots | ( | ) | const |
void nkGraphics::MeshInputLayout::removeAttribute | ( | unsigned int | index | ) |
Removes an attribute from the list.
index | The index of the attribute to remove. |
void nkGraphics::MeshInputLayout::removeAttribute | ( | nkMemory::StringView | name | ) |
Removes an attribute from the list.
name | The name of the attribute to remove. |
bool nkGraphics::MeshInputLayout::hasAttribute | ( | nkMemory::StringView | name, |
unsigned int | semanticIndex = 0u |
||
) | const |
Checks if layout has a given attribute available.
name | The name of the attribute to check for. |
semanticIndex | The index of the attribute to check for. This index is typically appended at the end of the name, if necessary. |
bool nkGraphics::MeshInputLayout::operator< | ( | const MeshInputLayout & | other | ) | const |
other | The layout to compare with. |
bool nkGraphics::MeshInputLayout::operator== | ( | const MeshInputLayout & | other | ) | const |
other | The layout to compare with. |