ATLAS Offline Software
VP12DViewRZFishEyeTransformation.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // //
7 // Header file for class VP12DViewRZFishEyeTransformation //
8 // //
9 // Author: Thomas Kittelmann <Thomas.Kittelmann@cern.ch> //
10 // //
11 // Initial version: April 2007 //
12 // //
14 
15 #ifndef VP12DVIEWRZFISHEYETRANSFORMATION_H
16 #define VP12DVIEWRZFISHEYETRANSFORMATION_H
17 
19 
21 public:
22 
25 
26  QPointF transform(const QPointF &source) const;
27  QPointF inverseTransform(const QPointF &source) const;
28 
29  virtual QRectF inverseTransform(const QRectF &source) const { return IVP12DViewTransformation::inverseTransform(source); }
30  virtual QRectF transform(const QRectF &source) const { return IVP12DViewTransformation::inverseTransform(source); }
31 
32 private:
33 
34  double m_fisheyepar;
35 
36 };
37 
39 
40 #include <cmath>
41 
42 inline QPointF VP12DViewRZFishEyeTransformation::transform(const QPointF &source) const
43 {
44  return QPointF(source.x()/(1+fabs(source.x()*m_fisheyepar)),source.y()/(1+fabs(source.y()*m_fisheyepar)));
45 }
46 
47 inline QPointF VP12DViewRZFishEyeTransformation::inverseTransform(const QPointF &source) const
48 {
49  return QPointF(source.x()/(1-fabs(source.x()*m_fisheyepar)),source.y()/(1-fabs(source.y()*m_fisheyepar)));
50 }
51 
52 #endif
VP12DViewRZFishEyeTransformation::inverseTransform
virtual QRectF inverseTransform(const QRectF &source) const
Definition: VP12DViewRZFishEyeTransformation.h:29
VP12DViewRZFishEyeTransformation::~VP12DViewRZFishEyeTransformation
virtual ~VP12DViewRZFishEyeTransformation()
Definition: VP12DViewRZFishEyeTransformation.h:24
IVP12DViewTransformation
Definition: IVP12DViewTransformation.h:27
VP12DViewRZFishEyeTransformation::transform
QPointF transform(const QPointF &source) const
Definition: VP12DViewRZFishEyeTransformation.h:42
IVP12DViewTransformation::inverseTransform
virtual QPointF inverseTransform(const QPointF &source) const =0
VP12DViewRZFishEyeTransformation::VP12DViewRZFishEyeTransformation
VP12DViewRZFishEyeTransformation()
Definition: VP12DViewRZFishEyeTransformation.cxx:18
IVP12DViewTransformation.h
VP12DViewRZFishEyeTransformation
Definition: VP12DViewRZFishEyeTransformation.h:20
VP12DViewRZFishEyeTransformation::transform
virtual QRectF transform(const QRectF &source) const
Definition: VP12DViewRZFishEyeTransformation.h:30
copySelective.source
string source
Definition: copySelective.py:32
VP12DViewRZFishEyeTransformation::m_fisheyepar
double m_fisheyepar
Definition: VP12DViewRZFishEyeTransformation.h:34
VP12DViewRZFishEyeTransformation::inverseTransform
QPointF inverseTransform(const QPointF &source) const
Definition: VP12DViewRZFishEyeTransformation.h:47