Go to the documentation of this file.
38 #ifndef FCL_COLLISIONRESULT_INL_H
39 #define FCL_COLLISIONRESULT_INL_H
48 struct CollisionResult<double>;
61 contacts.push_back(c);
69 cost_sources.insert(c);
70 while (cost_sources.size() > num_max_cost_sources)
71 cost_sources.erase(--cost_sources.end());
78 return contacts.size() > 0;
85 return contacts.size();
92 return cost_sources.size();
99 if(i < contacts.size())
102 return contacts.back();
106 template <
typename S>
110 contacts_.resize(contacts.size());
111 std::copy(contacts.begin(), contacts.end(), contacts_.begin());
115 template <
typename S>
119 cost_sources_.resize(cost_sources.size());
120 std::copy(cost_sources.begin(), cost_sources.end(), cost_sources_.begin());
124 template <
typename S>
128 cost_sources.clear();
void addContact(const Contact< S > &c)
add one contact into result structure
Cost source describes an area with a cost. The area is described by an AABB region.
bool isCollision() const
return binary collision result
void clear()
clear the results obtained
void getCostSources(std::vector< CostSource< S >> &cost_sources_)
get all the cost sources
size_t numCostSources() const
number of cost sources found
size_t numContacts() const
number of contacts found
void addCostSource(const CostSource< S > &c, std::size_t num_max_cost_sources)
add one cost source into result structure
void getContacts(std::vector< Contact< S >> &contacts_)
get all the contacts
const Contact< S > & getContact(size_t i) const
get the i-th contact calculated
fcl
Author(s):
autogenerated on Tue Dec 5 2023 03:40:48