56 #ifndef _GAMS_UTILITY_REGION_H_
57 #define _GAMS_UTILITY_REGION_H_
63 #include "madara/knowledge/containers/StringVector.h"
87 Region(
const std::vector <Position> & init_vertices =
88 std::vector<Position>(),
unsigned int type = 0,
89 const std::string& name =
"");
163 std::string
to_string(
const std::string & delimiter =
":")
const;
190 const std::string& name)
const;
198 madara::knowledge::KnowledgeBase& kb,
199 const std::string& name);
207 madara::knowledge::KnowledgeBase& kb,
208 const std::string& name);
Copyright(c) 2014 Carnegie Mellon University.
A helper class for region information.
Region(const Region &rhs)
Copy constructor.
void operator=(const Region &rhs)
Assignment operator.
bool operator!=(const Region &rhs) const
Inequality operator.
virtual bool from_container_impl(madara::knowledge::KnowledgeBase &kb, const std::string &name)
Load object from knowledge base.
Region(const std::vector< Position > &init_vertices=std::vector< Position >(), unsigned int type=0, const std::string &name="")
Constructor.
double get_area() const
Gets area of the region.
void set_name(const std::string &name)
Sets name of region.
std::vector< Position > vertices
the vertices of the region
virtual void to_container_impl(madara::knowledge::KnowledgeBase &kb, const std::string &name)
Store object in knowledge base.
double distance(const Position &position) const
Gets distance from any point in this region.
bool contains(const Position &position) const
Determines if GPSPosition is in region.
void calculate_bounding_box()
populate bounding box values
virtual ~Region()
Destructor.
bool operator==(const Region &rhs) const
Equality operator.
std::string to_string(const std::string &delimiter=":") const
Converts the position to a string.
std::string get_name() const
Gets name of region.
unsigned int type_
type for this region
virtual bool check_valid_type(madara::knowledge::KnowledgeBase &kb, const std::string &name) const
Check if object is of correct type.
Region get_bounding_box() const
Gets bounding box.
A class meant to assist with retrieving information into GAMS containers.
Contains all GAMS-related tools, classes and code.
Copyright (c) 2015 Carnegie Mellon University.
Copyright (c) 2015 Carnegie Mellon University.
Copyright (c) 2015-2018 Carnegie Mellon University.
Copyright (c) 2015 Carnegie Mellon University.