Collision Checker
point.cc
Go to the documentation of this file.
2 #include <fcl/narrowphase/collision.h>
3 #include <fcl/narrowphase/collision_object.h>
6 
7 namespace collision {
8 
10  void) const {
11  return new fcl::Sphere<FCL_PRECISION>(COLLISION_FCL_POINT_EPS);
12 }
14  const std::shared_ptr<fcl::CollisionGeometry<FCL_PRECISION>> &col_geom)
15  const {
17  col_geom,
19 }
20 
21 Point *Point::clone() const { return new Point(*this); }
22 
23 Point::Point(const Point &copy) : Shape(copy) {}
24 
25 void Point::print(std::ostringstream &stream) const {
26  stream << "Point: center: (" << center_x() << "/" << center_y() << ")"
27  << std::endl;
28 }
29 
30 ShapeType Point::type() const { return type_; }
31 
32 #if ENABLE_SERIALIZER
33 
34 namespace serialize {
35 ICollisionObjectExport *exportObject(const collision::Point &);
36 }
37 
38 serialize::ICollisionObjectExport *Point::exportThis(void) const {
39  return serialize::exportObject(*this);
40 }
41 #endif
42 
43 } // namespace collision
#define COLLISION_FCL_POINT_EPS
Definition: point.h:13
ShapeType type() const
Get shape type.
Definition: point.cc:30
void print(std::ostringstream &stream) const
Print all parameters of the shape.
Definition: point.cc:25
static fcl::Transform3< FCL_PRECISION > fcl_get_3d_translation(const Eigen::Vector2d &pos)
Definition: fcl_transform.h:21
fcl::CollisionGeometry< FCL_PRECISION > * createFCLCollisionGeometry(void) const override
Definition: point.cc:9
Point(const Eigen::Vector2d &_center=Eigen::Vector2d(0, 0))
Definition: point.h:20
Point * clone() const
Definition: point.cc:21
ShapeType
Definition: shape.h:13
Base prototype for the shape of an obstacle.
Definition: shape.h:25
int serialize(const test::BroadphaseFailureCCObj &bf_object, std::ostream &output_stream, const char *format=SERIALIZER_DEFAULT_FORMAT)
double center_x() const
Definition: shape.cc:18
double center_y() const
Definition: shape.cc:20
A point in space.
Definition: point.h:18
fcl::CollisionObject< FCL_PRECISION > * createFCLCollisionObject(const std::shared_ptr< fcl::CollisionGeometry< FCL_PRECISION >> &) const override
Definition: point.cc:13
Eigen::Vector2d center() const
Get geometric center of shape.
Definition: shape.cc:16