|
Plugins
|
#include <polygons.h>
Classes | |
| class | t_polygon_item |
Public Member Functions | |
| void | append_point (number x, number y, int id) |
| appends a point to an existing polygon, or creates a new polygon | |
| bool | get_id_by_pnt (number x, number y, int &id) const |
| checks, in which polygon (x, y) is (if in any) | |
| 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 | |
| void | load_points_from (const char *file_name) |
| loads points and polygon descriptsions from a file | |
| PolygonalRegions () | |
| class constructor | |
| ~PolygonalRegions () | |
| class destructor | |
Private Member Functions | |
| bool | good () const |
| checks whether the specified polygons are OK | |
| void | load_points_from (std::istream &input) |
| loads points and polygon descriptsions from a stream | |
| t_polygon_item * | polygon_by_id (int id) const |
| gets polygon by id | |
Private Attributes | |
| t_polygon_item * | m_polygons |
| polygons | |
This class provides a facility to inquire, in which of given polygons a given point lyes. The class keeps a list of the polygons identified by integers.
|
inline |
class constructor
|
inline |
class destructor
References m_polygons, s, and ug::d3f::PolygonalRegions::t_polygon_item::tl.
appends a point to an existing polygon, or creates a new polygon
References ug::d3f::PolygonalRegions::t_polygon_item::append(), m_polygons, and polygon_by_id().
Referenced by ug::d3f::Functionality::Common(), and load_points_from().
checks, in which polygon (x, y) is (if in any)
References m_polygons, and ug::d3f::PolygonalRegions::t_polygon_item::tl.
Referenced by get_id_by_pnt_dv().
returns the polygon id, where (x, y) is, or a given default value
References get_id_by_pnt().
Referenced by ug::d3f::Functionality::Common().
|
inlineprivate |
checks whether the specified polygons are OK
References m_polygons, and ug::d3f::PolygonalRegions::t_polygon_item::tl.
Referenced by load_points_from().
| void ug::d3f::PolygonalRegions::load_points_from | ( | const char * | file_name | ) |
loads points and polygon descriptsions from a file
Loads polygon corners and id's from a given file.
References ug::FindFileInStandardPaths(), load_points_from(), and UG_COND_THROW.
Referenced by ug::d3f::Functionality::Common(), and load_points_from().
|
private |
loads points and polygon descriptsions from a stream
Loads polygon corners and id's from a given stream.
References append_point(), good(), and UG_THROW.
|
inlineprivate |
gets polygon by id
References ug::d3f::PolygonalRegions::t_polygon_item::id, m_polygons, and ug::d3f::PolygonalRegions::t_polygon_item::tl.
Referenced by append_point().
|
private |
polygons
Referenced by append_point(), get_id_by_pnt(), good(), polygon_by_id(), and ~PolygonalRegions().