repo.or.cz
/
lilypond.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
lilypond-0.1.27
[lilypond.git]
/
hdr
/
boxes.hh
blob
22a2eec3a5f29ee524cd192aaee3e5277ac1f177
1
/*
2
some 2D geometrical concepts
3
*/
4
5
#ifndef BOXES_HH
6
#define BOXES_HH
7
8
#include
"fproto.hh"
9
#include
"real.hh"
10
#include
"interval.hh"
11
#include
"offset.hh"
12
13
/// a square subset of Real^2
14
struct
Box
{
15
Interval x
,
y
;
16
17
void
translate
(
Offset o
) {
18
x
.
translate
(
o
.
x
);
19
y
.
translate
(
o
.
y
);
20
}
21
/// smallest box enclosing #b#
22
void
unite
(
Box b
) {
23
x
.
unite
(
b
.
x
);
24
y
.
unite
(
b
.
y
);
25
}
26
Box
();
27
Box
(
Interval ix
,
Interval iy
);
28
};
29
30
31
#endif