Changeset 2451:d7b7048e045b in lemon-0.x
- Timestamp:
- 06/05/07 19:29:46 (17 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@3288
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/dim2.h
r2391 r2451 273 273 /// 274 274 ///\author Attila Bernath 275 template<typename T>275 template<typename T> 276 276 class BoundingBox { 277 277 Point<T> bottom_left, top_right; … … 284 284 ///Construct an instance from one point 285 285 BoundingBox(Point<T> a) { bottom_left=top_right=a; _empty = false; } 286 286 287 ///Construct an instance from two points 288 289 ///Construct an instance from two points 290 ///\warning The coordinates of the bottom-left corner must be no more 291 ///than those of the top-right one 292 BoundingBox(Point<T> a,Point<T> b) 293 { 294 bottom_left=a; 295 top_right=b; 296 _empty = false; 297 } 298 299 ///Construct an instance from four numbers 300 301 ///Construct an instance from four numbers 302 ///\warning The coordinates of the bottom-left corner must be no more 303 ///than those of the top-right one 304 BoundingBox(T l,T b,T r,T t) 305 { 306 bottom_left=Point<T>(l,b); 307 top_right=Point<T>(r,t); 308 _empty = false; 309 } 310 287 311 ///Were any points added? 288 312 bool empty() const { 289 313 return _empty; 290 314 } 291 315 292 316 ///Make the BoundingBox empty 293 317 void clear() {
Note: See TracChangeset
for help on using the changeset viewer.