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 BrickHalfSpaceContactImpl;
65 class TriangleMeshContactImpl;
67 class PointContactImpl;
98 static const char* nameOfCondition(
Condition);
153 const ContactImpl&
getImpl()
const {assert(impl);
return *impl;}
154 ContactImpl&
updImpl() {assert(impl);
return *impl;}
156 explicit Contact(ContactImpl* impl);
163 <<
" (typeId=" << c.
getTypeId() <<
"):\n";
192 static bool isInstance(
const Contact& contact);
197 const UntrackedContactImpl& getImpl()
const 198 { assert(isInstance(*
this));
199 return reinterpret_cast<const UntrackedContactImpl&
> 228 Real getSeparation()
const;
231 static bool isInstance(
const Contact& contact);
236 const BrokenContactImpl& getImpl()
const 237 { assert(isInstance(*
this));
281 Real getRadius1()
const;
283 Real getRadius2()
const;
286 Real getEffectiveRadius()
const;
291 Real getDepth()
const;
293 const Vec3& getOrigin()
const;
300 static bool isInstance(
const Contact& contact);
302 { assert(isInstance(contact));
305 { assert(isInstance(contact));
312 const CircularPointContactImpl& getImpl()
const 313 { assert(isInstance(*
this));
314 return reinterpret_cast<const CircularPointContactImpl&
> 375 const Vec2& getCurvatures()
const;
382 const Transform& getContactFrame()
const;
387 Real getDepth()
const;
390 static bool isInstance(
const Contact& contact);
392 { assert(isInstance(contact));
395 { assert(isInstance(contact));
402 const EllipticalPointContactImpl& getImpl()
const 403 { assert(isInstance(*
this));
404 return reinterpret_cast<const EllipticalPointContactImpl&
> 436 int getLowestVertex()
const;
440 Real getDepth()
const;
443 static bool isInstance(
const Contact& contact);
448 { assert(isInstance(contact));
454 { assert(isInstance(contact));
462 const BrickHalfSpaceContactImpl& getImpl()
const 463 { assert(isInstance(*
this));
464 return reinterpret_cast<const BrickHalfSpaceContactImpl&
> 492 const std::set<int>& faces1,
493 const std::set<int>& faces2);
498 const std::set<int>& getSurface1Faces()
const;
502 const std::set<int>& getSurface2Faces()
const;
505 static bool isInstance(
const Contact& contact);
509 { assert(isInstance(contact));
514 { assert(isInstance(contact));
522 const TriangleMeshContactImpl& getImpl()
const 523 { assert(isInstance(*
this));
524 return reinterpret_cast<const TriangleMeshContactImpl&
> 582 Vec3 getLocation()
const;
587 Vec3 getNormal()
const;
591 Real getRadiusOfCurvature1()
const;
595 Real getRadiusOfCurvature2()
const;
600 Real getEffectiveRadiusOfCurvature()
const;
606 Real getDepth()
const;
610 static bool isInstance(
const Contact& contact);
617 const PointContactImpl& getImpl()
const 618 { assert(isInstance(*
this));
624 #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:593
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