Collision Checker
point.h
Go to the documentation of this file.
1 #ifndef POINT_H_
2 #define POINT_H_
3 
4 #include <Eigen/Dense>
5 #include <iostream>
6 
7 #include <vector>
8 
10 
11 namespace collision {
12 
13 #define COLLISION_FCL_POINT_EPS 0.000001
14 
18 class Point : public Shape {
19  public:
20  Point(const Eigen::Vector2d &_center = Eigen::Vector2d(0, 0))
21  : Shape(_center) {}
22 
23  ~Point() {}
24 
25  Point(const Point &copy);
26  Point *clone() const;
27 
28  void print(std::ostringstream &stream) const;
29 
30  virtual CollisionObjectType getCollisionObjectType() const override {
32  }
33 
35  void) const override;
37  const std::shared_ptr<fcl::CollisionGeometry<FCL_PRECISION>> &)
38  const override;
39 
40  ShapeType type() const;
41 
42 #if ENABLE_SERIALIZER
43  serialize::ICollisionObjectExport *exportThis(void) const override;
44 #endif
45 
46  private:
47  using Shape::center_;
48  using Shape::radius_;
49 
50  static constexpr ShapeType type_ = TYPE_POINT;
51 };
52 
53 } // namespace collision
54 
55 #endif
double radius_
Definition: shape.h:73
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
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
virtual CollisionObjectType getCollisionObjectType() const override
Definition: point.h:30
A point in space.
Definition: point.h:18
Eigen::Vector2d center_
Definition: shape.h:72
fcl::CollisionObject< FCL_PRECISION > * createFCLCollisionObject(const std::shared_ptr< fcl::CollisionGeometry< FCL_PRECISION >> &) const override
Definition: point.cc:13