Hugintrunk  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CalculateFOV.h
Go to the documentation of this file.
1 // -*- c-basic-offset: 4 -*-
26 #ifndef _BASICALGORITHMS_CALCULATECFOV_H
27 #define _BASICALGORITHMS_CALCULATECFOV_H
28 
29 #include <hugin_shared.h>
31 
32 #include <panodata/PanoramaData.h>
33 
34 
35 namespace HuginBase {
36 
37 
39 {
40 
41  public:
43  explicit CalculateFOV(PanoramaData& panorama)
44  : PanoramaAlgorithm(panorama)
45  {};
46 
48  virtual ~CalculateFOV() {};
49 
50 
51  public:
53  bool modifiesPanoramaData() const
54  { return false; }
55 
57  bool runAlgorithm()
58  {
59  o_resultFOV = calcFOV(o_panorama);
60  return true; // let's hope so.
61  }
62 
63 
64  public:
65 
67  static hugin_utils::FDiff2D calcFOV(const PanoramaData& panorama);
68 
71  {
72  // [TODO] if(!hasRunSuccessfully()) DEBUG;
73  return o_resultFOV.x;
74  }
75 
78  {
79  // [TODO] if(!hasRunSuccessfully()) DEBUG;
80  return o_resultFOV.y;
81  }
82 
85  {
86  // [TODO] if(!hasRunSuccessfully()) DEBUG;
87  return o_resultFOV;
88  }
89 
90 
91  protected:
93 };
94 
95 
96 }
97 #endif // _H
bool modifiesPanoramaData() const
returns true if the algorithm changes the PanoramaData.
Definition: CalculateFOV.h:53
Model for a panorama.
Definition: PanoramaData.h:81
#define IMPEX
Definition: hugin_shared.h:39
double getResultHorizontalFOV()
Definition: CalculateFOV.h:70
hugin_utils::FDiff2D o_resultFOV
Definition: CalculateFOV.h:92
CalculateFOV(PanoramaData &panorama)
Definition: CalculateFOV.h:43
hugin_utils::FDiff2D getResultFOV()
Definition: CalculateFOV.h:84
bool runAlgorithm()
implementation of the algorithm.
Definition: CalculateFOV.h:57