1 #ifndef SimTK_SIMMATH_CONTACT_H_ 2 #define SimTK_SIMMATH_CONTACT_H_ 62 class UntrackedContactImpl;
63 class BrokenContactImpl;
64 class CircularPointContactImpl;
65 class EllipticalPointContactImpl;
66 class BrickHalfSpaceContactImpl;
67 class TriangleMeshContactImpl;
69 class PointContactImpl;
100 static const char* nameOfCondition(Condition);
124 Condition getCondition()
const;
140 Contact& setCondition(Condition condition);
155 const ContactImpl&
getImpl()
const {assert(impl);
return *impl;}
156 ContactImpl&
updImpl() {assert(impl);
return *impl;}
158 explicit Contact(ContactImpl* impl);
165 <<
" (typeId=" << c.
getTypeId() <<
"):\n";
194 static bool isInstance(
const Contact& contact);
199 const UntrackedContactImpl& getImpl()
const 200 { assert(isInstance(*
this));
201 return reinterpret_cast<const UntrackedContactImpl&
> 230 Real getSeparation()
const;
233 static bool isInstance(
const Contact& contact);
238 const BrokenContactImpl& getImpl()
const 239 { assert(isInstance(*
this));
283 Real getRadius1()
const;
285 Real getRadius2()
const;
288 Real getEffectiveRadius()
const;
293 Real getDepth()
const;
295 const Vec3& getOrigin()
const;
302 static bool isInstance(
const Contact& contact);
304 { assert(isInstance(contact));
307 { assert(isInstance(contact));
314 const CircularPointContactImpl& getImpl()
const 315 { assert(isInstance(*
this));
316 return reinterpret_cast<const CircularPointContactImpl&
> 377 const Vec2& getCurvatures()
const;
384 const Transform& getContactFrame()
const;
389 Real getDepth()
const;
392 static bool isInstance(
const Contact& contact);
394 { assert(isInstance(contact));
397 { assert(isInstance(contact));
404 const EllipticalPointContactImpl& getImpl()
const 405 { assert(isInstance(*
this));
406 return reinterpret_cast<const EllipticalPointContactImpl&
> 438 int getLowestVertex()
const;
442 Real getDepth()
const;
445 static bool isInstance(
const Contact& contact);
450 { assert(isInstance(contact));
456 { assert(isInstance(contact));
464 const BrickHalfSpaceContactImpl& getImpl()
const 465 { assert(isInstance(*
this));
466 return reinterpret_cast<const BrickHalfSpaceContactImpl&
> 494 const std::set<int>& faces1,
495 const std::set<int>& faces2);
500 const std::set<int>& getSurface1Faces()
const;
504 const std::set<int>& getSurface2Faces()
const;
507 static bool isInstance(
const Contact& contact);
511 { assert(isInstance(contact));
516 { assert(isInstance(contact));
524 const TriangleMeshContactImpl& getImpl()
const 525 { assert(isInstance(*
this));
526 return reinterpret_cast<const TriangleMeshContactImpl&
> 584 Vec3 getLocation()
const;
589 Vec3 getNormal()
const;
593 Real getRadiusOfCurvature1()
const;
597 Real getRadiusOfCurvature2()
const;
602 Real getEffectiveRadiusOfCurvature()
const;
608 Real getDepth()
const;
612 static bool isInstance(
const Contact& contact);
619 const PointContactImpl& getImpl()
const 620 { assert(isInstance(*
this));
626 #endif // SimTK_SIMMATH_CONTACT_H_
SimTK_DEFINE_UNIQUE_INDEX_TYPE(AssemblyConditionIndex)
This is the top-level SimTK namespace into which all SimTK names are placed to avoid collision with o...
Definition: Assembler.h:37
SimTK_Real Real
This is the default compiled-in floating point type for SimTK, either float or double.
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:606
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