37#ifndef COAL_CONTACT_PATCH_SOLVER_HXX
38#define COAL_CONTACT_PATCH_SOLVER_HXX
77template <
typename ShapeType1,
typename ShapeType2>
129 this->support_set_shape2.size() <= 1) {
135 const Scalar eps = Eigen::NumTraits<Scalar>::dummy_precision();
139 (
this->support_set_shape2.size() == 2)) {
152 (b(0) - a(0)) * (d(1) - c(1)) >= (b(1) - a(1)) * (d(0) - c(0));
154 ((b - a).squaredNorm() <
eps)) {
165 t1 = (
t1 >=
l) ? 1.0 : ((
t1 <= 0) ? 0.0 : (
t1 /
l));
171 t2 = (
t2 >=
l) ? 1.0 : ((
t2 <= 0) ? 0.0 : (
t2 /
l));
173 if ((
p1 -
p2).squaredNorm() >=
eps) {
263 current.emplace_back(
p1);
264 current.emplace_back(
p);
269 current.emplace_back(
p1);
275 current.emplace_back(
p2);
276 current.emplace_back(
p);
281 current.emplace_back(
p2);
290 this->added_to_patch.end(),
313 current.emplace_back(
p1);
323 current.emplace_back(
p1);
327 current.emplace_back(
p);
331 current.emplace_back(
p1);
338 current.emplace_back(
p);
341 current.emplace_back(
p2);
350 if (current.size() <= 1) {
376template <
typename ShapeType1,
typename ShapeType2>
379 const ShapeType2& shape2,
394 tf1c.
rotation().noalias() =
tf1.rotation().transpose() *
tfc.rotation();
395 tf1c.translation().noalias() =
396 tf1.rotation().transpose() * (
tfc.translation() -
tf1.translation());
404 tf2c.
rotation().noalias() =
tf2.rotation().transpose() *
tfc.rotation();
405 tf2c.translation().noalias() =
406 tf2.rotation().transpose() * (
tfc.translation() -
tf2.translation());
417 if (std::abs(
denominator) < std::numeric_limits<Scalar>::epsilon()) {
422 alpha = std::min<Scalar>(1.0, std::max<Scalar>(0.0,
alpha));
Main namespace.
Definition broadphase_bruteforce.h:44
double Scalar
Definition data_types.h:68
Eigen::Matrix< Scalar, 2, 1 > Vec2s
Definition data_types.h:71
void constructContactPatchFrameFromContact(const Contact &contact, ContactPatch &contact_patch)
Construct a frame from a Contact's position and normal. Because both Contact's position and normal ar...
Definition collision_data.h:703
Definition geometric_shapes_traits.h:55
#define COAL_TRACY_ZONE_SCOPED_N(x)
Definition tracy.hh:26