39 #ifndef COAL_SUPPORT_FUNCTIONS_H
40 #define COAL_SUPPORT_FUNCTIONS_H
76 template <
int _SupportOptions = SupportOptions::NoSweptSphere>
94 template <
int _SupportOptions = SupportOptions::NoSweptSphere>
96 Vec3s& support,
int& ,
100 template <
int _SupportOptions = SupportOptions::NoSweptSphere>
105 template <
int _SupportOptions = SupportOptions::NoSweptSphere>
110 template <
int _SupportOptions = SupportOptions::NoSweptSphere>
112 Vec3s& support,
int& ,
116 template <
int _SupportOptions = SupportOptions::NoSweptSphere>
121 template <
int _SupportOptions = SupportOptions::NoSweptSphere>
126 template <
int _SupportOptions = SupportOptions::NoSweptSphere>
133 template <
int _SupportOptions = SupportOptions::NoSweptSphere>
147 template <
int _SupportOptions = SupportOptions::NoSweptSphere>
152 template <
int _SupportOptions = SupportOptions::NoSweptSphere>
194 template <
int _SupportOptions = SupportOptions::NoSweptSphere>
196 size_t num_sampled_supports = 6,
CoalScalar tol = 1e-3);
205 template <
int _SupportOptions = SupportOptions::NoSweptSphere>
208 size_t num_sampled_supports = 6,
CoalScalar tol = 1e-3) {
211 const Vec3s support = getSupport<_SupportOptions>(shape, support_dir, hint);
212 getSupportSet<_SupportOptions>(shape, support_set, hint, num_sampled_supports,
218 template <
int _SupportOptions = SupportOptions::NoSweptSphere>
221 size_t num_sampled_supports = 6,
226 template <
int _SupportOptions = SupportOptions::NoSweptSphere>
229 size_t num_sampled_supports = 6,
234 template <
int _SupportOptions = SupportOptions::NoSweptSphere>
237 size_t num_sampled_supports = 6,
242 template <
int _SupportOptions = SupportOptions::NoSweptSphere>
245 size_t num_sampled_supports = 6,
250 template <
int _SupportOptions = SupportOptions::NoSweptSphere>
253 size_t num_sampled_supports = 6,
258 template <
int _SupportOptions = SupportOptions::NoSweptSphere>
261 size_t num_sampled_supports = 6,
CoalScalar tol = 1e-3);
265 template <
int _SupportOptions = SupportOptions::NoSweptSphere>
268 size_t num_sampled_supports = 6,
CoalScalar tol = 1e-3);
274 template <
int _SupportOptions = SupportOptions::NoSweptSphere>
277 size_t num_sampled_supports = 6,
282 template <
int _SupportOptions = SupportOptions::NoSweptSphere>
285 size_t num_sampled_supports = 6,
290 template <
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
#define COAL_DLLAPI
Definition: config.hh:88
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
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
See LargeConvex.
Definition: support_functions.h:144