16 #ifndef SURGSIM_COLLISION_COLLISIONPAIR_H
17 #define SURGSIM_COLLISION_COLLISIONPAIR_H
63 const std::shared_ptr<Representation>& second);
72 const std::shared_ptr<Representation>& second);
76 const std::pair<std::shared_ptr<Representation>, std::shared_ptr<Representation>>&
80 std::shared_ptr<Representation>
getFirst()
const;
83 std::shared_ptr<Representation>
getSecond()
const;
110 void addContact(
const std::shared_ptr<Contact>& contact);
113 const std::list<std::shared_ptr<Contact>>&
getContacts()
const;
128 std::pair<std::shared_ptr<Representation>,
Definition: DriveElementFromInputBehavior.cpp:27
std::shared_ptr< Representation > getSecond() const
Definition: CollisionPair.cpp:71
const std::list< std::shared_ptr< Contact > > & getContacts() const
Definition: CollisionPair.cpp:108
std::pair< std::shared_ptr< Representation >, std::shared_ptr< Representation > > m_representations
Pair of objects that are colliding.
Definition: CollisionPair.h:129
~CollisionPair()
Destructor.
Definition: CollisionPair.cpp:42
Definition: Location.h:31
bool isSwapped() const
Query if this the pair has been swapped from when it was constructed.
Definition: CollisionPair.cpp:125
Collision Pair class, it signifies a pair of items that should be checked with the collision algorith...
Definition: CollisionPair.h:55
bool m_isSwapped
Definition: CollisionPair.h:134
void clearContacts()
Reset clear the list of contacts, invalidating all the contacts.
Definition: CollisionPair.cpp:113
void addContact(const double &depth, const SurgSim::Math::Vector3d &contactPoint, const SurgSim::Math::Vector3d &normal, const std::pair< SurgSim::DataStructures::Location, SurgSim::DataStructures::Location > &penetrationPoints)
Adds a contact to the collision pair.
Definition: CollisionPair.cpp:81
const std::pair< std::shared_ptr< Representation >, std::shared_ptr< Representation > > & getRepresentations() const
Function that returns the pair of representations of the objects that are colliding.
Definition: CollisionPair.cpp:61
bool hasContacts() const
Definition: CollisionPair.cpp:76
Definitions of small fixed-size vector types.
void swapRepresentations()
Swap the representation pair so that first becomes second and second becomes first.
Definition: CollisionPair.cpp:118
void setRepresentations(const std::shared_ptr< Representation > &first, const std::shared_ptr< Representation > &second)
Sets the representations in this pair, representations cannot be the same instance and neither can be...
Definition: CollisionPair.cpp:47
Eigen::Matrix< double, 3, 1 > Vector3d
A 3D vector of doubles.
Definition: Vector.h:56
std::shared_ptr< Representation > getFirst() const
Definition: CollisionPair.cpp:66
std::list< std::shared_ptr< Contact > > m_contacts
List of current contacts.
Definition: CollisionPair.h:132
CollisionPair()
Default Constructor.
Definition: CollisionPair.cpp:30