MLIB
Loading...
Searching...
No Matches
border.h
Go to the documentation of this file.
1#pragma once
7#if __has_include("defs.h")
8#include "defs.h"
9#endif
10
11#include "point.h"
12
13#include <deque>
14
15namespace mlib {
16
17class Border
18{
19public:
20 Border ();
21 Border (const char* fname);
22 void add (double x, double y);
23 void close (double x, double y);
24
25 bool inside (double x, double y);
26
27private:
28 std::deque<dpoint> vertex;
29 dpoint closing;
30 int closing_outside;
31};
32
33} // namespace mlib
Representation of a simple, non-intersecting polygon that partitions the 2D space in two regions.
Definition border.h:18
bool inside(double x, double y)
Check if a point is inside the border.
Definition border.cpp:104
Border()
Create an empty border object.
Definition border.cpp:39
Definition of Point template class.