38 #ifndef FCL_COLLISIONRESULT_H 39 #define FCL_COLLISIONRESULT_H 43 #include "fcl/common/types.h" 44 #include "fcl/narrowphase/contact.h" 45 #include "fcl/narrowphase/cost_source.h" 52 struct CollisionResult
56 std::vector<Contact<S>> contacts;
59 std::set<CostSource<S>> cost_sources;
62 Vector3<S> cached_gjk_guess;
71 void addCostSource(
const CostSource<S>& c, std::size_t num_max_cost_sources);
86 void getContacts(std::vector<Contact<S>>& contacts_);
95 using CollisionResultf = CollisionResult<float>;
96 using CollisionResultd = CollisionResult<double>;
100 #include "fcl/narrowphase/collision_result-inl.h" void addCostSource(const CostSource< S > &c, std::size_t num_max_cost_sources)
add one cost source into result structure
Definition: collision_result-inl.h:66
Main namespace.
Definition: broadphase_bruteforce-inl.h:45
bool isCollision() const
return binary collision result
Definition: collision_result-inl.h:76
const Contact< S > & getContact(size_t i) const
get the i-th contact calculated
Definition: collision_result-inl.h:97
size_t numContacts() const
number of contacts found
Definition: collision_result-inl.h:83
void getContacts(std::vector< Contact< S >> &contacts_)
get all the contacts
Definition: collision_result-inl.h:107
size_t numCostSources() const
number of cost sources found
Definition: collision_result-inl.h:90
void getCostSources(std::vector< CostSource< S >> &cost_sources_)
get all the cost sources
Definition: collision_result-inl.h:116
void clear()
clear the results obtained
Definition: collision_result-inl.h:125
void addContact(const Contact< S > &c)
add one contact into result structure
Definition: collision_result-inl.h:59