Add bindings for Vector4, Vector4i, Projection built-in types.
This commit is contained in:
@@ -45,6 +45,8 @@
|
||||
#include <godot_cpp/variant/vector2i.hpp>
|
||||
#include <godot_cpp/variant/vector3.hpp>
|
||||
#include <godot_cpp/variant/vector3i.hpp>
|
||||
#include <godot_cpp/variant/vector4.hpp>
|
||||
#include <godot_cpp/variant/vector4i.hpp>
|
||||
|
||||
/**
|
||||
* Hashing functions
|
||||
@@ -205,6 +207,13 @@ struct HashMapHasherDefault {
|
||||
h = hash_djb2_one_32(p_vec.y, h);
|
||||
return hash_djb2_one_32(p_vec.z, h);
|
||||
}
|
||||
static _FORCE_INLINE_ uint32_t hash(const Vector4i &p_vec) {
|
||||
uint32_t h = hash_murmur3_one_32(p_vec.x);
|
||||
h = hash_murmur3_one_32(p_vec.y, h);
|
||||
h = hash_murmur3_one_32(p_vec.z, h);
|
||||
h = hash_murmur3_one_32(p_vec.w, h);
|
||||
return hash_fmix32(h);
|
||||
}
|
||||
|
||||
static _FORCE_INLINE_ uint32_t hash(const Vector2 &p_vec) {
|
||||
uint32_t h = hash_djb2_one_float(p_vec.x);
|
||||
@@ -215,6 +224,13 @@ struct HashMapHasherDefault {
|
||||
h = hash_djb2_one_float(p_vec.y, h);
|
||||
return hash_djb2_one_float(p_vec.z, h);
|
||||
}
|
||||
static _FORCE_INLINE_ uint32_t hash(const Vector4 &p_vec) {
|
||||
uint32_t h = hash_murmur3_one_real(p_vec.x);
|
||||
h = hash_murmur3_one_real(p_vec.y, h);
|
||||
h = hash_murmur3_one_real(p_vec.z, h);
|
||||
h = hash_murmur3_one_real(p_vec.w, h);
|
||||
return hash_fmix32(h);
|
||||
}
|
||||
|
||||
static _FORCE_INLINE_ uint32_t hash(const Rect2i &p_rect) {
|
||||
uint32_t h = hash_djb2_one_32(p_rect.position.x);
|
||||
|
||||
Reference in New Issue
Block a user