Adding AABB to meshlets

This commit is contained in:
Dynamitos
2023-12-11 14:45:37 +01:00
parent eceb0f6bcc
commit 3feb331927
17 changed files with 63 additions and 51 deletions
+11 -4
View File
@@ -456,9 +456,12 @@ public:
{
return;
}
for(size_type i = 0; i < arraySize; ++i)
if constexpr (!std::is_trivially_destructible_v<T>)
{
std::allocator_traits<allocator_type>::destroy(allocator, &_data[i]);
for (size_type i = 0; i < arraySize; ++i)
{
std::allocator_traits<allocator_type>::destroy(allocator, &_data[i]);
}
}
deallocateArray(_data, allocated);
_data = nullptr;
@@ -596,9 +599,13 @@ private:
if(newSize < arraySize)
{
// But since we are sizing down we destruct some of them
for(size_type i = newSize; i < arraySize; ++i)
if constexpr (!std::is_trivially_destructible_v<T>)
{
std::allocator_traits<allocator_type>::destroy(allocator, &_data[i]);
for (size_type i = newSize; i < arraySize; ++i)
{
std::allocator_traits<allocator_type>::destroy(allocator, &_data[i]);
}
}
}
else