CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
FrameChanger.h
Go to the documentation of this file.
1 #ifndef FrameChanger_H
2 #define FrameChanger_H
3 
7 
9 public:
13  template <typename T>
14  static
15  Plane transformPlane( const Plane& plane, const GloballyPositioned<T>& frame) {
16  typedef GloballyPositioned<T> Frame;
17  typename Plane::RotationType rot = plane.rotation() * frame.rotation().transposed();
18  typename Frame::LocalPoint lpos = frame.toLocal(plane.position());
19  typename Plane::PositionType pos( lpos.basicVector()); // cheat!
20  return Plane(pos, rot);
21  }
22 
23 
27  template <typename T, typename U>
28  static
30  const GloballyPositioned<U>& frame) {
32  typedef GloballyPositioned<U> Frame;
33 
34  typename Plane::RotationType rot = plane.rotation() * frame.rotation().transposed();
35  typename Frame::LocalPoint lpos = frame.toLocal(plane.position());
36  typename Plane::PositionType pos( lpos.basicVector()); // cheat!
37  return Plane( pos, rot);
38 
39  }
40 
41 };
42 
43 #endif
Definition: Plane.h:17
LocalPoint toLocal(const GlobalPoint &gp) const
static GloballyPositioned< T > toFrame(const GloballyPositioned< T > &plane, const GloballyPositioned< U > &frame)
Definition: FrameChanger.h:29
#define dso_internal
Definition: Visibility.h:13
static Plane transformPlane(const Plane &plane, const GloballyPositioned< T > &frame)
Definition: FrameChanger.h:15
TkRotation transposed() const
Local3DPoint LocalPoint
Definition: LocalPoint.h:11
const RotationType & rotation() const
const PositionType & position() const