39#ifndef COAL_SUPPORT_FUNCTIONS_H 40#define COAL_SUPPORT_FUNCTIONS_H 76template <
int _SupportOptions = SupportOptions::NoSweptSphere>
94template <
int _SupportOptions = SupportOptions::NoSweptSphere>
96 Vec3s& support,
int& ,
100template <
int _SupportOptions = SupportOptions::NoSweptSphere>
105template <
int _SupportOptions = SupportOptions::NoSweptSphere>
110template <
int _SupportOptions = SupportOptions::NoSweptSphere>
112 Vec3s& support,
int& ,
116template <
int _SupportOptions = SupportOptions::NoSweptSphere>
121template <
int _SupportOptions = SupportOptions::NoSweptSphere>
126template <
int _SupportOptions = SupportOptions::NoSweptSphere>
133template <
int _SupportOptions = SupportOptions::NoSweptSphere>
147template <
int _SupportOptions = SupportOptions::NoSweptSphere>
152template <
int _SupportOptions = SupportOptions::NoSweptSphere>
194template <
int _SupportOptions = SupportOptions::NoSweptSphere>
196 size_t num_sampled_supports = 6,
CoalScalar tol = 1e-3);
205template <
int _SupportOptions = SupportOptions::NoSweptSphere>
208 size_t num_sampled_supports = 6,
CoalScalar tol = 1e-3) {
218template <
int _SupportOptions = SupportOptions::NoSweptSphere>
221 size_t num_sampled_supports = 6,
226template <
int _SupportOptions = SupportOptions::NoSweptSphere>
229 size_t num_sampled_supports = 6,
234template <
int _SupportOptions = SupportOptions::NoSweptSphere>
237 size_t num_sampled_supports = 6,
242template <
int _SupportOptions = SupportOptions::NoSweptSphere>
245 size_t num_sampled_supports = 6,
250template <
int _SupportOptions = SupportOptions::NoSweptSphere>
253 size_t num_sampled_supports = 6,
258template <
int _SupportOptions = SupportOptions::NoSweptSphere>
261 size_t num_sampled_supports = 6,
CoalScalar tol = 1e-3);
265template <
int _SupportOptions = SupportOptions::NoSweptSphere>
268 size_t num_sampled_supports = 6,
CoalScalar tol = 1e-3);
274template <
int _SupportOptions = SupportOptions::NoSweptSphere>
277 size_t num_sampled_supports = 6,
282template <
int _SupportOptions = SupportOptions::NoSweptSphere>
285 size_t num_sampled_supports = 6,
290template <
int _SupportOptions = SupportOptions::NoSweptSphere>
293 size_t num_sampled_supports = 6,
Center at zero point, axis aligned box.
Definition geometric_shapes.h:166
Capsule It is where is the distance between the point x and the capsule segment AB,...
Definition geometric_shapes.h:383
Cone The base of the cone is at and the top is at .
Definition geometric_shapes.h:467
Base for convex polytope.
Definition geometric_shapes.h:645
Cylinder along Z axis. The cylinder is defined at its centroid.
Definition geometric_shapes.h:560
Ellipsoid centered at point zero.
Definition geometric_shapes.h:305
Base class for all basic geometric shapes.
Definition geometric_shapes.h:58
Center at zero point sphere.
Definition geometric_shapes.h:240
Triangle stores the points instead of only indices of points.
Definition geometric_shapes.h:110
ShapeBase()
Definition geometric_shapes.h:60
void getSupportSet(const ShapeBase *shape, SupportSet &support_set, int &hint, size_t num_sampled_supports=6, CoalScalar tol=1e-3)
Computes the support set for shape. This function assumes the frame of the support set has already be...
SupportOptions
Options for the computation of support points. NoSweptSphere option is used when the support function...
Definition support_functions.h:58
@ WithSweptSphere
Definition support_functions.h:60
@ NoSweptSphere
Definition support_functions.h:59
void getShapeSupport(const TriangleP *triangle, const Vec3s &dir, Vec3s &support, int &, ShapeSupportData &)
Triangle support function.
Vec3s getSupport(const ShapeBase *shape, const Vec3s &dir, int &hint)
the support function for shape. The output support point is expressed in the local frame of the shape...
void computeSupportSetConvexHull(SupportSet::Polygon &cloud, SupportSet::Polygon &cvx_hull)
Computes the convex-hull of support_set. For now, this function is only needed for Box and ConvexBase...
void getShapeSupportSet(const TriangleP *triangle, SupportSet &support_set, int &, ShapeSupportData &, size_t num_sampled_supports=6, CoalScalar tol=1e-3)
Triangle support set function. Assumes the support set frame has already been computed.
Main namespace.
Definition broadphase_bruteforce.h:44
Matrix3s constructOrthonormalBasisFromVector(const Vec3s &vec)
Construct othonormal basis from vector. The z-axis is the normalized input vector.
Definition transform.h:262
ContactPatch SupportSet
Structure used for internal computations. A support set and a contact patch can be represented by the...
Definition collision_data.h:721
Eigen::Matrix< CoalScalar, 3, 1 > Vec3s
Definition data_types.h:77
double CoalScalar
Definition data_types.h:76
Cast a ConvexBase to a LargeConvex to use the log version of getShapeSupport. This is much faster tha...
Definition support_functions.h:142
Stores temporary data for the computation of support points.
Definition support_functions.h:80
SupportSet::Polygon polygon
Definition support_functions.h:90
std::vector< int8_t > visited
Definition support_functions.h:82
Vec3s last_dir
Definition support_functions.h:86
See LargeConvex.
Definition support_functions.h:144