Crimson Engine 1.0.0
A high-performance C++20 game engine prototype showcasing a custom ECS, Vulkan renderer, and ImGui editor.
Loading...
Searching...
No Matches
EntityHash.hpp
Go to the documentation of this file.
1// EntityHash.hpp
2#pragma once
3#include "Entity.hpp"
4#include <functional>
5
10namespace std {
15 template<>
16 struct hash<Entity> {
22 inline std::size_t operator()(const Entity& e) const noexcept {
23 return std::hash<Entity::IdType>{}(e.getId());
24 }
25 };
26}
Lightweight identifier representing a game object in the Entity Component System.
Definition Entity.hpp:11
Standard library namespace.
std::size_t operator()(const Entity &e) const noexcept
Hash functor operator for Entity.
Definition EntityHash.hpp:22
uint32_t hash
Definition ufbx.cpp:10736