GAMS  1.2.2
SearchArea.h
Go to the documentation of this file.
1 
54 #include "ReferenceFrame.h"
55 
56 #ifndef _GAMS_UTILITY_SEARCH_AREA_H_
57 #define _GAMS_UTILITY_SEARCH_AREA_H_
58 
59 #include <vector>
60 #include <string>
61 
63 
64 namespace gams
65 {
66  namespace pose
67  {
72  {
73  public:
77  SearchArea ();
78 
84  SearchArea (const PrioritizedRegion& region,
85  const std::string& name = "");
86 
92  SearchArea (const std::vector<PrioritizedRegion>& regions,
93  const std::string& name = "");
94 
98  ~SearchArea ();
99 
105  bool operator== (const SearchArea& rhs) const;
106 
112  bool operator!= (const SearchArea& rhs) const;
113 
118  void operator= (const SearchArea & rhs);
119 
124  void add_prioritized_region (const PrioritizedRegion& r);
125 
130  Region get_convex_hull () const;
131 
136  const std::vector<PrioritizedRegion>& get_regions () const;
137 
143  madara::knowledge::KnowledgeRecord::Integer get_priority (const Position& pos) const;
144 
150  bool contains (const Position& p) const;
151 
156  std::string to_string () const;
157 
159  double min_lat_, max_lat_;
160  double min_lon_, max_lon_;
161  double min_alt_, max_alt_;
162 
163  protected:
167  void calculate_bounding_box ();
168 
176  double cross (const Position& gp1, const Position& gp2,
177  const Position& gp3) const;
178 
180  std::vector<PrioritizedRegion> regions_;
181 
182  private:
188  virtual bool check_valid_type (madara::knowledge::KnowledgeBase& kb,
189  const std::string& name) const;
190 
196  virtual void to_container_impl (
197  madara::knowledge::KnowledgeBase& kb,
198  const std::string& name);
199 
205  virtual bool from_container_impl (
206  madara::knowledge::KnowledgeBase& kb,
207  const std::string& name);
208  }; // class SearchArea
209  } // namespace utility
210 } // namespace gams
211 
212 #include "SearchArea.inl"
213 
214 #endif // _GAMS_UTILITY_SEARCH_AREA_H_
A utility class for search areas.
Definition: SearchArea.h:71
double min_lat_
bounding box
Definition: SearchArea.h:159
Copyright (c) 2014 Carnegie Mellon University.
std::vector< PrioritizedRegion > regions_
collection of prioritized regions
Definition: SearchArea.h:180
A class meant to assist with retrieving information into GAMS containers.
Definition: Containerize.h:71
Contains all GAMS-related tools, classes and code.
#define GAMS_EXPORT
Definition: GamsExport.h:20
bool operator!=(const BasicVector< LDerived, Units > &lhs, const BasicVector< RDerived, Units > &rhs)
Definition: Coordinate.h:956
A helper class for prioritized region information.
A helper class for region information.
Definition: Region.h:78
bool operator==(const BasicVector< LDerived, Units > &lhs, const BasicVector< RDerived, Units > &rhs)
Definition: Coordinate.h:955