Collision Checker
collision_object_ex.h
Go to the documentation of this file.
1 
2 #pragma once
7 
8 namespace collision {
9 
10 using namespace solvers::solverFCL;
11 using namespace solvers::solverBoost;
12 
13 namespace solvers {
14 namespace solverFCL {
15 class SolverEntity_FCL;
17  void operator()(SolverEntity_FCL *p);
18 };
19 } // namespace solverFCL
20 } // namespace solvers
21 
22 namespace solvers {
23 namespace solverBoost {
24 class SolverEntity_Boost;
26  void operator()(SolverEntity_Boost *p);
27 };
28 } // namespace solverBoost
29 } // namespace solvers
30 
36  public:
38  fcl_solver_entity_valid_ = false;
39  boost_solver_entity_valid_ = false;
40  }
41  virtual ~CollisionObjectEx() {}
42 
43  virtual bool collide(
44  const CollisionObject &c,
45  const collision::CollisionRequest &req = CollisionRequest()) const;
46 
47  virtual bool BVCheck(CollisionObjectConstPtr obj2) const;
48 
49  virtual std::shared_ptr<const collision::RectangleAABB> getAABB() const;
50 
51  virtual int getSolverEntity(solvers::solverFCL::SolverEntity_FCL *&ptr) const;
52  virtual int getSolverEntity(
54 
55  virtual const ICollisionContainer *getContainerInterface(void) const {
56  return nullptr;
57  }
58 
60  void) const {
61  return nullptr;
62  }
63 
65  void) const {
66  return nullptr;
67  }
68 
69  protected:
70  void invalidateCollisionEntityCache(void);
71 
72  private:
73  mutable std::unique_ptr<solvers::solverFCL::SolverEntity_FCL,
75  fcl_entity_;
76  mutable bool fcl_solver_entity_valid_;
77 
78  mutable std::unique_ptr<solvers::solverBoost::SolverEntity_Boost,
80  boost_entity_;
81  mutable bool boost_solver_entity_valid_;
82 };
83 } // namespace collision
AABB getAABB(const CollisionObject *obj)
std::shared_ptr< const CollisionObject > CollisionObjectConstPtr
virtual const solvers::solverFCL::ISolverEntity_FCL * getFclInterface(void) const
virtual const solvers::solverBoost::ISolverEntity_Boost * getBoostInterface(void) const
Universal structure specifying collision request properties.
virtual const ICollisionContainer * getContainerInterface(void) const
Base class for CollisionObjects and some of their groups.
Provides functionality to use different collision solvers.