#include <TrackPropagation/RungeKutta/interface/FrameChanger.h>
Public Types | |
typedef ReferenceCountingPointer < Plane > | PlanePtr |
Public Member Functions | |
template<typename T, typename U> | |
GloballyPositioned< T > | toFrame (const GloballyPositioned< T > &plane, const GloballyPositioned< U > &frame) |
Moves the first argument ("plane") to the reference frame given by the second argument ("frame"). | |
template<typename T> | |
PlanePtr | transformPlane (const Plane &plane, const GloballyPositioned< T > &frame) |
Definition at line 7 of file FrameChanger.h.
Definition at line 10 of file FrameChanger.h.
GloballyPositioned<T> FrameChanger::toFrame | ( | const GloballyPositioned< T > & | plane, | |
const GloballyPositioned< U > & | frame | |||
) | [inline] |
Moves the first argument ("plane") to the reference frame given by the second argument ("frame").
The returned frame is not positioned globally!
Definition at line 23 of file FrameChanger.h.
References GloballyPositioned< T >::position(), rot, GloballyPositioned< T >::rotation(), and GloballyPositioned< T >::toLocal().
Referenced by transformPlane().
00024 { 00025 typedef GloballyPositioned<T> Plane; 00026 typedef GloballyPositioned<U> Frame; 00027 00028 typename Plane::RotationType rot = plane.rotation() * frame.rotation().transposed(); 00029 typename Frame::LocalPoint lpos = frame.toLocal(plane.position()); 00030 typename Plane::PositionType pos( lpos.basicVector()); // cheat! 00031 return Plane( pos, rot); 00032 00033 }
PlanePtr FrameChanger::transformPlane | ( | const Plane & | plane, | |
const GloballyPositioned< T > & | frame | |||
) | [inline] |
Definition at line 13 of file FrameChanger.h.
References GloballyPositioned< T >::position(), GloballyPositioned< T >::rotation(), and toFrame().
Referenced by PathToPlane2Order::operator()(), and RKPropagatorInS::propagateParametersOnPlane().
00013 { 00014 Surface::Base newFrame = toFrame( plane, frame); 00015 return PlanePtr( new Plane( newFrame.position(), newFrame.rotation())); 00016 }