CMS 3D CMS Logo

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 Plane transformPlane(const Plane& plane, const GloballyPositioned<T>& frame) {
16  typename Plane::RotationType rot = plane.rotation() * frame.rotation().transposed();
17  typename Frame::LocalPoint lpos = frame.toLocal(plane.position());
18  typename Plane::PositionType pos(lpos.basicVector()); // cheat!
19  return Plane(pos, rot);
20  }
21 
25  template <typename T, typename U>
29 
30  typename Plane::RotationType rot = plane.rotation() * frame.rotation().transposed();
31  typename Frame::LocalPoint lpos = frame.toLocal(plane.position());
32  typename Plane::PositionType pos(lpos.basicVector()); // cheat!
33  return Plane(pos, rot);
34  }
35 };
36 
37 #endif
Point3DBase< Scalar, LocalTag > LocalPoint
Definition: Definitions.h:30
SOAFrame< float > Frame
Definition: Plane.h:16
static GloballyPositioned< T > toFrame(const GloballyPositioned< T > &plane, const GloballyPositioned< U > &frame)
Definition: FrameChanger.h:26
#define dso_internal
Definition: Visibility.h:13
static Plane transformPlane(const Plane &plane, const GloballyPositioned< T > &frame)
Definition: FrameChanger.h:14
const PositionType & position() const
const RotationType & rotation() const