Jolt Physics
A multi core friendly Game Physics Engine
|
Go to the source code of this file.
Macros | |
#define | JPH_MAKE_HASH_STRUCT(type, name, ...) |
#define | JPH_MAKE_HASHABLE(type, ...) |
Functions | |
JPH_NAMESPACE_BEGIN uint64 | HashBytes (const void *inData, uint inSize, uint64 inSeed=0xcbf29ce484222325UL) |
uint64 | Hash64 (uint64 inValue) |
template<typename T > | |
void | HashCombineHelper (size_t &ioSeed, const T &inValue) |
Helper function that hashes a single value into ioSeed Taken from: https://stackoverflow.com/questions/2590677/how-do-i-combine-hash-values-in-c0x. | |
template<typename... Values> | |
void | HashCombine (std::size_t &ioSeed, Values... inValues) |
A 64 bit hash function by Thomas Wang, Jan 1997 See: http://web.archive.org/web/20071223173210/http://www.concentric.net/~Ttwang/tech/inthash.htm
inValue | Value to hash |
|
inline |
Implements the FNV-1a hash algorithm
inData | Data block of bytes |
inSize | Number of bytes |
inSeed | Seed of the hash (can be used to pass in the hash of a previous operation, otherwise leave default) |
|
inline |
Hash combiner to use a custom struct in an unordered map or set
Usage:
struct SomeHashKey { std::string key1; std::string key2; bool key3; }; JPH_MAKE_HASHABLE(SomeHashKey, t.key1, t.key2, t.key3)