Choreonoid  1.8
AISTCollisionDetector.h
Go to the documentation of this file.
1 
6 #ifndef CNOID_AIST_COLLISION_DETECTOR_AIST_COLLISION_DETECTOR_H
7 #define CNOID_AIST_COLLISION_DETECTOR_AIST_COLLISION_DETECTOR_H
8 
9 #include <cnoid/CollisionDetector>
10 #include "exportdecl.h"
11 
12 namespace cnoid {
13 
14 class AISTCollisionDetectorImpl;
15 
17 {
18 public:
20  virtual ~AISTCollisionDetector();
21  virtual const char* name() const override;
22  virtual CollisionDetector* clone() const override;
23  virtual void clearGeometries() override;
24  virtual int numGeometries() const override;
25  virtual stdx::optional<GeometryHandle> addGeometry(SgNode* geometry) override;
26  virtual void setCustomObject(GeometryHandle geometry, Referenced* object) override;
27  virtual void setGeometryStatic(GeometryHandle geometry, bool isStatic = true) override;
28  virtual void ignoreGeometryPair(GeometryHandle geometry1, GeometryHandle geometry2, bool ignore = true) override;
29  virtual bool makeReady() override;
30  virtual void updatePosition(GeometryHandle geometry, const Isometry3& position) override;
31  virtual void updatePositions(std::function<void(Referenced* object, Isometry3*& out_Position)> positionQuery) override;
32  virtual void detectCollisions(std::function<void(const CollisionPair& collisionPair)> callback) override;
33 
34  // CollisionDetectorDistanceAPI
35  virtual double detectDistance(GeometryHandle geometry1, GeometryHandle geometry2, Vector3& out_point1, Vector3& out_point2) override;
36 
37  // experimental
38  void setNumThreads(int n);
39 
40 private:
41  AISTCollisionDetectorImpl* impl;
42 };
43 
45 
46 }
47 
48 #endif
cnoid::Vector3
Eigen::Vector3d Vector3
Definition: EigenTypes.h:57
cnoid::Isometry3
Eigen::Isometry3d Isometry3
Definition: EigenTypes.h:73
cnoid::AISTCollisionDetector
Definition: AISTCollisionDetector.h:16
cnoid::ref_ptr
Definition: Referenced.h:103
cnoid::CollisionDetectorDistanceAPI
Definition: CollisionDetector.h:63
cnoid
Definition: AbstractSceneLoader.h:11
cnoid::AISTCollisionDetectorPtr
ref_ptr< AISTCollisionDetector > AISTCollisionDetectorPtr
Definition: AISTCollisionDetector.h:44
cnoid::CollisionDetector
Definition: CollisionDetector.h:20
cnoid::CollisionPair
Definition: CollisionDetector.h:72
cnoid::Referenced
Definition: Referenced.h:54
cnoid::CollisionDetector::GeometryHandle
intptr_t GeometryHandle
Definition: CollisionDetector.h:23
cnoid::SgNode
Definition: SceneGraph.h:157