diff options
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 |
