Commit 20286d29 authored by mohitTyagi's avatar mohitTyagi
Browse files

STYLE: Renamed "PlaneToSphere" to "BidirectionalPlaneToSphere"

parent 0cc166ea
......@@ -19,7 +19,7 @@
=========================================================================*/
#include "imstkPlaneToSphereCD.h"
#include "imstkBidirectionalPlaneToSphereCD.h"
#include "imstkCollidingObject.h"
#include "imstkCollisionData.h"
......@@ -31,7 +31,7 @@
namespace imstk {
void
PlaneToSphereCD::computeCollisionData()
BidirectionalPlaneToSphere::computeCollisionData()
{
// Clear collisionData
m_colData.clearAll();
......
......@@ -19,8 +19,8 @@
=========================================================================*/
#ifndef imstkPlaneToSphereCD_h
#define imstkPlaneToSphereCD_h
#ifndef imstkBidirectionalPlaneToSphereCD_h
#define imstkBidirectionalPlaneToSphereCD_h
#include <memory>
......@@ -38,17 +38,17 @@ class CollisionData;
///
/// \brief Plane to sphere collision detection
///
class PlaneToSphereCD : public CollisionDetection
class BidirectionalPlaneToSphere : public CollisionDetection
{
public:
///
/// \brief Constructor
///
PlaneToSphereCD(std::shared_ptr<Plane> planeA,
BidirectionalPlaneToSphere(std::shared_ptr<Plane> planeA,
std::shared_ptr<Sphere> sphereB,
CollisionData& colData) :
CollisionDetection(CollisionDetection::Type::PlaneToSphere, colData),
CollisionDetection(CollisionDetection::Type::BidirectionalPlaneToSphere, colData),
m_planeA(planeA),
m_sphereB(sphereB)
{}
......@@ -56,7 +56,7 @@ public:
///
/// \brief Destructor
///
~PlaneToSphereCD() = default;
~BidirectionalPlaneToSphere() = default;
///
/// \brief Detect collision and compute collision data
......@@ -71,4 +71,4 @@ private:
}
#endif // ifndef imstkPlaneToSphereCD_h
#endif // ifndef imstkBidirectionalPlaneToSphereCD_h
......@@ -22,7 +22,7 @@
#include "imstkCollisionDetection.h"
#include "imstkUnidirectionalPlaneToSphereCD.h"
#include "imstkPlaneToSphereCD.h"
#include "imstkBidirectionalPlaneToSphereCD.h"
#include "imstkSphereToSphereCD.h"
#include "imstkMeshToSphereCD.h"
#include "imstkMeshToPlaneCD.h"
......@@ -61,7 +61,7 @@ CollisionDetection::make_collision_detection(const Type& type,
return std::make_shared<UnidirectionalPlaneToSphereCD>(plane, sphere, colData);
}
break;
case Type::PlaneToSphere:
case Type::BidirectionalPlaneToSphere:
{
auto plane = std::dynamic_pointer_cast<Plane>(objA->getCollidingGeometry());
auto sphere = std::dynamic_pointer_cast<Sphere>(objB->getCollidingGeometry());
......@@ -70,10 +70,10 @@ CollisionDetection::make_collision_detection(const Type& type,
if (plane == nullptr || sphere == nullptr)
{
LOG(WARNING) << "CollisionDetection::make_collision_detection error: "
<< "invalid object geometries for PlaneToSphere collision detection.";
<< "invalid object geometries for BidirectionalPlaneToSphere collision detection.";
return nullptr;
}
return std::make_shared<PlaneToSphereCD>(plane, sphere, colData);
return std::make_shared<BidirectionalPlaneToSphere>(plane, sphere, colData);
}
break;
case Type::SphereToSphere:
......
......@@ -45,7 +45,7 @@ public:
enum class Type
{
UnidirectionalPlaneToSphere,
PlaneToSphere,
BidirectionalPlaneToSphere,
SphereToSphere,
MeshToSphere,
MeshToPlane,
......
......@@ -512,11 +512,11 @@ void testPenaltyRigidCollision()
// Collisions
auto colGraph = scene->getCollisionGraph();
colGraph->addInteractionPair(planeObj, sphere0Obj,
CollisionDetection::Type::PlaneToSphere,
CollisionDetection::Type::BidirectionalPlaneToSphere,
CollisionHandling::Type::None,
CollisionHandling::Type::Penalty);
colGraph->addInteractionPair(planeObj, sphere1Obj,
CollisionDetection::Type::PlaneToSphere,
CollisionDetection::Type::BidirectionalPlaneToSphere,
CollisionHandling::Type::None,
CollisionHandling::Type::Penalty);
colGraph->addInteractionPair(sphere0Obj, sphere1Obj,
......
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