46 template <
typename Shape0,
typename Shape1,
bool TransformIsIdentity,
53 getShapeSupport<_SupportOptions>(s0, dir, support0, hint[0],
data[0]);
55 if (TransformIsIdentity) {
56 getShapeSupport<_SupportOptions>(s1, -dir, support1, hint[1],
data[1]);
58 getShapeSupport<_SupportOptions>(s1, -oR1.transpose() * dir, support1,
60 support1 = oR1 * support1 + ot1;
65 template <
typename Shape0,
typename Shape1,
bool TransformIsIdentity,
70 getSupportTpl<Shape0, Shape1, TransformIsIdentity, _SupportOptions>(
71 static_cast<const Shape0*
>(md.
shapes[0]),
72 static_cast<const Shape1*
>(md.
shapes[1]), md.
oR1, md.
ot1, dir, support0,
73 support1, hint,
data);
77 template <
typename Shape0,
int _SupportOptions>
80 Eigen::Array<CoalScalar, 1, 2>& swept_sphere_radius,
84 swept_sphere_radius[1] = 0;
94 return getSupportFuncTpl<Shape0, TriangleP, true, _SupportOptions>;
96 return getSupportFuncTpl<Shape0, TriangleP, false, _SupportOptions>;
99 return getSupportFuncTpl<Shape0, Box, true, _SupportOptions>;
101 return getSupportFuncTpl<Shape0, Box, false, _SupportOptions>;
105 swept_sphere_radius[1] +=
static_cast<const Sphere*
>(s1)->radius;
108 return getSupportFuncTpl<Shape0, Sphere, true, _SupportOptions>;
110 return getSupportFuncTpl<Shape0, Sphere, false, _SupportOptions>;
113 return getSupportFuncTpl<Shape0, Ellipsoid, true, _SupportOptions>;
115 return getSupportFuncTpl<Shape0, Ellipsoid, false, _SupportOptions>;
119 swept_sphere_radius[1] +=
static_cast<const Capsule*
>(s1)->radius;
122 return getSupportFuncTpl<Shape0, Capsule, true, _SupportOptions>;
124 return getSupportFuncTpl<Shape0, Capsule, false, _SupportOptions>;
127 return getSupportFuncTpl<Shape0, Cone, true, _SupportOptions>;
129 return getSupportFuncTpl<Shape0, Cone, false, _SupportOptions>;
132 return getSupportFuncTpl<Shape0, Cylinder, true, _SupportOptions>;
134 return getSupportFuncTpl<Shape0, Cylinder, false, _SupportOptions>;
137 if (
static_cast<size_t>(convex1->
num_points) >
140 data[1].last_dir.setZero();
142 return getSupportFuncTpl<Shape0, LargeConvex, true, _SupportOptions>;
144 return getSupportFuncTpl<Shape0, LargeConvex, false, _SupportOptions>;
147 return getSupportFuncTpl<Shape0, SmallConvex, true, _SupportOptions>;
149 return getSupportFuncTpl<Shape0, SmallConvex, false, _SupportOptions>;
158 template <
int _SupportOptions>
161 Eigen::Array<CoalScalar, 1, 2>& swept_sphere_radius,
165 swept_sphere_radius[0] = 0;
174 return makeGetSupportFunction1<TriangleP, _SupportOptions>(
175 s1, identity, swept_sphere_radius,
data);
178 return makeGetSupportFunction1<Box, _SupportOptions>(
179 s1, identity, swept_sphere_radius,
data);
184 swept_sphere_radius[0] +=
static_cast<const Sphere*
>(s0)->radius;
186 return makeGetSupportFunction1<Sphere, _SupportOptions>(
187 s1, identity, swept_sphere_radius,
data);
190 return makeGetSupportFunction1<Ellipsoid, _SupportOptions>(
191 s1, identity, swept_sphere_radius,
data);
196 swept_sphere_radius[0] +=
static_cast<const Capsule*
>(s0)->radius;
198 return makeGetSupportFunction1<Capsule, _SupportOptions>(
199 s1, identity, swept_sphere_radius,
data);
202 return makeGetSupportFunction1<Cone, _SupportOptions>(
203 s1, identity, swept_sphere_radius,
data);
206 return makeGetSupportFunction1<Cylinder, _SupportOptions>(
207 s1, identity, swept_sphere_radius,
data);
211 if (
static_cast<size_t>(convex0->
num_points) >
214 data[0].last_dir.setZero();
215 return makeGetSupportFunction1<LargeConvex, _SupportOptions>(
216 s1, identity, swept_sphere_radius,
data);
218 return makeGetSupportFunction1<SmallConvex, _SupportOptions>(
219 s1, identity, swept_sphere_radius,
data);
262 bool& normalize_support_direction) {
268 template <
int _SupportOptions>
280 bool identity = (
oR1.isIdentity() &&
ot1.isZero());
286 template void COAL_DLLAPI MinkowskiDiff::set<SupportOptions::NoSweptSphere>(
const ShapeBase*,
const ShapeBase*);
288 template void COAL_DLLAPI MinkowskiDiff::set<SupportOptions::WithSweptSphere>(
const ShapeBase*,
const ShapeBase*);
292 template <
int _SupportOptions>
313 template Vec3s COAL_DLLAPI MinkowskiDiff::support0<SupportOptions::NoSweptSphere>(
const Vec3s&,
int&)
const;
315 template Vec3s COAL_DLLAPI MinkowskiDiff::support0<SupportOptions::WithSweptSphere>(
const Vec3s&,
int&)
const;
317 template Vec3s COAL_DLLAPI MinkowskiDiff::support1<SupportOptions::NoSweptSphere>(
const Vec3s&,
int&)
const;
319 template Vec3s COAL_DLLAPI MinkowskiDiff::support1<SupportOptions::WithSweptSphere>(
const Vec3s&,
int&)
const;