blob: 94ea6855c7f225f48261b94fde87fc4cec11d059 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
#ifndef __2GEOM_SWEEP_H__
#define __2GEOM_SWEEP_H__
#include <vector>
#include "d2.h"
namespace Geom {
struct Event {
double x;
unsigned ix;
bool closing;
Event(double pos, unsigned i, bool c) : x(pos), ix(i), closing(c) {}
// Lexicographic ordering by x then closing
bool operator<(Event const &other) const {
if(x < other.x) return true;
if(x > other.x) return false;
return closing < other.closing;
}
};
std::vector<std::vector<unsigned> > sweep_bounds(std::vector<Rect>);
std::vector<std::vector<unsigned> > sweep_bounds(std::vector<Rect>, std::vector<Rect>);
std::vector<std::vector<unsigned> > fake_cull(unsigned a, unsigned b);
}
#endif
/*
Local Variables:
mode:c++
c-file-style:"stroustrup"
c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
indent-tabs-mode:nil
fill-column:99
End:
*/
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :
|