From f19ff38009d42af154dc240f946627e610f49c10 Mon Sep 17 00:00:00 2001 From: Benjamin Kraft Date: Sun, 29 Sep 2024 22:25:28 +0200 Subject: [PATCH] outputs --- src/simulation.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/simulation.cpp b/src/simulation.cpp index 259e82b..23ce427 100644 --- a/src/simulation.cpp +++ b/src/simulation.cpp @@ -53,14 +53,14 @@ void Simulation::createMeshBuffers() { auto body = std::make_unique(&sphere, 0.3f); - for (size_t i = 0; i < 3; i++){ + for (size_t i = 0; i < 40; i++){ auto copy = std::make_unique(*body.get()); copy->applyVertexOffset({i * 2, 0, 0}); softBodies.push_back(std::move(copy)); } body = std::make_unique(&bunny, 0.3f); - for (size_t i = 0; i < 3; i++){ + for (size_t i = 0; i < 80; i++){ auto copy = std::make_unique(*body.get()); copy->applyVertexOffset({i * 2, 2, 0}); softBodies.push_back(std::move(copy)); @@ -142,6 +142,12 @@ void Simulation::createMeshBuffers() { constraintData.tetrahedra.insert(constraintData.tetrahedra.end(), currentSoftBody->constraintData.tetrahedra.begin(), currentSoftBody->constraintData.tetrahedra.end()); } + printf("Vertices: %zu\nFaces: %zu\nEdges: %zu\nTriangles: %zu\nTetrahedra: %zu\nTotal Constraints: %zu\n", + vertices.size(), faces.size(), constraintData.edges.size(), constraintData.triangles.size(), constraintData.tetrahedra.size(), + constraintData.edges.size() + constraintData.tetrahedra.size()); + + printf("Partitions: %u\n", constraintData.partitionCount); + class SimulationBuffer : public Buffer { public: SimulationBuffer(void* data, VkDeviceSize size, VkBufferUsageFlags additionalUsageFlags=0)