cheshirekow  v0.1.0
hyper_rect.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2012 Josh Bialkowski (jbialk@mit.edu)
3  *
4  * This file is part of mpblocks.
5  *
6  * mpblocks is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation, either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * mpblocks is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with mpblocks. If not, see <http://www.gnu.org/licenses/>.
18  */
27 #ifndef MPBLOCKS_DUBINS_CURVES_EIGEN_HYPER_H_
28 #define MPBLOCKS_DUBINS_CURVES_EIGEN_HYPER_H_
29 
30 namespace mpblocks {
31 namespace dubins {
32 namespace curves_eigen {
33 namespace hyper {
34 
36 {
37  OFF,
38  MIN,
39  MAX,
40 };
41 
43 template <typename Format_t>
44 struct HyperRect {
45  typedef Eigen::Matrix<Format_t, 3, 1> Vector3d;
46 
49 
52  bool contains(const Vector3d& q) const {
53  for (int i = 0; i < 3; i++) {
54  if (q[i] > maxExt[i] || q[i] < minExt[i]) return false;
55  }
56 
57  return true;
58  }
59 };
60 
61 } // namespace hyper
62 } // namespace curves_eigen
63 } // namespace dubins
64 } // namespace mpblocks
65 
67 
68 
69 
70 
71 
72 
73 
74 
75 
76 
77 
78 
79 
80 
81 #endif // HYPER_HPP_
A hyper-rectangle in dubins space: A rectangular prism in R^3.
Definition: hyper_rect.h:44
bool contains(const Vector3d &q) const
Returns true if the dubins query state q lies within this region of dubins states.
Definition: hyper_rect.h:52
Eigen::Matrix< Format_t, 3, 1 > Vector3d
Definition: hyper_rect.h:45