From 4e1ada6250bcee7e839d38e68bec5966cc67108a Mon Sep 17 00:00:00 2001 From: Andrew Wilson <andx_roo@live.com> Date: Sat, 5 Feb 2022 11:02:17 -0500 Subject: [PATCH] STYLE: Uncrustify --- Source/Controllers/imstkRigidObjectController.cpp | 10 +++++----- Source/Controllers/imstkRigidObjectController.h | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Source/Controllers/imstkRigidObjectController.cpp b/Source/Controllers/imstkRigidObjectController.cpp index ad35d45ea..5c73de577 100644 --- a/Source/Controllers/imstkRigidObjectController.cpp +++ b/Source/Controllers/imstkRigidObjectController.cpp @@ -75,15 +75,15 @@ RigidObjectController::update(const double dt) const Vec3d& devicePos = getPosition(); const Quatd& deviceOrientation = getOrientation(); - const Vec3d& deviceOffset = Vec3d(0.0, 0.0, 0.0); + const Vec3d& deviceOffset = Vec3d(0.0, 0.0, 0.0); // If using critical damping automatically compute kd if (m_useCriticalDamping) { - const double mass = m_rigidObject->getRigidBody()->getMass(); + const double mass = m_rigidObject->getRigidBody()->getMass(); const double linearKs = m_linearKs.maxCoeff(); m_linearKd = 2.0 * std::sqrt(mass * linearKs); - + const Mat3d inertia = m_rigidObject->getRigidBody()->getIntertiaTensor(); // Currently kd is not a 3d vector though it could be. // So here we make an approximation. Either: @@ -92,10 +92,10 @@ RigidObjectController::update(const double dt) // Both may behave weird on anistropic inertia tensors //const double inertiaScale = inertia.eigenvalues().real().maxCoeff(); const double inertiaScale = std::cbrt(inertia.determinant()); - const double angularKs = m_angularKs.maxCoeff(); + const double angularKs = m_angularKs.maxCoeff(); m_angularKd = 2.0 * std::sqrt(inertiaScale * angularKs); } - + // If kd > 2 * sqrt(mass * ks); The system is overdamped (may be intentional) // If kd < 2 * sqrt(mass * ks); The system is underdamped (never intended) diff --git a/Source/Controllers/imstkRigidObjectController.h b/Source/Controllers/imstkRigidObjectController.h index 201c54814..d483f623f 100644 --- a/Source/Controllers/imstkRigidObjectController.h +++ b/Source/Controllers/imstkRigidObjectController.h @@ -174,8 +174,8 @@ protected: Vec3d m_tS = Vec3d::Zero(); Vec3d m_tD = Vec3d::Zero(); - double m_forceScaling = 0.0000075; - bool m_useSpring = true; ///> If off, pos & orientation directly set + double m_forceScaling = 0.0000075; + bool m_useSpring = true; ///> If off, pos & orientation directly set bool m_useCriticalDamping = true; ///> If on, kd is automatically computed bool m_forceSmoothening = true; -- GitLab