Horizon
Loading...
Searching...
No Matches
src
canvas
snap_filter.hpp
1
#pragma once
2
#include "common/common.hpp"
3
#include "util/uuid_path.hpp"
4
5
namespace
horizon {
6
class
SnapFilter
{
7
public
:
8
UUID
uu;
9
ObjectType type;
10
int
vertex = 0;
11
SnapFilter
(ObjectType ot,
const
UUID
&u,
int
v = -1) : uu(u), type(ot), vertex(v){};
12
bool
operator<(
const
SnapFilter
&other)
const
13
{
14
if
(type < other.type) {
15
return
true
;
16
}
17
if
(type > other.type) {
18
return
false
;
19
}
20
if
(uu < other.uu) {
21
return
true
;
22
}
23
else
if
(other.uu < uu) {
24
return
false
;
25
}
26
return
vertex < other.vertex;
27
}
28
bool
operator==(
const
SnapFilter
&other)
const
29
{
30
return
(uu == other.uu) && (vertex == other.vertex) && (type == other.type);
31
}
32
};
33
}
// namespace horizon
horizon::SnapFilter
Definition
snap_filter.hpp:6
horizon::UUID
This class encapsulates a UUID and allows it to be uses as a value type.
Definition
uuid.hpp:16
Generated by
1.9.8