Fix animation portability checks
This commit is contained in:
1 parent
67d914a4ed
commit
bdf44be74c
2 files changed
+10
-6
No files matched your search
@@ -28,12 +28,16 @@ int parallelAnimationItems(std::size_t count, int requested, Body&& body) {
|
||||
}
|
||||
}
|
||||
};
|
||||
{
|
||||
std::vector<std::jthread> threads;
|
||||
threads.reserve(workers - 1);
|
||||
std::vector<std::thread> threads;
|
||||
threads.reserve(workers - 1);
|
||||
try {
|
||||
for (std::size_t i = 1; i < workers; ++i) threads.emplace_back(run);
|
||||
run();
|
||||
} catch (...) {
|
||||
for (auto& thread : threads) thread.join();
|
||||
throw;
|
||||
}
|
||||
run();
|
||||
for (auto& thread : threads) thread.join();
|
||||
// Report the first failing input, independent of completion order.
|
||||
for (const auto& error : errors)
|
||||
if (error) std::rethrow_exception(error);
|
||||
|
||||
@@ -38,8 +38,8 @@ TEST_CASE("animation.pose.twoBoneIkReachesTargetsWithoutIteration") {
|
||||
REQUIRE(pose.solveTwoBoneIK(&skeleton, 0, 1, 2, target[0], target[1], target[2], 1));
|
||||
float error = 0;
|
||||
const auto& p = pose.world(2);
|
||||
error =
|
||||
std::sqrt(std::pow(p.px - target[0], 2) + std::pow(p.py - target[1], 2) + std::pow(p.pz - target[2], 2));
|
||||
error = std::sqrt(std::pow(p.px - target[0], 2.f) + std::pow(p.py - target[1], 2.f) +
|
||||
std::pow(p.pz - target[2], 2.f));
|
||||
CHECK(error < .0003f);
|
||||
const auto before = pose.world(1);
|
||||
REQUIRE(pose.solveTwoBoneIK(&skeleton, 0, 1, 2, target[0], target[1], target[2], 1));
|
||||
|
||||
Reference in new issue
Block a user