CMS 3D CMS Logo

Static Public Member Functions

FrameChanger Class Reference

#include <FrameChanger.h>

List of all members.

Static Public Member Functions

template<typename T , typename U >
static GloballyPositioned< T > toFrame (const GloballyPositioned< T > &plane, const GloballyPositioned< U > &frame)
template<typename T >
static Plane transformPlane (const Plane &plane, const GloballyPositioned< T > &frame)

Detailed Description

Definition at line 7 of file FrameChanger.h.


Member Function Documentation

template<typename T , typename U >
static GloballyPositioned<T> FrameChanger::toFrame ( const GloballyPositioned< T > &  plane,
const GloballyPositioned< U > &  frame 
) [inline, static]

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 28 of file FrameChanger.h.

References pos, GloballyPositioned< T >::position(), GloballyPositioned< T >::rotation(), and GloballyPositioned< T >::toLocal().

                                                                       {
        typedef GloballyPositioned<T>                  Plane;
        typedef GloballyPositioned<U>                  Frame;

        typename Plane::RotationType rot = plane.rotation() * frame.rotation().transposed();
        typename Frame::LocalPoint lpos = frame.toLocal(plane.position());
        typename Plane::PositionType pos( lpos.basicVector()); // cheat!
        return Plane( pos, rot);

    }
template<typename T >
static Plane FrameChanger::transformPlane ( const Plane plane,
const GloballyPositioned< T > &  frame 
) [inline, static]

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 14 of file FrameChanger.h.

References pos, GloballyPositioned< T >::position(), GloballyPositioned< T >::rotation(), and GloballyPositioned< T >::toLocal().

Referenced by PathToPlane2Order::operator()(), and RKPropagatorInS::propagateParametersOnPlane().

                                                                                  {
        typedef GloballyPositioned<T>                  Frame;
        typename Plane::RotationType rot = plane.rotation() * frame.rotation().transposed();
        typename Frame::LocalPoint lpos = frame.toLocal(plane.position());
        typename Plane::PositionType pos( lpos.basicVector()); // cheat!
        return Plane(pos, rot);
    }