CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
BoundingBox.cc
Go to the documentation of this file.
4 
5 
7  float hLen = plane.bounds().length() / 2;
8  float hWid = plane.bounds().width() / 2;
9  float hThick = plane.bounds().thickness() / 2;
10 
11  m_corners[0] = plane.toGlobal( LocalPoint( hWid, hLen, hThick));
12  m_corners[1] = plane.toGlobal( LocalPoint( hWid, hLen,-hThick));
13  m_corners[2] = plane.toGlobal( LocalPoint( hWid,-hLen, hThick));
14  m_corners[3] = plane.toGlobal( LocalPoint( hWid,-hLen,-hThick));
15  m_corners[4] = plane.toGlobal( LocalPoint(-hWid, hLen, hThick));
16  m_corners[5] = plane.toGlobal( LocalPoint(-hWid, hLen,-hThick));
17  m_corners[6] = plane.toGlobal( LocalPoint(-hWid,-hLen, hThick));
18  m_corners[7] = plane.toGlobal( LocalPoint(-hWid,-hLen,-hThick));
19 
20 }
21 
22 
23 std::vector<GlobalPoint>
25 {
26  std::vector<GlobalPoint> result;
27  result.reserve(8);
28 
29  float hLen = plane.bounds().length() / 2;
30  float hWid = plane.bounds().width() / 2;
31  float hThick = plane.bounds().thickness() / 2;
32 
33  result.push_back( plane.toGlobal( LocalPoint( hWid, hLen, hThick)));
34  result.push_back( plane.toGlobal( LocalPoint( hWid, hLen,-hThick)));
35  result.push_back( plane.toGlobal( LocalPoint( hWid,-hLen, hThick)));
36  result.push_back( plane.toGlobal( LocalPoint( hWid,-hLen,-hThick)));
37  result.push_back( plane.toGlobal( LocalPoint(-hWid, hLen, hThick)));
38  result.push_back( plane.toGlobal( LocalPoint(-hWid, hLen,-hThick)));
39  result.push_back( plane.toGlobal( LocalPoint(-hWid,-hLen, hThick)));
40  result.push_back( plane.toGlobal( LocalPoint(-hWid,-hLen,-hThick)));
41 
42  return result;
43 }
tuple result
Definition: query.py:137
static std::vector< GlobalPoint > corners(const Plane &)
Definition: BoundingBox.cc:24
Local3DPoint LocalPoint
Definition: LocalPoint.h:11
GlobalPoint m_corners[8]
Definition: BoundingBox.h:33