Go to the documentation of this file.
16 #ifndef SURGSIM_COLLISION_SHAPESHAPECONTACTCALCULATION_H
17 #define SURGSIM_COLLISION_SHAPESHAPECONTACTCALCULATION_H
30 template <
class Shape1,
class Shape2>
42 return std::list<std::shared_ptr<Contact>>();
52 return std::list<std::shared_ptr<Contact>>();
60 auto one = std::static_pointer_cast<Shape1>(posedShape1.getShape());
61 auto two = std::static_pointer_cast<Shape2>(posedShape2.getShape());
63 SURGSIM_ASSERT(one->getType() == posedShape1.getShape()->getType()) <<
"Invalid Shape 1";
64 SURGSIM_ASSERT(two->getType() == posedShape2.getShape()->getType()) <<
"Invalid Shape 2";
74 auto oneAtTime0 = std::static_pointer_cast<Shape1>(posedShapeMotion1.first.getShape());
75 auto oneAtTime1 = std::static_pointer_cast<Shape1>(posedShapeMotion1.second.getShape());
76 auto twoAtTime0 = std::static_pointer_cast<Shape2>(posedShapeMotion2.first.getShape());
77 auto twoAtTime1 = std::static_pointer_cast<Shape2>(posedShapeMotion2.second.getShape());
79 SURGSIM_ASSERT(oneAtTime0->getType() == posedShapeMotion1.first.getShape()->getType()) <<
80 "Invalid Shape 1 detected at time 0";
81 SURGSIM_ASSERT(oneAtTime1->getType() == posedShapeMotion1.second.getShape()->getType()) <<
82 "Invalid Shape 1 detected at time 1";
83 SURGSIM_ASSERT(twoAtTime0->getType() == posedShapeMotion2.first.getShape()->getType()) <<
84 "Invalid Shape 2 detected at time 0";
85 SURGSIM_ASSERT(twoAtTime1->getType() == posedShapeMotion2.second.getShape()->getType()) <<
86 "Invalid Shape 2 detected at time 1";
89 *oneAtTime0, posedShapeMotion1.first.getPose(), *oneAtTime1, posedShapeMotion1.second.getPose(),
90 *twoAtTime0, posedShapeMotion2.first.getPose(), *twoAtTime1, posedShapeMotion2.second.getPose());
#define SURGSIM_ASSERT(condition)
Assert that condition is true.
Definition: Assert.h:77
PosedShapeMotion is embedding the motion of a PosedShape, providing a posed shape at 2 different inst...
Definition: Shape.h:146
Eigen::Transform< double, 3, Eigen::Isometry > RigidTransform3d
A 3D rigid (isometric) transform, represented as doubles.
Definition: RigidTransform.h:46
PosedShape is a transformed shape with a record of the pose used to transform it.
Definition: Shape.h:118
#define SURGSIM_FAILURE()
Report that something very bad has happened and abort program execution.
Definition: Assert.h:95
Definition: CompoundShapeToGraphics.cpp:30