|
Plugins
|
Public Member Functions | |
| void | append (number x, number y) |
| appends a point at the end of the list | |
| bool | is_valid () const |
| checks whether the points specify a proper polygon | |
| bool | pnt_inside (number x, number y) const |
| checks whether a point is in the polygon | |
| t_polygon_item (int the_id, number x, number y, t_polygon_item *the_tl=NULL) | |
| constructor: we need at least one point! | |
Public Attributes | |
| MathVector< 2 > | bb [2] |
| bounding box | |
| std::vector< MathVector< 2 > > | corner |
| corners | |
| int | id |
| identifier of the polygon | |
| t_polygon_item * | tl |
| next polygon | |
Private Member Functions | |
| bool | pnt_inside_CN (const MathVector< 2 > pnt) const |
| checks whether a point is in the polygon | |
| bool | pnt_inside_WN (const MathVector< 2 > pnt) const |
| checks whether a point is in the polygon | |
| 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 | |
|
inline |
appends a point at the end of the list
Adds a point at the end of the list of corners of the polygon. Updates the bounding box.
Referenced by ug::d3f::PolygonalRegions::append_point().
|
inline |
checks whether the points specify a proper polygon
References corner.
checks whether a point is in the polygon
References pnt_inside_WN().
|
private |
checks whether a point is in the polygon
Checks whether a given point is in a given element. The function returns false if no, true if yes. This is an implementation of the crossing-number algorithm taken from http://geomalgorithms.com/a03-_inclusion.html (Copyright 2000 softSurfer, 2012 Dan Sunday, free for public use)
| pnt | the point |
|
private |
checks whether a point is in the polygon
Checks whether a given point is in 'this' polygon. The function returns false if no, true if yes. This is an implementation of the winding-number algorithm taken from http://geomalgorithms.com/a03-_inclusion.html (Copyright 2000 softSurfer, 2012 Dan Sunday, free for public use)
| pnt | the point |
References ug::MathVector< std::size_t N, typename T >::size().
Referenced by pnt_inside().
|
inlineprivate |
checks the position of a point wrt a line
Tests if a point is left or right of an infinite straight line. Return true if pnt is left of the line or on the line, false otherwise.
| pnt_0 | one point on the line |
| pnt_1 | another point on the line |
| pnt | point to check |
| MathVector<2> ug::d3f::PolygonalRegions::t_polygon_item::bb[2] |
bounding box
Referenced by append(), and t_polygon_item().
| std::vector<MathVector<2> > ug::d3f::PolygonalRegions::t_polygon_item::corner |
corners
Referenced by append(), is_valid(), and t_polygon_item().
| int ug::d3f::PolygonalRegions::t_polygon_item::id |
identifier of the polygon
Referenced by ug::d3f::PolygonalRegions::polygon_by_id().
| t_polygon_item* ug::d3f::PolygonalRegions::t_polygon_item::tl |