CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
AlignableSurface.cc
Go to the documentation of this file.
2 
4 
5 using namespace align;
6 
8  GloballyPositioned<Scalar>( surface.position(), surface.rotation() ),
9  theWidth( surface.bounds().width() ),
10  theLength( surface.bounds().length() )
11 {
12 }
13 
15  const RotationType& rot):
16  GloballyPositioned<Scalar>(pos, rot),
17  theWidth( Scalar() ),
18  theLength( Scalar() )
19 {
20 }
21 
23 {
24  GlobalPoints globalPoints;
25 
26  unsigned int nPoint = localPoints.size();
27 
28  globalPoints.reserve(nPoint);
29 
30  for (unsigned int j = 0; j < nPoint; ++j)
31  {
32  globalPoints.push_back( toGlobal(localPoints[j]) );
33  }
34 
35  return globalPoints;
36 }
37 
39 {
40  return rotation().multiplyInverse( rot * rotation() );
41 }
42 
44 {
45  return toAngles( toGlobal( toMatrix(angles) ) );
46 }
47 
49 {
50  return rotation() * rot * rotation().transposed();
51 }
52 
54 {
55  return toAngles( toLocal( toMatrix(angles) ) );
56 }
double Scalar
Definition: Definitions.h:27
AlignableSurface(const Plane &surface)
Constructor to set surface from geometry.
std::vector< GlobalPoint > GlobalPoints
Definition: Utilities.h:23
align::RotationType toLocal(const align::RotationType &) const
Return in local frame a rotation given in global frame.
int j
Definition: DBlmapReader.cc:9
EulerAngles toAngles(const RotationType &)
Convert rotation matrix to angles about x-, y-, z-axes (frame rotation).
Definition: Utilities.cc:7
AlgebraicVector EulerAngles
Definition: Definitions.h:36
static int position[264][3]
Definition: ReadPGInfo.cc:509
TkRotation transposed() const
align::GlobalPoints toGlobal(const align::LocalPoints &) const
Return in global coord given a set of local points.
RotationType toMatrix(const EulerAngles &)
Convert rotation angles about x-, y-, z-axes to matrix.
Definition: Utilities.cc:40
const RotationType & rotation() const
Basic3DVector< T > multiplyInverse(const Basic3DVector< T > &v) const
std::vector< LocalPoint > LocalPoints
Definition: Utilities.h:25