libmx2 2.2.1
C++20 multimedia and game-engine library (SDL2 / OpenGL / Vulkan)
Loading...
Searching...
No Matches
mx::VKVertexHash Struct Reference

Hash functor for VKVertex, suitable for use in unordered_map. More...

#include <vk_model.hpp>

Public Member Functions

std::size_t operator() (const VKVertex &v) const
 Compute the hash of a VKVertex.

Detailed Description

Hash functor for VKVertex, suitable for use in unordered_map.

Combines std::hash<float> results using a Boost-style seed mix to produce a stable hash of all vertex fields.

Definition at line 60 of file vk_model.hpp.

Member Function Documentation

◆ operator()()

std::size_t mx::VKVertexHash::operator() ( const VKVertex & v) const
inline

Compute the hash of a VKVertex.

Parameters
vVertex to hash.
Returns
Hash value.

Definition at line 66 of file vk_model.hpp.

References mx::VKVertex::normal, mx::VKVertex::pos, and mx::VKVertex::texCoord.


The documentation for this struct was generated from the following file: