Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:53:30

0001 #ifndef BoundingBox_H
0002 #define BoundingBox_H
0003 
0004 #include "DataFormats/GeometryVector/interface/GlobalPoint.h"
0005 #include <vector>
0006 
0007 class Plane;
0008 
0009 /** A helper class that returns the corners of a rectangle that
0010  *  fully contains a bound plane.
0011  */
0012 class BoundingBox {
0013 public:
0014   BoundingBox() {}
0015   BoundingBox(const Plane& plane);
0016 
0017   // old interface
0018   static std::vector<GlobalPoint> corners(const Plane&);
0019 
0020   GlobalPoint const& operator[](unsigned int i) const { return m_corners[i]; }
0021   GlobalPoint const& corner(unsigned int i) const { return m_corners[i]; }
0022 
0023 private:
0024   GlobalPoint m_corners[8];
0025 };
0026 
0027 #endif