hpp-fcl
1.4.4
HPP fork of FCL -- The Flexible Collision Library
|
Go to the documentation of this file.
39 #ifndef HPP_FCL_GEOMETRIC_SHAPES_H
40 #define HPP_FCL_GEOMETRIC_SHAPES_H
42 #include <boost/math/constants/constants.hpp>
117 return (
Vec3f (s[1] + s[2], s[0] + s[2], s[0] + s[1]) / 3).asDiagonal();
141 return I * Matrix3f::Identity();
191 0, 0, iz).finished();
232 0, 0, iz).finished();
275 0, 0, iz).finished();
329 void computeCenter();
332 template <
typename PolygonT>
class Convex;
363 return std::abs(
n.dot(p) -
d);
410 return std::abs(
n.dot(p) -
d);
FCL_REAL radius
Radius of the cylinder.
Definition: geometric_shapes.h:252
TriangleP(const Vec3f &a_, const Vec3f &b_, const Vec3f &c_)
Definition: geometric_shapes.h:73
@ GEOM_HALFSPACE
Definition: collision_object.h:57
void computeLocalAABB()
Compute AABB.
NODE_TYPE getNodeType() const
Get node type: a capsule.
Definition: geometric_shapes.h:172
Eigen::Matrix< FCL_REAL, 3, 1 > Vec3f
Definition: data_types.h:73
Matrix3f computeMomentofInertia() const
compute the inertia matrix, related to the origin
Definition: geometric_shapes.h:113
Neighbors * neighbors
Definition: geometric_shapes.h:309
Vec3f * points
An array of the points of the polygon.
Definition: geometric_shapes.h:294
void computeLocalAABB()
Compute AABB.
@ GEOM_BOX
Definition: collision_object.h:57
NODE_TYPE getNodeType() const
Get node type: a conex polytope.
Definition: geometric_shapes.h:291
Halfspace()
Definition: geometric_shapes.h:352
@ GEOM_PLANE
Definition: collision_object.h:57
Cone(FCL_REAL radius_, FCL_REAL lz_)
Definition: geometric_shapes.h:202
FCL_REAL signedDistance(const Vec3f &p) const
Definition: geometric_shapes.h:403
Vec3f c
Definition: geometric_shapes.h:82
FCL_REAL computeVolume() const
compute the volume
Definition: geometric_shapes.h:219
FCL_REAL signedDistance(const Vec3f &p) const
Definition: geometric_shapes.h:356
Center at zero point sphere.
Definition: geometric_shapes.h:122
FCL_REAL radius
Radius of capsule.
Definition: geometric_shapes.h:163
ShapeBase()
Definition: geometric_shapes.h:57
NODE_TYPE getNodeType() const
Get node type: a half space.
Definition: geometric_shapes.h:370
bool own_storage_
Definition: geometric_shapes.h:326
unsigned int * nneighbors_
Definition: geometric_shapes.h:324
Box(FCL_REAL x, FCL_REAL y, FCL_REAL z)
Definition: geometric_shapes.h:89
void unitNormalTest()
Turn non-unit normal into unit.
@ GEOM_CONVEX
Definition: collision_object.h:57
NODE_TYPE getNodeType() const
Get node type: a cylinder.
Definition: geometric_shapes.h:261
virtual ~ShapeBase()
Definition: geometric_shapes.h:59
The geometry for the object for collision or distance computation.
Definition: collision_object.h:63
Vec3f halfSide
box side half-length
Definition: geometric_shapes.h:100
NODE_TYPE
traversal node type: bounding volume (AABB, OBB, RSS, kIOS, OBBRSS, KDOP16, KDOP18,...
Definition: collision_object.h:56
Cylinder along Z axis. The cylinder is defined at its centroid.
Definition: geometric_shapes.h:243
FCL_REAL halfLength
Half Length along z axis.
Definition: geometric_shapes.h:166
FCL_REAL distance(const Vec3f &p) const
Definition: geometric_shapes.h:361
unsigned char const & count() const
Definition: geometric_shapes.h:302
Vec3f b
Definition: geometric_shapes.h:82
Cylinder(FCL_REAL radius_, FCL_REAL lz_)
Definition: geometric_shapes.h:246
void unitNormalTest()
Turn non-unit normal into unit.
FCL_REAL halfLength
Half Length along z axis.
Definition: geometric_shapes.h:255
Convex polytope.
Definition: convex.h:53
Capsule(FCL_REAL radius_, FCL_REAL lz_)
Definition: geometric_shapes.h:157
Plane(FCL_REAL a, FCL_REAL b, FCL_REAL c, FCL_REAL d_)
Construct a plane with normal direction and offset.
Definition: geometric_shapes.h:395
@ OT_GEOM
Definition: collision_object.h:53
FCL_REAL computeVolume() const
compute the volume
Definition: geometric_shapes.h:108
double FCL_REAL
Definition: data_types.h:68
FCL_REAL radius
Radius of the sphere.
Definition: geometric_shapes.h:130
void computeLocalAABB()
virtual function of compute AABB in local coordinate
OBJECT_TYPE
object type: BVH (mesh, points), basic geometry, octree
Definition: collision_object.h:53
Matrix3f computeMomentofInertia() const
compute the inertia matrix, related to the origin
Definition: geometric_shapes.h:268
FCL_REAL computeVolume() const
compute the volume
Definition: geometric_shapes.h:144
void computeLocalAABB()
Compute AABB.
Matrix3f computeMomentofInertia() const
compute the inertia matrix, related to the origin
Definition: geometric_shapes.h:138
Matrix3f computeMomentofInertia() const
compute the inertia matrix, related to the origin
Definition: geometric_shapes.h:179
FCL_REAL computeVolume() const
compute the volume
Definition: geometric_shapes.h:174
NODE_TYPE getNodeType() const
Get node type: a box.
Definition: geometric_shapes.h:106
void computeLocalAABB()
Compute AABB.
Vec3f computeCOM() const
compute center of mass
Definition: geometric_shapes.h:235
void computeLocalAABB()
Compute AABB.
@ GEOM_SPHERE
Definition: collision_object.h:57
Main namespace.
Definition: AABB.h:43
Plane()
Definition: geometric_shapes.h:400
NODE_TYPE getNodeType() const
Get node type: a cone.
Definition: geometric_shapes.h:217
unsigned char count_
Definition: geometric_shapes.h:299
void computeLocalAABB()
Compute AABB.
NODE_TYPE getNodeType() const
Get node type: a plane.
Definition: geometric_shapes.h:417
Cone The base of the cone is at and the top is at .
Definition: geometric_shapes.h:199
Capsule It is where is the distance between the point x and the capsule segment AB,...
Definition: geometric_shapes.h:154
FCL_REAL radius
Radius of the cone.
Definition: geometric_shapes.h:208
Vec3f a
Definition: geometric_shapes.h:82
Eigen::Matrix< FCL_REAL, 3, 3 > Matrix3f
Definition: data_types.h:74
FCL_REAL d
Plane offset.
Definition: geometric_shapes.h:423
ConvexBase(bool ownStorage, Vec3f *points_, int num_points_)
Constructing a convex, providing normal and offset of each polytype surface, and the points and shape...
NODE_TYPE getNodeType() const
get the node type
Definition: geometric_shapes.h:80
Plane(const Vec3f &n_, FCL_REAL d_)
Construct a plane with normal direction and offset.
Definition: geometric_shapes.h:389
Base for convex polytope.
Definition: geometric_shapes.h:281
Vec3f center
center of the convex polytope, this is used for collision: center is guaranteed in the internal of th...
Definition: geometric_shapes.h:312
Box(const Vec3f &side_)
Definition: geometric_shapes.h:93
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
Matrix3f computeMomentofInertia() const
compute the inertia matrix, related to the origin
Definition: geometric_shapes.h:224
Halfspace(const Vec3f &n_, FCL_REAL d_)
Construct a half space with normal direction and offset.
Definition: geometric_shapes.h:341
NODE_TYPE getNodeType() const
Get node type: a sphere.
Definition: geometric_shapes.h:136
@ GEOM_CYLINDER
Definition: collision_object.h:57
unsigned int & operator[](int i)
Definition: geometric_shapes.h:303
Sphere(FCL_REAL radius_)
Definition: geometric_shapes.h:125
@ GEOM_CONE
Definition: collision_object.h:57
OBJECT_TYPE getObjectType() const
Get object type: a geometric shape.
Definition: geometric_shapes.h:62
Box()
Definition: geometric_shapes.h:97
Triangle stores the points instead of only indices of points.
Definition: geometric_shapes.h:70
FCL_REAL halfLength
Half Length along z axis.
Definition: geometric_shapes.h:211
FCL_REAL distance(const Vec3f &p) const
Definition: geometric_shapes.h:408
Halfspace(FCL_REAL a, FCL_REAL b, FCL_REAL c, FCL_REAL d_)
Construct a plane with normal direction and offset.
Definition: geometric_shapes.h:347
Vec3f n
Plane normal.
Definition: geometric_shapes.h:420
unsigned int * n_
Definition: geometric_shapes.h:300
int num_points
Definition: geometric_shapes.h:295
Base class for all basic geometric shapes.
Definition: geometric_shapes.h:54
void computeLocalAABB()
Compute AABB.
@ GEOM_CAPSULE
Definition: collision_object.h:57
void computeLocalAABB()
Compute AABB.
FCL_REAL d
Plane offset.
Definition: geometric_shapes.h:376
Definition: geometric_shapes.h:297
FCL_REAL computeVolume() const
compute the volume
Definition: geometric_shapes.h:263
@ GEOM_TRIANGLE
Definition: collision_object.h:57
Vec3f n
Plane normal.
Definition: geometric_shapes.h:373
Center at zero point, axis aligned box.
Definition: geometric_shapes.h:86
Infinite plane.
Definition: geometric_shapes.h:385