1 #ifndef SimTK_SIMMATH_CONTACT_H_
2 #define SimTK_SIMMATH_CONTACT_H_
60 class UntrackedContactImpl;
61 class BrokenContactImpl;
62 class CircularPointContactImpl;
63 class EllipticalPointContactImpl;
64 class TriangleMeshContactImpl;
65 class PointContactImpl;
96 static const char* nameOfCondition(Condition);
120 Condition getCondition()
const;
136 Contact& setCondition(Condition condition);
151 const ContactImpl&
getImpl()
const {assert(impl);
return *impl;}
152 ContactImpl&
updImpl() {assert(impl);
return *impl;}
154 explicit Contact(ContactImpl* impl);
161 <<
" (typeId=" << c.
getTypeId() <<
"):\n";
190 static bool isInstance(
const Contact& contact);
195 const UntrackedContactImpl& getImpl()
const
196 { assert(isInstance(*
this));
197 return reinterpret_cast<const UntrackedContactImpl&
>
221 const Transform& X_S1S2, Real separation);
226 Real getSeparation()
const;
229 static bool isInstance(
const Contact& contact);
234 const BrokenContactImpl& getImpl()
const
235 { assert(isInstance(*
this));
275 const Transform& X_S1S2, Real radius, Real depth,
279 Real getRadius1()
const;
281 Real getRadius2()
const;
284 Real getEffectiveRadius()
const;
289 Real getDepth()
const;
291 const Vec3& getOrigin()
const;
298 static bool isInstance(
const Contact& contact);
300 { assert(isInstance(contact));
303 { assert(isInstance(contact));
310 const CircularPointContactImpl& getImpl()
const
311 { assert(isInstance(*
this));
312 return reinterpret_cast<const CircularPointContactImpl&
>
373 const Vec2& getCurvatures()
const;
380 const Transform& getContactFrame()
const;
385 Real getDepth()
const;
388 static bool isInstance(
const Contact& contact);
390 { assert(isInstance(contact));
393 { assert(isInstance(contact));
400 const EllipticalPointContactImpl& getImpl()
const
401 { assert(isInstance(*
this));
402 return reinterpret_cast<const EllipticalPointContactImpl&
>
431 const std::set<int>& faces1,
432 const std::set<int>& faces2);
437 const std::set<int>& getSurface1Faces()
const;
441 const std::set<int>& getSurface2Faces()
const;
444 static bool isInstance(
const Contact& contact);
448 { assert(isInstance(contact));
453 { assert(isInstance(contact));
461 const TriangleMeshContactImpl& getImpl()
const
462 { assert(isInstance(*
this));
463 return reinterpret_cast<const TriangleMeshContactImpl&
>
498 Vec3& location,
Vec3& normal, Real radius1, Real radius2, Real depth);
515 Vec3& location,
Vec3& normal, Real radius, Real depth);
521 Vec3 getLocation()
const;
526 Vec3 getNormal()
const;
530 Real getRadiusOfCurvature1()
const;
534 Real getRadiusOfCurvature2()
const;
539 Real getEffectiveRadiusOfCurvature()
const;
545 Real getDepth()
const;
549 static bool isInstance(
const Contact& contact);
556 const PointContactImpl& getImpl()
const
557 { assert(isInstance(*
this));
563 #endif // SimTK_SIMMATH_CONTACT_H_
SimTK_DEFINE_UNIQUE_INDEX_TYPE(AssemblyConditionIndex)
Includes internal headers providing declarations for the basic SimTK Core classes, including Simmatrix.
std::ostream & operator<<(std::ostream &o, const ContactForce &f)
Definition: CompliantContactSubsystem.h:387
This is the header file that every Simmath compilation unit should include first. ...
#define SimTK_SIMMATH_EXPORT
Definition: SimTKmath/include/simmath/internal/common.h:64