MeshRemapper.h

Go to the documentation of this file.
00001 // -*- c-basic-offset: 4 -*-
00002 
00023 #ifndef _MESHREMAPPER_H
00024 #define _MESHREMAPPER_H
00025 
00026 #include <vector>
00027 #include <panodata/Panorama.h>
00028 #include <panotools/PanoToolsInterface.h>
00029 
00030 class VisualizationState;
00031 
00043 class MeshRemapper
00044 {
00045 public:
00046     MeshRemapper(HuginBase::Panorama *m_pano, HuginBase::SrcPanoImage * image,
00047                          VisualizationState *visualization_state);
00048     virtual ~MeshRemapper();
00049     virtual void UpdateAndResetIndex();
00060     class Coords
00061     {
00062     public:
00064         double (*tex_c)[2][2];
00066         double (*vertex_c)[2][2];
00067     };
00068     
00070     class ArrayCoords
00071     {
00072     public:
00073         
00074         double tex_c[2][2][2];
00075         double vertex_c[2][2][2];
00076     };    
00081     virtual bool GetNextFaceCoordinates(Coords *result) = 0;
00082 protected:
00083     VisualizationState *visualization_state;
00084     HuginBase::Panorama *m_pano;
00085     HuginBase::SrcPanoImage * image;
00089     float scale;
00094     double height, width;
00096     HuginBase::PTools::Transform transform;
00097     
00099     HuginBase::SrcPanoImage::CropMode crop_mode;
00100     double crop_x1, crop_x2, crop_y1, crop_y2,
00101            circle_crop_centre_x, circle_crop_centre_y,
00102            circle_crop_radius_x, circle_crop_radius_y;
00103     bool circle_crop;
00105     void SetCrop(); 
00110     void ClipFace(Coords *face);
00115     bool GiveClipFaceResult(Coords * result);
00116 private:
00118     std::vector<MeshRemapper::ArrayCoords> face_list;
00119 };
00120 
00121 #endif
00122 

Generated on Tue Sep 2 01:25:36 2014 for Hugintrunk by  doxygen 1.3.9.1