]> rtime.felk.cvut.cz Git - hubacji1/rrts.git/blob - api/rrtext.h
561b6a193c4b48e01a91c02897abe3a74288ede0
[hubacji1/rrts.git] / api / rrtext.h
1 #ifndef RRTEXT_H
2 #define RRTEXT_H
3
4 #include "rrts.h"
5 #include "SOLID/solid.h"
6
7 /*! \brief Collision with SOLID.
8
9 Use SOLID library for collision detection.
10
11 \see http://solid.sourceforge.net/
12
13 \param sr_bc Shape reference of bicycle car.
14 \param bc Bicycle car used for collision computations.
15 \param sr_obstacles Obstacles shape references.
16 */
17 class RRTExt2 : public RRTS {
18         private:
19                 BicycleCar bc_;
20                 DtShapeRef sr_bc_;
21                 Obstacle static_obstacle_;
22                 DtShapeRef sr_static_obstacles_;
23         public:
24                 /*! \brief Initialize SOLID based extension.
25                 */
26                 void init_solid();
27                 /*! \brief Deinitialize SOLID based extension.
28                 */
29                 void deinit_solid();
30
31                 // getters, setters
32                 BicycleCar &bc() { return this->bc_; }
33                 DtShapeRef &sr_bc() { return this->sr_bc_; }
34                 Obstacle &static_obstacle() { return this->static_obstacle_; }
35                 DtShapeRef &sr_static_obstacles()
36                 {
37                         return this->sr_static_obstacles_;
38                 }
39 };
40
41 /*! \brief Different costs extension.
42
43 Use different cost for bulding tree data structure and searching in the
44 structure.
45 */
46 class RRTExt1 : public RRTS {
47         public:
48                 /*! \brief Reeds and Shepp path length.
49                 */
50                 double cost_build(RRTNode &f, RRTNode &t);
51                 /*! \brief Matej's heuristics.
52                 */
53                 double cost_search(RRTNode &f, RRTNode &t);
54 };
55
56 #endif /* RRTEXT_H */