| 68 | Simulation::Simulation() = default; |
| 69 | |
| 70 | glm::mat3 Simulation::randomRotationMatrix() { |
| 71 | static thread_local std::mt19937 rng(std::random_device{}()); |
| 72 | std::uniform_real_distribution<float> angleDist(0.0f, glm::two_pi<float>()); |
| 73 | |
| 74 | const glm::quat qx = glm::angleAxis(angleDist(rng), glm::vec3(1.0f, 0.0f, 0.0f)); |
| 75 | const glm::quat qy = glm::angleAxis(angleDist(rng), glm::vec3(0.0f, 1.0f, 0.0f)); |
| 76 | const glm::quat qz = glm::angleAxis(angleDist(rng), glm::vec3(0.0f, 0.0f, 1.0f)); |
| 77 | return glm::mat3_cast(qz * qy * qx); |
| 78 | } |
| 79 | |
| 80 | void Simulation::finishAtomBatch() { |
| 81 | if (!atomBatchActive_) { |
nothing calls this directly
no outgoing calls
no test coverage detected