Commit a150fa5c authored by Sreekanth Arikatla's avatar Sreekanth Arikatla
Browse files

REFAC: Rename computeContactForces to generinc name processCollisionData

parent 94e87a35
......@@ -104,7 +104,7 @@ BoneDrillingCH::erodeBone()
}
void
BoneDrillingCH::computeContactForces()
BoneDrillingCH::processCollisionData()
{
// Check if any collisions
const auto devicePosition = m_drill->getCollidingGeometry()->getTranslation();
......
......@@ -64,7 +64,7 @@ public:
///
/// \brief Compute forces based on collision data
///
void computeContactForces() override;
void processCollisionData() override;
///
/// \brief Get stiffness
......
......@@ -93,7 +93,7 @@ public:
///
/// \brief Compute forces based on collision data (pure virtual)
///
virtual void computeContactForces() = 0;
virtual void processCollisionData() = 0;
///
/// \brief Returns collision handling type
......
......@@ -30,7 +30,7 @@
namespace imstk
{
void
PenaltyCH::computeContactForces()
PenaltyCH::processCollisionData()
{
if (auto deformableObj = std::dynamic_pointer_cast<DeformableObject>(m_object))
{
......
......@@ -62,7 +62,7 @@ public:
///
/// \brief Compute forces based on collision data
///
void computeContactForces() override;
void processCollisionData() override;
void computeContactForcesAnalyticRigid(std::shared_ptr<CollidingObject> analyticObj);
void computeContactForcesDiscreteDeformable(std::shared_ptr<DeformableObject> deformableObj);
......
......@@ -25,7 +25,7 @@ limitations under the License.
namespace imstk
{
void
PickingCH::computeContactForces()
PickingCH::processCollisionData()
{
if (m_object)
{
......
......@@ -63,7 +63,7 @@ public:
///
/// \brief Compute forces based on collision data
///
void computeContactForces() override;
void processCollisionData() override;
///
/// \brief Add LPC constraints for the node that is picked
......
......@@ -30,7 +30,7 @@
namespace imstk
{
void
VirtualCouplingCH::computeContactForces()
VirtualCouplingCH::processCollisionData()
{
m_offset.setZero();
......
......@@ -58,7 +58,7 @@ public:
///
/// \brief Compute forces based on collision data
///
void computeContactForces() override;
void processCollisionData() override;
///
/// \brief Get/Set Stiffness coefficient
......
......@@ -48,7 +48,7 @@ InteractionPair::InteractionPair(std::shared_ptr<CollidingObject> A,
}
// Collision Detection
std::shared_ptr<CollisionDetection> CD = CollisionDetection::make_collision_detection(CDType, A, B, m_colData);
std::shared_ptr<CollisionDetection> CD = CollisionDetection::makeCollisionDetectionObject(CDType, A, B, m_colData);
if (CD == nullptr)
{
LOG(WARNING) << "InteractionPair error: can not instantiate collision detection algorithm.";
......@@ -131,7 +131,7 @@ InteractionPair::computeCollisionData()
}
void
InteractionPair::computeContactForces()
InteractionPair::processCollisionData()
{
if (!m_valid)
{
......@@ -141,11 +141,11 @@ InteractionPair::computeContactForces()
if(m_colHandlingA)
{
m_colHandlingA->computeContactForces();
m_colHandlingA->processCollisionData();
}
if(m_colHandlingB)
{
m_colHandlingB->computeContactForces();
m_colHandlingB->processCollisionData();
}
}
......
......@@ -73,7 +73,7 @@ public:
///
/// \brief Call collision handling algorithm to compute contact forces for an object
///
void computeContactForces();
void processCollisionData();
///
/// \brief Call collision handling algorithm to compute contact forces for an object
......
......@@ -64,7 +64,6 @@ void
SceneManager::runModule()
{
StopWatch wwt;
wwt.start();
// Reset Contact forces to 0
......@@ -96,7 +95,7 @@ SceneManager::runModule()
for (auto intPair : m_scene->getCollisionGraph()->getInteractionPairList())
{
intPair->computeCollisionData();
intPair->computeContactForces();
intPair->processCollisionData();
}
// Apply forces on device
......@@ -109,8 +108,6 @@ SceneManager::runModule()
for (auto solvers : m_scene->getSolvers())
{
solvers->solve();
auto xx = std::dynamic_pointer_cast<PbdSolver>(solvers);
}
// Apply the geometry and apply maps to all the objects
......@@ -156,7 +153,7 @@ SceneManager::runModule()
auto timeElapsed = wwt.getTimeElapsed(StopWatch::TimeUnitType::seconds);
// Update time step size of the dynamic objects
// Update time step size of the dynamic objects
for (auto obj : m_scene->getSceneObjects())
{
if (obj->getType() == SceneObject::Type::Pbd)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment