COIN-OR::LEMON - Graph Library

Changeset 2451:d7b7048e045b in lemon-0.x


Ignore:
Timestamp:
06/05/07 19:29:46 (17 years ago)
Author:
Alpar Juttner
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@3288
Message:

Two new constructors added to dim2::BoundingBox?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/dim2.h

    r2391 r2451  
    273273  ///
    274274  ///\author Attila Bernath
    275   template<typename T>
     275    template<typename T>
    276276    class BoundingBox {
    277277      Point<T> bottom_left, top_right;
     
    284284      ///Construct an instance from one point
    285285      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     
    287311      ///Were any points added?
    288312      bool empty() const {
    289313        return _empty;
    290314      }
    291 
     315     
    292316      ///Make the BoundingBox empty
    293317      void clear() {
Note: See TracChangeset for help on using the changeset viewer.