Skip to content

Commit

Permalink
Debug
Browse files Browse the repository at this point in the history
  • Loading branch information
Cherrytree56567 committed May 13, 2024
1 parent 8f45f5f commit b7a318f
Show file tree
Hide file tree
Showing 17 changed files with 9 additions and 4 deletions.
11 changes: 8 additions & 3 deletions Drizzle3D/Physics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ namespace Drizzle3D {
exit(-1993);
}
}, this);

app->dispatcher()->AddEventListener(Drizzle3D::EventType::AppUpdate, [](GLFWwindow* window, std::unique_ptr<Drizzle3D::Event> ev, std::any a) {
Physics* al = std::any_cast<Physics*>(a);
al->UpdateColliders();
}, this);
}

void Physics::calculateAABB(std::string name) {
Expand All @@ -37,6 +42,9 @@ namespace Drizzle3D {
max_bound = glm::max(max_bound, vertex);
}

std::cout << "min: " << min_bound.x << ", " << min_bound.y << ", " << min_bound.z << "\n";
std::cout << "max: " << max_bound.x << ", " << max_bound.y << ", " << max_bound.z << "\n";

// Update collider's AABB if it exists for the specified object
for (auto& collider : colliders) {
if (std::get<0>(collider) == name) {
Expand Down Expand Up @@ -85,9 +93,6 @@ namespace Drizzle3D {
}
}

if (!isCollider)
return false;

for (const auto& otherCollider : colliders) {
if (std::get<0>(otherCollider) == name || !std::get<1>(otherCollider))
continue;
Expand Down
Binary file modified Drizzle3D/x64/Debug/Drizzle3D.ilk
Binary file not shown.
Binary file modified Drizzle3D/x64/Debug/Drizzle3D.tlog/Drizzle3D.write.1u.tlog
Binary file not shown.
Binary file modified Drizzle3D/x64/Debug/Drizzle3D.tlog/link.read.1.tlog
Binary file not shown.
Binary file modified Drizzle3D/x64/Debug/Physics.obj
Binary file not shown.
Binary file modified Drizzle3D/x64/Debug/vc142.idb
Binary file not shown.
Binary file modified Drizzle3D/x64/Debug/vc142.pdb
Binary file not shown.
2 changes: 1 addition & 1 deletion ExampleProject/ExampleProject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ void ImGUICode(std::shared_ptr<Drizzle3D::ImGuiLayer> rend) {
ImGui::SliderFloat("Rotation Z", &rotation.z, 0.0f, 360.0f);

ImGui::SliderFloat("Position X", &position.x, 0.0f, 360.0f);
ImGui::SliderFloat("Position Y", &position.y, -5.0f, 360.0f);
ImGui::SliderFloat("Position Y", &position.y, -5.0f, 5.0f);
ImGui::SliderFloat("Position Z", &position.z, -360.0f, 360.0f);

if (ImGui::Button("Ios Texture")) {
Expand Down
Binary file modified ExampleProject/vendor/Drizzle3D/Drizzle3D.dll
Binary file not shown.
Binary file modified ExampleProject/vendor/Drizzle3D/Drizzle3D.pdb
Binary file not shown.
Binary file modified ExampleProject/x64/Debug/Drizzle3D.dll
Binary file not shown.
Binary file modified ExampleProject/x64/Debug/ExampleProject.exe
Binary file not shown.
Binary file modified ExampleProject/x64/Debug/ExampleProject.ilk
Binary file not shown.
Binary file modified ExampleProject/x64/Debug/ExampleProject.obj
Binary file not shown.
Binary file modified ExampleProject/x64/Debug/ExampleProject.pdb
Binary file not shown.
Binary file modified ExampleProject/x64/Debug/vc142.idb
Binary file not shown.
Binary file modified ExampleProject/x64/Debug/vc142.pdb
Binary file not shown.

0 comments on commit b7a318f

Please sign in to comment.