38 #ifndef HPP_FCL_GEOMETRIC_SHAPES_UTILITY_H 39 #define HPP_FCL_GEOMETRIC_SHAPES_UTILITY_H 54 const Transform3f& tf);
55 HPP_FCL_DLLAPI std::vector<Vec3f> getBoundVertices(
const Sphere& sphere,
56 const Transform3f& tf);
57 HPP_FCL_DLLAPI std::vector<Vec3f> getBoundVertices(
const Ellipsoid& ellipsoid,
58 const Transform3f& tf);
59 HPP_FCL_DLLAPI std::vector<Vec3f> getBoundVertices(
const Capsule& capsule,
60 const Transform3f& tf);
61 HPP_FCL_DLLAPI std::vector<Vec3f> getBoundVertices(
const Cone& cone,
62 const Transform3f& tf);
63 HPP_FCL_DLLAPI std::vector<Vec3f> getBoundVertices(
const Cylinder& cylinder,
64 const Transform3f& tf);
65 HPP_FCL_DLLAPI std::vector<Vec3f> getBoundVertices(
const ConvexBase& convex,
66 const Transform3f& tf);
67 HPP_FCL_DLLAPI std::vector<Vec3f> getBoundVertices(
const TriangleP& triangle,
68 const Transform3f& tf);
73 template <
typename BV,
typename S>
75 std::vector<Vec3f> convex_bound_vertices = details::getBoundVertices(s, tf);
76 fit(&convex_bound_vertices[0], (
unsigned int)convex_bound_vertices.size(),
void computeBV< OBB, ConvexBase >(const ConvexBase &s, const Transform3f &tf, OBB &bv)
void computeBV< AABB, Box >(const Box &s, const Transform3f &tf, AABB &bv)
void computeBV< AABB, Plane >(const Plane &s, const Transform3f &tf, AABB &bv)
void computeBV< OBBRSS, Plane >(const Plane &s, const Transform3f &tf, OBBRSS &bv)
void computeBV(const S &s, const Transform3f &tf, BV &bv)
calculate a bounding volume for a shape in a specific configuration
Definition: geometric_shapes_utility.h:74
KDOP class describes the KDOP collision structures. K is set as the template parameter, which should be 16, 18, or 24 The KDOP structure is defined by some pairs of parallel planes defined by some axes. For K = 16, the planes are 6 AABB planes and 10 diagonal planes that cut off some space of the edges: (-1,0,0) and (1,0,0) -> indices 0 and 8 (0,-1,0) and (0,1,0) -> indices 1 and 9 (0,0,-1) and (0,0,1) -> indices 2 and 10 (-1,-1,0) and (1,1,0) -> indices 3 and 11 (-1,0,-1) and (1,0,1) -> indices 4 and 12 (0,-1,-1) and (0,1,1) -> indices 5 and 13 (-1,1,0) and (1,-1,0) -> indices 6 and 14 (-1,0,1) and (1,0,-1) -> indices 7 and 15 For K = 18, the planes are 6 AABB planes and 12 diagonal planes that cut off some space of the edges: (-1,0,0) and (1,0,0) -> indices 0 and 9 (0,-1,0) and (0,1,0) -> indices 1 and 10 (0,0,-1) and (0,0,1) -> indices 2 and 11 (-1,-1,0) and (1,1,0) -> indices 3 and 12 (-1,0,-1) and (1,0,1) -> indices 4 and 13 (0,-1,-1) and (0,1,1) -> indices 5 and 14 (-1,1,0) and (1,-1,0) -> indices 6 and 15 (-1,0,1) and (1,0,-1) -> indices 7 and 16 (0,-1,1) and (0,1,-1) -> indices 8 and 17 For K = 18, the planes are 6 AABB planes and 18 diagonal planes that cut off some space of the edges: (-1,0,0) and (1,0,0) -> indices 0 and 12 (0,-1,0) and (0,1,0) -> indices 1 and 13 (0,0,-1) and (0,0,1) -> indices 2 and 14 (-1,-1,0) and (1,1,0) -> indices 3 and 15 (-1,0,-1) and (1,0,1) -> indices 4 and 16 (0,-1,-1) and (0,1,1) -> indices 5 and 17 (-1,1,0) and (1,-1,0) -> indices 6 and 18 (-1,0,1) and (1,0,-1) -> indices 7 and 19 (0,-1,1) and (0,1,-1) -> indices 8 and 20 (-1, -1, 1) and (1, 1, -1) –> indices 9 and 21 (-1, 1, -1) and (1, -1, 1) –> indices 10 and 22 (1, -1, -1) and (-1, 1, 1) –> indices 11 and 23.
Definition: kDOP.h:92
Ellipsoid centered at point zero.
Definition: geometric_shapes.h:258
Cylinder along Z axis. The cylinder is defined at its centroid.
Definition: geometric_shapes.h:501
Main namespace.
Definition: broadphase_bruteforce.h:44
void computeBV< AABB, Ellipsoid >(const Ellipsoid &e, const Transform3f &tf, AABB &bv)
void computeBV< OBB, Sphere >(const Sphere &s, const Transform3f &tf, OBB &bv)
Half Space: this is equivalent to the Plane in ODE. The separation plane is defined as n * x = d; Poi...
Definition: geometric_shapes.h:729
void computeBV< OBB, Capsule >(const Capsule &s, const Transform3f &tf, OBB &bv)
void computeBV< OBB, Cylinder >(const Cylinder &s, const Transform3f &tf, OBB &bv)
void computeBV< OBB, Cone >(const Cone &s, const Transform3f &tf, OBB &bv)
void computeBV< OBB, Halfspace >(const Halfspace &s, const Transform3f &tf, OBB &bv)
void computeBV< OBB, Plane >(const Plane &s, const Transform3f &tf, OBB &bv)
Infinite plane.
Definition: geometric_shapes.h:810
void computeBV< AABB, TriangleP >(const TriangleP &s, const Transform3f &tf, AABB &bv)
A class describing the kIOS collision structure, which is a set of spheres.
Definition: kIOS.h:53
void computeBV< RSS, Plane >(const Plane &s, const Transform3f &tf, RSS &bv)
void fit(Vec3f *ps, unsigned int n, BV &bv)
Compute a bounding volume that fits a set of n points.
Definition: BV_fitter.h:52
Definition: traversal_node_setup.h:792
void computeBV< AABB, Cylinder >(const Cylinder &s, const Transform3f &tf, AABB &bv)
void computeBV< AABB, Sphere >(const Sphere &s, const Transform3f &tf, AABB &bv)
Center at zero point, axis aligned box.
Definition: geometric_shapes.h:125
void computeBV< kIOS, Halfspace >(const Halfspace &s, const Transform3f &tf, kIOS &bv)
void computeBV< kIOS, Plane >(const Plane &s, const Transform3f &tf, kIOS &bv)
void computeBV< AABB, Halfspace >(const Halfspace &s, const Transform3f &tf, AABB &bv)
Triangle stores the points instead of only indices of points.
Definition: geometric_shapes.h:71
void computeBV< OBB, Box >(const Box &s, const Transform3f &tf, OBB &bv)
Cone The base of the cone is at and the top is at .
Definition: geometric_shapes.h:414
void computeBV< AABB, Cone >(const Cone &s, const Transform3f &tf, AABB &bv)
A class describing the AABB collision structure, which is a box in 3D space determined by two diagona...
Definition: AABB.h:54
Center at zero point sphere.
Definition: geometric_shapes.h:196
Capsule It is where is the distance between the point x and the capsule segment AB...
Definition: geometric_shapes.h:333
Base for convex polytope.
Definition: geometric_shapes.h:581
void computeBV< RSS, Halfspace >(const Halfspace &s, const Transform3f &tf, RSS &bv)
void computeBV< OBBRSS, Halfspace >(const Halfspace &s, const Transform3f &tf, OBBRSS &bv)
void computeBV< AABB, ConvexBase >(const ConvexBase &s, const Transform3f &tf, AABB &bv)
void constructBox(const AABB &bv, Box &box, Transform3f &tf)
construct a box shape (with a configuration) from a given bounding volume
Halfspace transform(const Halfspace &a, const Transform3f &tf)
void computeBV< AABB, Capsule >(const Capsule &s, const Transform3f &tf, AABB &bv)
#define HPP_FCL_DLLAPI
Definition: config.hh:64
Oriented bounding box class.
Definition: OBB.h:52