38 #ifndef FCL_COSTSOURCE_INL_H 39 #define FCL_COSTSOURCE_INL_H 41 #include "fcl/narrowphase/cost_source.h" 48 struct CostSource<double>;
52 CostSource<S>::CostSource(
53 const Vector3<S>& aabb_min_,
54 const Vector3<S>& aabb_max_,
56 : aabb_min(aabb_min_),
58 cost_density(cost_density_)
60 total_cost = cost_density
61 * (aabb_max[0] - aabb_min[0])
62 * (aabb_max[1] - aabb_min[1])
63 * (aabb_max[2] - aabb_min[2]);
68 CostSource<S>::CostSource(
const AABB<S>& aabb, S cost_density_)
69 : aabb_min(aabb.min_), aabb_max(aabb.max_), cost_density(cost_density_)
71 total_cost = cost_density
72 * (aabb_max[0] - aabb_min[0])
73 * (aabb_max[1] - aabb_min[1])
74 * (aabb_max[2] - aabb_min[2]);
79 CostSource<S>::CostSource()
86 bool CostSource<S>::operator <(
const CostSource& other)
const 88 if(total_cost < other.total_cost)
90 if(total_cost > other.total_cost)
93 if(cost_density < other.cost_density)
95 if(cost_density > other.cost_density)
98 for(
size_t i = 0; i < 3; ++i)
99 if(aabb_min[i] != other.aabb_min[i])
100 return aabb_min[i] < other.aabb_min[i];
Main namespace.
Definition: broadphase_bruteforce-inl.h:45