Hugintrunk  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MeshRemapper.h
Go to the documentation of this file.
1 // -*- c-basic-offset: 4 -*-
2 
23 #ifndef _MESHREMAPPER_H
24 #define _MESHREMAPPER_H
25 
26 #include <vector>
27 #include <panodata/Panorama.h>
29 
30 class VisualizationState;
31 
44 {
45 public:
48  virtual ~MeshRemapper();
49  virtual void UpdateAndResetIndex();
60  class Coords
61  {
62  public:
64  double (*tex_c)[2][2];
66  double (*vertex_c)[2][2];
67  };
68 
71  {
72  public:
73 
74  double tex_c[2][2][2];
75  double vertex_c[2][2][2];
76  };
81  virtual bool GetNextFaceCoordinates(Coords *result) = 0;
82 protected:
89  float scale;
94  double height, width;
97 
105  void SetCrop();
110  void ClipFace(Coords *face);
115  bool GiveClipFaceResult(Coords * result);
116 private:
118  std::vector<MeshRemapper::ArrayCoords> face_list;
119 };
120 
121 #endif
122 
bool GiveClipFaceResult(Coords *result)
Get a face that was produced by ClipFace.
An abstract base class for objects that calculate an approximate remap specified by quadrilatrials...
Definition: MeshRemapper.h:43
double crop_x1
Definition: MeshRemapper.h:100
double circle_crop_centre_y
Definition: MeshRemapper.h:100
double crop_x2
Definition: MeshRemapper.h:100
std::vector< MeshRemapper::ArrayCoords > face_list
List for results when clipping faces.
Definition: MeshRemapper.h:118
A class for exchanging pointers to coordinates.
Definition: MeshRemapper.h:60
HuginBase::SrcPanoImage * image
Definition: MeshRemapper.h:85
HuginBase::SrcPanoImage::CropMode crop_mode
Crop mode of the source image.
Definition: MeshRemapper.h:99
virtual void UpdateAndResetIndex()
double(* tex_c)[2][2]
The coordinate in the source image ranging from 0 to 1.
Definition: MeshRemapper.h:64
virtual bool GetNextFaceCoordinates(Coords *result)=0
Get the texture and vertex coordinates for the next face.
VisualizationState * visualization_state
Definition: MeshRemapper.h:83
Model for a panorama.
Definition: Panorama.h:152
void ClipFace(Coords *face)
Crop a face to the source image, return true if there is anything left.
void SetCrop()
Fill the crop values of the MeshRemapper from the source image.
double height
The sizes of the input images in pixels.
Definition: MeshRemapper.h:94
double crop_y1
Definition: MeshRemapper.h:100
float scale
The number number of units between vertex coorinates that gives a pixel in the display.
Definition: MeshRemapper.h:89
double circle_crop_radius_x
Definition: MeshRemapper.h:100
double circle_crop_radius_y
Definition: MeshRemapper.h:100
MeshRemapper(HuginBase::Panorama *m_pano, HuginBase::SrcPanoImage *image, VisualizationState *visualization_state)
HuginBase::PTools::Transform transform
A transform to use to remap the images.
Definition: MeshRemapper.h:96
double vertex_c[2][2][2]
Definition: MeshRemapper.h:75
Holds transformations for Image -&gt; Pano and the other way.
double width
Definition: MeshRemapper.h:94
double tex_c[2][2][2]
Definition: MeshRemapper.h:74
double circle_crop_centre_x
Definition: MeshRemapper.h:100
double crop_y2
Definition: MeshRemapper.h:100
double(* vertex_c)[2][2]
The coordinate in the panorama, in its pixel space.
Definition: MeshRemapper.h:66
All variables of a source image.
Definition: SrcPanoImage.h:194
HuginBase::Panorama * m_pano
Definition: MeshRemapper.h:84
virtual ~MeshRemapper()
A class for exchanging coordinates by value.
Definition: MeshRemapper.h:70