Room.h
Go to the documentation of this file.
1 /**
2  * This file is part of ArmarX.
3  *
4  * ArmarX is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 as
6  * published by the Free Software Foundation.
7  *
8  * ArmarX is distributed in the hope that it will be useful, but
9  * WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  *
16  * @author Fabian Reister ( fabian dot reister at kit dot edu )
17  * @date 2023
18  * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
19  * GNU General Public License
20  */
21 
22 #pragma once
23 
24 #include <string>
25 #include <tuple>
26 #include <vector>
27 
28 #include <Eigen/Core>
29 
31 {
32 
33  struct Room
34  {
35  std::string name;
36 
37  std::vector<Eigen::Vector2f> polygon;
38  float height;
39 
40  float zFloor = 0;
41 
42  bool isInside(const Eigen::Vector3f& point, bool restrictTo2dCheck = false) const;
43 
44  Eigen::Vector2f center() const;
45 
46  std::tuple<Eigen::Vector2f, Eigen::Vector2f> aabb() const;
47  bool isInside(const Eigen::Vector2f& point) const;
48  };
49 
50 } // namespace armarx::navigation::algorithms
armarx::navigation::algorithms::Room::center
Eigen::Vector2f center() const
Definition: Room.cpp:34
armarx::navigation::algorithms::Room::name
std::string name
Definition: Room.h:35
armarx::navigation::algorithms
This file is part of ArmarX.
Definition: aron_conversions.cpp:25
armarx::navigation::algorithms::Room::polygon
std::vector< Eigen::Vector2f > polygon
Definition: Room.h:37
armarx::navigation::algorithms::Room
Definition: Room.h:33
armarx::navigation::algorithms::Room::zFloor
float zFloor
Definition: Room.h:40
armarx::navigation::algorithms::Room::aabb
std::tuple< Eigen::Vector2f, Eigen::Vector2f > aabb() const
Definition: Room.cpp:45
armarx::navigation::algorithms::Room::height
float height
Definition: Room.h:38
armarx::navigation::algorithms::Room::isInside
bool isInside(const Eigen::Vector3f &point, bool restrictTo2dCheck=false) const
Definition: Room.cpp:17