23 #ifndef _MESHMANAGER_H
24 #define _MESHMANAGER_H
47 void RenderMesh(
unsigned int image_number)
const;
159 :
MeshInfo(m_pano, image, visualization_state, layout_mode_on) {
172 static void Convert(
double &x,
double &y,
double &z,
double th,
double ph,
double r);
198 :
MeshInfo(m_pano, image, visualization_state, layout_mode_on) {
a subclass for the panosphere it converts coordinates obtained from an equirectangular projection to ...
PlaneOverviewMeshInfo(const PlaneOverviewMeshInfo &source)
An abstract base class for objects that calculate an approximate remap specified by quadrilatrials...
MeshInfo::MeshCoords3D GetMeshCoords3D(MeshRemapper::Coords &coords)
PanosphereOverviewMeshInfo(HuginBase::Panorama *m_pano, HuginBase::SrcPanoImage *image, VisualizationState *visualization_state, bool layout_mode_on)
MeshInfo::MeshCoords3D GetMeshCoords3D(MeshRemapper::Coords &coords)
MeshInfo * ObtainMeshInfo(HuginBase::SrcPanoImage *, bool layout_mode_on)
MeshInfo::Coord3D GetCoord3D(hugin_utils::FDiff2D &coord)
void CompileList()
Use the remapper to create the display list.
MeshInfo(HuginBase::Panorama *m_pano, HuginBase::SrcPanoImage *image, VisualizationState *visualization_state, bool layout_mode_on)
Constructor: Creates the mesh for a given image of a panorama.
subclass for the plane overview mode.
PlaneOverviewMeshManager(HuginBase::Panorama *pano, VisualizationState *visualization_state)
A class for exchanging pointers to coordinates.
PreviewMeshManager(HuginBase::Panorama *pano, VisualizationState *visualization_state)
void SetSrcImage(HuginBase::SrcPanoImage *image)
void SetLayoutScale(double scale)
PreviewMeshInfo(const PreviewMeshInfo &source)
MeshRemapper * remap
The ramapper we should use.
static MeshCoords3D GetMeshCoords3D(MeshRemapper::Coords &coords, VisualizationState *state)
PlaneOverviewMeshInfo(HuginBase::Panorama *m_pano, HuginBase::SrcPanoImage *image, VisualizationState *visualization_state, bool layout_mode_on)
bool GetLayoutMode() const
return if layout mode is active
double vertex_coords[2][2][3]
MeshInfo::Coord3D GetCoord3D(hugin_utils::FDiff2D &coord)
virtual void AfterCompile()
unsigned int display_list_number
HuginBase::SrcPanoImage image
MeshInfo * ObtainMeshInfo(HuginBase::SrcPanoImage *, bool layout_mode_on)
HuginBase::Panorama * m_pano
HuginBase::Panorama * m_pano
std::vector< MeshInfo * > meshes
void Update()
Recreate the mesh when the image or panorama it represents changes.
static MeshCoords3D GetMeshCoords3D(MeshRemapper::Coords &coords, VisualizationState *state)
static void Convert(double &x, double &y, double &z, double th, double ph, double r)
convert from spherical to cartesian coordinates
void CleanMeshes()
Remove meshes for images that have been deleted.
virtual MeshInfo::Coord3D GetCoord3D(hugin_utils::FDiff2D &)=0
MeshInfo::Coord3D GetCoord3D(hugin_utils::FDiff2D &coord)
MeshInfo::MeshCoords3D GetMeshCoords3D(MeshRemapper::Coords &coords)
PanosphereOverviewMeshManager(HuginBase::Panorama *pano, VisualizationState *visualization_state)
VisualizationState * visualization_state
static const double scale
double tex_coords[2][2][2]
VisualizationState * m_visualization_state
A MeshManager handles the graphics system representation of a remapping, by creating OpenGL display l...
Handles the remapper and a display list for a specific image.
virtual MeshInfo * ObtainMeshInfo(HuginBase::SrcPanoImage *, bool layout_mode_on)=0
MeshInfo * ObtainMeshInfo(HuginBase::SrcPanoImage *, bool layout_mode_on)
static Coord3D GetCoord3D(hugin_utils::FDiff2D &coord, VisualizationState *state)
static const double scale_diff
scale factor to be used for the layout mode TODO: test this for more scenarios
static MeshCoords3D GetMeshCoords3D(MeshRemapper::Coords &coords, VisualizationState *state)
void RenderMesh(unsigned int image_number) const
a class to keep data of a single rectangle with texture coordinates
PanosphereOverviewMeshInfo(const PanosphereOverviewMeshInfo &source)
void SetLayoutMode(bool state)
Turn layout mode on or off.
void SetScaleFactor(double scale)
virtual MeshInfo::MeshCoords3D GetMeshCoords3D(MeshRemapper::Coords &coords)=0
virtual void BeforeCompile()
subclass of MeshInfo for the preview It actually does nothing in addition to the base class ...
Coord3D(hugin_utils::FDiff2D &coord)
All variables of a source image.
static Coord3D GetCoord3D(hugin_utils::FDiff2D &coord, VisualizationState *state)
void CallList() const
Draw the mesh.
PreviewMeshInfo(HuginBase::Panorama *m_pano, HuginBase::SrcPanoImage *image, VisualizationState *visualization_state, bool layout_mode_on)
static Coord3D GetCoord3D(hugin_utils::FDiff2D &coord, VisualizationState *state)
a class to handle a 3D point
MeshManager(HuginBase::Panorama *pano, VisualizationState *visualization_state)
unsigned int GetDisplayList(unsigned int image_number) const