ActiveLib
Loading...
Searching...
No Matches
Position.h
1
6#ifndef ACTIVE_GEOMETRY_POSITION
7#define ACTIVE_GEOMETRY_POSITION
8
9namespace active::geometry {
10
12 enum class Position {
13 undefined = 0x00,
14
15 after = 0x01,
16 origin = 0x02,
17 along = 0x04,
18 end = 0x08,
19 before = 0x10,
20 radial = 0x20,
21
22 outside = 0x01,
23 inside = 0x10,
24
25 left = 0x01,
26 right = 0x10,
27
28 front = 0x10,
29 back = 0x01,
30
31 within = along | end | origin,
32 vertex = end | origin,
33 former = along | origin,
34 latter = along | end,
35 all = before | origin | along | end | after | radial,
36 };
37
38 inline Position operator| (Position left, Position right) {
39 return static_cast<Position>(static_cast<short>(left) | static_cast<short>(right));
40 }
41
42 inline Position operator& (Position left, Position right) {
43 return static_cast<Position>(static_cast<short>(left) & static_cast<short>(right));
44 }
45
46}
47
48#endif //ACTIVE_GEOMETRY_POSITION
Definition Anchor2D.h:11
Position
Relative spatial position.
Definition Position.h:12
@ former
Within the edge span, excluding the end vertex.
@ before
Before the origin of an edge.
@ inside
Inside a closed shape.
@ back
At the back of a plane.
@ undefined
Not calculated or invalid.
@ within
Within the span of an edge, including ends.
@ after
After the end of an edge.
@ along
Along the span of an edge.
@ origin
On the origin of an edge.
@ right
Right of a straight line.
@ end
On the end of an edge.
@ left
Left of a straight line.
@ radial
On the extended circle of an arc, outside the arc itself.
@ all
Any defined relative position.
@ outside
Outside a closed shape.
@ latter
Within the edge span, excluding the origin vertex.
@ front
In front of a plane.