Changing engine to shared library
This commit is contained in:
@@ -49,14 +49,16 @@ void BVH::colliderCallback(entt::registry& registry, entt::entity entity)
|
||||
|
||||
void BVH::visualize()
|
||||
{
|
||||
for(const auto& node : staticNodes)
|
||||
Array<DebugVertex> verts;
|
||||
for (const auto& node : staticNodes)
|
||||
{
|
||||
node.box.visualize(gDebugVertices);
|
||||
node.box.visualize(verts);
|
||||
}
|
||||
for(const auto& node : dynamicNodes)
|
||||
for (const auto& node : dynamicNodes)
|
||||
{
|
||||
node.box.visualize(gDebugVertices);
|
||||
node.box.visualize(verts);
|
||||
}
|
||||
addDebugVertices(verts);
|
||||
}
|
||||
|
||||
void BVH::traverseStaticTree(const AABB& aabb, entt::entity source, int32 nodeIndex, Array<Pair<entt::entity, entt::entity>>& overlaps)
|
||||
|
||||
@@ -284,11 +284,11 @@ void PhysicsSystem::calculateContacts(entt::entity id1, const ShapeBase& shape1,
|
||||
const Vector v1 = point2 - point1;
|
||||
const Vector v2 = point3 - point1;
|
||||
const Vector faceNormal = glm::normalize(glm::cross(v1, v2));
|
||||
Seele::gDebugVertices.add(DebugVertex{
|
||||
addDebugVertex(DebugVertex{
|
||||
.position = (point1 + point2 + point3) / 3.f,
|
||||
.color = Vector(1, 0, 0)
|
||||
});
|
||||
Seele::gDebugVertices.add(DebugVertex{
|
||||
addDebugVertex(DebugVertex{
|
||||
.position = faceNormal + (point1 + point2 + point3) / 3.f,
|
||||
.color = Vector(1, 0, 0)
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user