dart
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
dart::collision::CollisionResult Class Reference

Public Member Functions

void addContact (const Contact &contact)
 Add one contact.
 
std::size_t getNumContacts () const
 Return number of contacts.
 
ContactgetContact (std::size_t index)
 Return the index-th contact.
 
const ContactgetContact (std::size_t index) const
 Return (const) the index-th contact.
 
const std::vector< Contact > & getContacts () const
 Return contacts.
 
const std::unordered_set< const dynamics::BodyNode * > & getCollidingBodyNodes () const
 Return the set of BodyNodes that are in collision.
 
const std::unordered_set< const dynamics::ShapeFrame * > & getCollidingShapeFrames () const
 Return the set of ShapeFrames that are in collision.
 
bool inCollision (const dynamics::BodyNode *bn) const
 Returns true if the given BodyNode is in collision.
 
bool inCollision (const dynamics::ShapeFrame *frame) const
 Returns true if the given ShapeFrame is in collision.
 
bool isCollision () const
 Return binary collision result.
 
 operator bool () const
 Implicitly converts this CollisionResult to the value of isCollision()
 
void clear ()
 Clear all the contacts.
 

Protected Member Functions

void addObject (CollisionObject *object)
 

Protected Attributes

std::vector< ContactmContacts
 List of contact information for each contact.
 
std::unordered_set< const dynamics::BodyNode * > mCollidingBodyNodes
 Set of BodyNodes that are colliding.
 
std::unordered_set< const dynamics::ShapeFrame * > mCollidingShapeFrames
 Set of ShapeFrames that are colliding.
 

The documentation for this class was generated from the following files: