Hugintrunk  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
OutputProjectionInfo.h
Go to the documentation of this file.
1 // -*- c-basic-offset: 4 -*-
2 
23 /* An OutputProjectionInfo gives information about where specific points of
24  * latitude and longitude map to on the output image.
25  * The object is valid for only the projection passed to its constructor.
26  * The idea is that ChoosyRemapper and VertexCoordRemapper can get information
27  * about the output projection not specific to their images.
28  * ViewState recreates the object when the projections change.
29  */
30 
31 #ifndef _OUTPUTPROJECTIONINFO_H
32 #define _OUTPUTPROJECTIONINFO_H
33 
36 
38 {
39 public:
41  // most are for correcting faces crossing the +/-180 degree boundary
42  const double GetMiddleX() const
43  {return middle_x;}
44  const double GetMiddleY() const
45  {return middle_y;}
46  const double GetLowerX() const
47  {return lower_x;}
48  const double GetUpperX() const
49  {return upper_x;}
50  const double GetLowerY() const
51  {return lower_y;}
52  const double GetUpperY() const
53  {return upper_y;}
54  // for sinusoidal (or similar) projections, the bounds move with height.
55  const double GetUpperX(const double y) const;
56  const double GetLowerX(const double y) const;
57  // the seam is a circle in some projections
58  const double GetRadius() const
59  {return radius;}
60  // we'll need these to flip things across the seam in cylinder-like cases.
61  const double GetXAdd360() const
62  {return x_add_360;}
63  const double GetYAdd360() const
64  {return y_add_360;}
65  // they can move with height too
66  const double GetXAdd360(const double y) const;
67  // locations of poles, used by the ChoosyRemapper.
68  const double GetNorthPoleX() const
69  {return north_pole_x;}
70  const double GetNorthPoleY() const
71  {return north_pole_y;}
72  const double GetSouthPoleX() const
73  {return south_pole_x;}
74  const double GetSouthPoleY() const
75  {return south_pole_y;}
76  // use the transformation for anything else
77  bool AngularToImage(double &image_x, double &image_y, double yaw, double pitch);
78  bool ImageToAngular(double &yaw, double &pitch, double image_x, double image_y);
79 private:
88 };
89 
90 #endif
91 
HuginBase::PTools::Transform transform
const double GetUpperY() const
const double GetSouthPoleX() const
const double GetRadius() const
const double GetUpperX() const
OutputProjectionInfo(HuginBase::PanoramaOptions *output)
const double GetLowerY() const
HuginBase::PanoramaOptions * proj
const double GetNorthPoleY() const
const double GetMiddleY() const
bool AngularToImage(double &image_x, double &image_y, double yaw, double pitch)
const double GetNorthPoleX() const
const double GetMiddleX() const
const double GetXAdd360() const
const double GetLowerX() const
Holds transformations for Image -> Pano and the other way.
Panorama image options.
const double GetSouthPoleY() const
bool ImageToAngular(double &yaw, double &pitch, double image_x, double image_y)
HuginBase::PTools::Transform reverse_transform
const double GetYAdd360() const