16#ifndef __H__UG__PLUGINS__D3F__POLYGONS__
17#define __H__UG__PLUGINS__D3F__POLYGONS__
116 if (t->pnt_inside (x, y))
153 if (! t->is_valid ())
parameterString s
Definition Biogas.lua:2
bool pnt_inside_WN(const MathVector< 2 > pnt) const
checks whether a point is in the polygon
Definition polygons.cpp:61
t_polygon_item(int the_id, number x, number y, t_polygon_item *the_tl=NULL)
constructor: we need at least one point!
Definition polygons.h:45
int id
identifier of the polygon
Definition polygons.h:40
std::vector< MathVector< 2 > > corner
corners
Definition polygons.h:41
t_polygon_item * tl
next polygon
Definition polygons.h:39
bool pnt_is_on_the_left(const MathVector< 2 > &pnt_0, const MathVector< 2 > &pnt_1, const MathVector< 2 > &pnt) const
checks the position of a point wrt a line
Definition polygons.cpp:43
bool pnt_inside(number x, number y) const
checks whether a point is in the polygon
Definition polygons.h:59
MathVector< 2 > bb[2]
bounding box
Definition polygons.h:42
void append(number x, number y)
appends a point at the end of the list
Definition polygons.cpp:27
bool is_valid() const
checks whether the points specify a proper polygon
Definition polygons.h:56
bool pnt_inside_CN(const MathVector< 2 > pnt) const
checks whether a point is in the polygon
Definition polygons.cpp:101
bool get_id_by_pnt(number x, number y, int &id) const
checks, in which polygon (x, y) is (if in any)
Definition polygons.h:113
void load_points_from(const char *file_name)
loads points and polygon descriptsions from a file
Definition polygons.cpp:169
bool good() const
checks whether the specified polygons are OK
Definition polygons.h:150
t_polygon_item * m_polygons
polygons
Definition polygons.h:159
t_polygon_item * polygon_by_id(int id) const
gets polygon by id
Definition polygons.h:137
~PolygonalRegions()
class destructor
Definition polygons.h:91
PolygonalRegions()
class constructor
Definition polygons.h:88
void append_point(number x, number y, int id)
appends a point to an existing polygon, or creates a new polygon
Definition polygons.h:103
int get_id_by_pnt_dv(number x, number y, int dv) const
returns the polygon id, where (x, y) is, or a given default value
Definition polygons.h:125