39 #ifndef HPP_FCL_GEOMETRIC_SHAPES_UTILITY_H 40 #define HPP_FCL_GEOMETRIC_SHAPES_UTILITY_H 56 std::vector<Vec3f> getBoundVertices(
const Box& box,
const Transform3f& tf);
57 std::vector<Vec3f> getBoundVertices(
const Sphere& sphere,
const Transform3f& tf);
58 std::vector<Vec3f> getBoundVertices(
const Capsule& capsule,
const Transform3f& tf);
59 std::vector<Vec3f> getBoundVertices(
const Cone& cone,
const Transform3f& tf);
60 std::vector<Vec3f> getBoundVertices(
const Cylinder& cylinder,
const Transform3f& tf);
61 std::vector<Vec3f> getBoundVertices(
const ConvexBase& convex,
const Transform3f& tf);
62 std::vector<Vec3f> getBoundVertices(
const TriangleP& triangle,
const Transform3f& tf);
68 template<
typename BV,
typename S>
71 std::vector<Vec3f> convex_bound_vertices = details::getBoundVertices(s, tf);
72 fit(&convex_bound_vertices[0], (
int)convex_bound_vertices.size(), bv);
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:69
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:89
Cylinder along Z axis. The cylinder is defined at its centroid.
Definition: geometric_shapes.h:243
Main namespace.
Definition: AABB.h:43
void computeBV< OBB, Sphere >(const Sphere &s, const Transform3f &tf, OBB &bv)
Oriented bounding box class.
Definition: OBB.h:54
Half Space: this is equivalent to the Plane in ODE. The separation plane is defined as n * x = d; Poi...
Definition: geometric_shapes.h:337
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:385
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:55
void computeBV< RSS, Plane >(const Plane &s, const Transform3f &tf, RSS &bv)
Definition: traversal_node_setup.h:775
void computeBV< AABB, Cylinder >(const Cylinder &s, const Transform3f &tf, AABB &bv)
void fit(Vec3f *ps, int n, BV &bv)
Compute a bounding volume that fits a set of n points.
Definition: BV_fitter.h:54
void computeBV< AABB, Sphere >(const Sphere &s, const Transform3f &tf, AABB &bv)
Center at zero point, axis aligned box.
Definition: geometric_shapes.h:86
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:70
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:199
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:55
Center at zero point sphere.
Definition: geometric_shapes.h:122
Capsule It is where is the distance between the point x and the capsule segment AB...
Definition: geometric_shapes.h:154
Base for convex polytope.
Definition: geometric_shapes.h:281
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)