diff options
| author | Arne Dußin | 2020-11-26 20:52:44 +0100 |
|---|---|---|
| committer | Arne Dußin | 2020-11-26 20:52:44 +0100 |
| commit | 99e935b63bb023cfd46c8f3d81074d3faf7ce592 (patch) | |
| tree | 5d9739802114cc30065230ce8d425894ae878a5f /src/math/mod.rs | |
| parent | 19a1221c4bb9df34bb0c14746fc5372d07d1c771 (diff) | |
| parent | cf3c8378557457363853d6795e4ddf9e70a4738e (diff) | |
| download | graf_karto-99e935b63bb023cfd46c8f3d81074d3faf7ce592.tar.gz graf_karto-99e935b63bb023cfd46c8f3d81074d3faf7ce592.zip | |
Merge branch 'polygon-deletion'
Diffstat (limited to 'src/math/mod.rs')
| -rw-r--r-- | src/math/mod.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/math/mod.rs b/src/math/mod.rs index 6f83c98..b84d270 100644 --- a/src/math/mod.rs +++ b/src/math/mod.rs @@ -20,6 +20,12 @@ pub trait Surface<T: Scalar + Copy> { /// Checks if a line segment is entirely contained by this surface. fn contains_line_segment(&self, line_segment: &LineSegment<T>) -> bool; + + /// Checks if a rectangle is entirely contained inside this surface. + fn contains_rect(&self, rect: &Rect<T>) -> bool; + + /// Checks if a polygon is contained wholly by this surface. + fn contains_polygon(&self, polygon: &Polygon<T>) -> bool; } /// Round a floating point number to the nearest step given by the step argument. For instance, if |
