File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,8 @@ namespace geode
5757
5858 void add_point ( const Point< dimension >& point );
5959
60+ void extends ( double length );
61+
6062 bool contains ( const Point< dimension >& point ) const ;
6163
6264 [[nodiscard]] bool intersects (
Original file line number Diff line number Diff line change @@ -176,6 +176,16 @@ namespace geode
176176 }
177177 }
178178
179+ template < index_t dimension >
180+ void BoundingBox< dimension >::extends( double length )
181+ {
182+ for ( const auto i : LRange{ dimension } )
183+ {
184+ min_.set_value ( i, min_.value ( i ) - length );
185+ max_.set_value ( i, max_.value ( i ) + length );
186+ }
187+ }
188+
179189 template < index_t dimension >
180190 void BoundingBox< dimension >::add_box(
181191 const BoundingBox< dimension >& box )
You can’t perform that action at this time.
0 commit comments