MLIB
Loading...
Searching...
No Matches
border.h
Go to the documentation of this file.
1/*
2 Copyright (c) Mircea Neacsu (2014-2025) Licensed under MIT License.
3 This file is part of MLIB project. See LICENSE file for full license terms.
4*/
5
7
8#pragma once
9
10#if __has_include("defs.h")
11#include "defs.h"
12#endif
13
14#include "point.h"
15
16#include <deque>
17
18namespace mlib {
19
20class Border
21{
22public:
23 Border ();
24 Border (const char* fname);
25 void add (double x, double y);
26 void close (double x, double y);
27
28 bool inside (double x, double y);
29
30private:
31 std::deque<dpoint> vertex;
32 dpoint closing;
33 int closing_outside;
34};
35
36} // namespace mlib
bool inside(double x, double y)
Check if a point is inside the border.
Definition border.cpp:103
Border()
Create an empty border object.
Definition border.cpp:38
Definition of mlib::Point template class.
Point< double > dpoint
Specialization of Point using double as underlining type.
Definition point.h:145