extract explicit mesh with topology information from implicit surfaces with boolean operations, and do surface/volume integrating on them.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
758 B

#pragma once
#include <pre_unordered_hash_ispc.h>
namespace detail {
size_t unordered_hash_32(uint32_t* data, size_t length, size_t seed);
}
template <typename T>
size_t unordered_hash_32(const T* data, size_t length, size_t seed = 0)
{
static_assert(sizeof(T) % sizeof(uint32_t) == 0, "Data type size must be multiple of 4 bytes.");
return detail::unordered_hash_32((uint32_t*)data, length, seed);
}
template <typename Container>
size_t unordered_hash_32(const Container& container, size_t seed = 0)
{
using T = typename Container::value_type;
static_assert(sizeof(T) % sizeof(uint32_t) == 0, "Data type size must be multiple of 4 bytes.");
return detail::unordered_hash_32((uint32_t*)container.data(), container.size(), seed);
}