Fixing staging buffers not getting deleted
remove vgcore
This commit is contained in:
@@ -109,7 +109,7 @@ void BVH::reinsertCollider(entt::entity entity, AABB aabb)
|
||||
void BVH::removeCollider(entt::entity entity)
|
||||
{
|
||||
int32 nodeIndex = -1;
|
||||
for (int32 i = 0; i < dynamicNodes.size(); i++)
|
||||
for (size_t i = 0; i < dynamicNodes.size(); i++)
|
||||
{
|
||||
if(dynamicNodes[i].isLeaf && dynamicNodes[i].owner == entity)
|
||||
{
|
||||
@@ -119,7 +119,6 @@ void BVH::removeCollider(entt::entity entity)
|
||||
}
|
||||
if(nodeIndex == -1)
|
||||
{
|
||||
|
||||
return;
|
||||
}
|
||||
int32 parentIndex = dynamicNodes[nodeIndex].parentIndex;
|
||||
@@ -354,7 +353,7 @@ int32 BVH::splitNode(Array<AABBCenter> aabbs)
|
||||
}
|
||||
int32 BVH::allocateNode()
|
||||
{
|
||||
for (int32 i = 0; i < dynamicNodes.size(); i++)
|
||||
for (size_t i = 0; i < dynamicNodes.size(); i++)
|
||||
{
|
||||
if(!dynamicNodes[i].isValid)
|
||||
{
|
||||
@@ -377,7 +376,7 @@ void BVH::validateBVH() const
|
||||
{
|
||||
assert(dynamicNodes[dynamicRoot].parentIndex == -1);
|
||||
}
|
||||
for(int32 i = 0; i < dynamicNodes.size(); ++i)
|
||||
for(size_t i = 0; i < dynamicNodes.size(); ++i)
|
||||
{
|
||||
int32 nodeIdx = i;
|
||||
size_t counter = dynamicNodes.size();
|
||||
|
||||
@@ -91,7 +91,7 @@ bool CollisionSystem::createWitness(Witness& result, const ShapeBase& source, co
|
||||
}
|
||||
for (size_t i = 0; i < source.indices.size(); i += 3)
|
||||
{
|
||||
auto findEdgePlane = [=, &result](uint32_t point1Index, uint32_t point2Index)
|
||||
auto findEdgePlane = [this, &source, &other, &result](uint32_t point1Index, uint32_t point2Index)
|
||||
{
|
||||
const glm::vec3 point1 = source.vertices[point1Index];
|
||||
const glm::vec3 point2 = source.vertices[point2Index];
|
||||
|
||||
@@ -346,19 +346,19 @@ void PhysicsSystem::calculateContacts(entt::entity id1, const ShapeBase& shape1,
|
||||
&& tx >= 0.f
|
||||
&& tx <= 1.f)
|
||||
{
|
||||
Vector p = p1 + tx * (p2 - p1);
|
||||
Vector ea = p2 - p1;
|
||||
Vector eb = p4 - p3;
|
||||
Vector n = glm::normalize(glm::cross(eb, ea));
|
||||
Contact contact = {
|
||||
.a = id1,
|
||||
.b = id2,
|
||||
.p = p,
|
||||
.n = n,
|
||||
.ea = ea,
|
||||
.eb = eb,
|
||||
.vf = false
|
||||
};
|
||||
// Vector p = p1 + tx * (p2 - p1);
|
||||
// Vector ea = p2 - p1;
|
||||
// Vector eb = p4 - p3;
|
||||
// Vector n = glm::normalize(glm::cross(eb, ea));
|
||||
// Contact contact = {
|
||||
// .a = id1,
|
||||
// .b = id2,
|
||||
// .p = p,
|
||||
// .n = n,
|
||||
// .ea = ea,
|
||||
// .eb = eb,
|
||||
// .vf = false
|
||||
// };
|
||||
}
|
||||
};
|
||||
for(size_t j = 0; j < shape2.indices.size(); j+=3)
|
||||
|
||||
Reference in New Issue
Block a user