1
2
3
4
5
6
7
8
9 package math.geom2d.circulinear;
10
11 import math.geom2d.domain.GenericDomain2D;
12 import math.geom2d.transform.CircleInversion2D;
13
14
15
16
17
18
19
20
21 public class GenericCirculinearDomain2D extends GenericDomain2D
22 implements CirculinearDomain2D {
23
24
25
26
27 public GenericCirculinearDomain2D(CirculinearBoundary2D boundary) {
28 super(boundary);
29 }
30
31 @Override
32 public CirculinearBoundary2D getBoundary() {
33 return (CirculinearBoundary2D) boundary;
34 }
35
36
37
38
39 public CirculinearDomain2D getBuffer(double dist) {
40 return new GenericCirculinearDomain2D(
41 new CirculinearBoundarySet2D(
42 CirculinearCurve2DUtils.splitIntersectingContours(
43 this.getBoundary().getContinuousCurves())));
44 }
45
46
47
48
49 public CirculinearDomain2D transform(CircleInversion2D inv) {
50
51 CirculinearBoundary2D boundary2 = (CirculinearBoundary2D) boundary;
52
53
54 boundary2 = (CirculinearBoundary2D)boundary2.transform(inv).getReverseCurve();
55
56
57 return new GenericCirculinearDomain2D(boundary2);
58 }
59 }