39 #ifndef COAL_SUPPORT_FUNCTIONS_H
40 #define COAL_SUPPORT_FUNCTIONS_H
63 template <
int _SupportOptions = SupportOptions::NoSweptSphere>
67 template <
int _SupportOptions = SupportOptions::NoSweptSphere>
69 Vec3s& support,
int& ,
73 template <
int _SupportOptions = SupportOptions::NoSweptSphere>
78 template <
int _SupportOptions = SupportOptions::NoSweptSphere>
83 template <
int _SupportOptions = SupportOptions::NoSweptSphere>
85 Vec3s& support,
int& ,
89 template <
int _SupportOptions = SupportOptions::NoSweptSphere>
94 template <
int _SupportOptions = SupportOptions::NoSweptSphere>
99 template <
int _SupportOptions = SupportOptions::NoSweptSphere>
116 template <
typename IndexType>
122 template <
typename IndexType>
177 template <
int _SupportOptions = SupportOptions::NoSweptSphere>
179 size_t num_sampled_supports = 6,
Scalar tol =
Scalar(1e-3));
188 template <
int _SupportOptions = SupportOptions::NoSweptSphere>
191 size_t num_sampled_supports = 6,
Scalar tol =
Scalar(1e-3)) {
194 const Vec3s support = getSupport<_SupportOptions>(shape, support_dir, hint);
195 getSupportSet<_SupportOptions>(shape, support_set, hint, num_sampled_supports,
201 template <
int _SupportOptions = SupportOptions::NoSweptSphere>
204 size_t num_sampled_supports = 6,
209 template <
int _SupportOptions = SupportOptions::NoSweptSphere>
212 size_t num_sampled_supports = 6,
217 template <
int _SupportOptions = SupportOptions::NoSweptSphere>
220 size_t num_sampled_supports = 6,
225 template <
int _SupportOptions = SupportOptions::NoSweptSphere>
228 size_t num_sampled_supports = 6,
233 template <
int _SupportOptions = SupportOptions::NoSweptSphere>
236 size_t num_sampled_supports = 6,
241 template <
int _SupportOptions = SupportOptions::NoSweptSphere>
244 size_t num_sampled_supports = 6,
249 template <
int _SupportOptions = SupportOptions::NoSweptSphere>
252 size_t num_sampled_supports = 6,
264 size_t num_sampled_supports = 6,
274 size_t num_sampled_supports = 6,
284 size_t num_sampled_supports = 6,
Center at zero point, axis aligned box.
Definition: geometric_shapes.h:164
Capsule It is where is the distance between the point x and the capsule segment AB,...
Definition: geometric_shapes.h:381
Cone The base of the cone is at and the top is at .
Definition: geometric_shapes.h:466
Cylinder along Z axis. The cylinder is defined at its centroid.
Definition: geometric_shapes.h:556
Ellipsoid centered at point zero.
Definition: geometric_shapes.h:303
Base class for all basic geometric shapes.
Definition: geometric_shapes.h:58
Center at zero point sphere.
Definition: geometric_shapes.h:238
Triangle stores the points instead of only indices of points.
Definition: geometric_shapes.h:108
#define COAL_DLLAPI
Definition: config.hh:88
SmallConvex< Triangle16::IndexType > SmallConvex16
Definition: support_functions.h:124
@ NoSweptSphere
Definition: support_data.h:57
void getShapeSupportSet(const TriangleP *triangle, SupportSet &support_set, int &, ShapeSupportData &, size_t num_sampled_supports=6, Scalar tol=Scalar(1e-3))
Triangle support set function. Assumes the support set frame has already been computed.
LargeConvex< Triangle16::IndexType > LargeConvex16
Definition: support_functions.h:118
void getShapeSupport(const TriangleP *triangle, const Vec3s &dir, Vec3s &support, int &, ShapeSupportData &)
Triangle support function.
SmallConvex< Triangle32::IndexType > SmallConvex32
Definition: support_functions.h:125
LargeConvex< Triangle32::IndexType > LargeConvex32
Definition: support_functions.h:119
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 getSupportSet(const ShapeBase *shape, SupportSet &support_set, int &hint, size_t num_sampled_supports=6, Scalar tol=Scalar(1e-3))
Computes the support set for shape. This function assumes the frame of the support set has already be...
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...
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:261
Eigen::Matrix< Scalar, 3, 1 > Vec3s
Definition: data_types.h:70
double Scalar
Definition: data_types.h:68
Cast a ConvexBase to a LargeConvex to use the log version of getShapeSupport. This is much faster tha...
Definition: support_functions.h:117
Stores temporary data for the computation of support points.
Definition: support_data.h:62
See LargeConvex.
Definition: support_functions.h:123