LayoutRemapper Class Reference

Draw undistored images, but with the correct centre position. More...

#include <LayoutRemapper.h>

Inheritance diagram for LayoutRemapper:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 LayoutRemapper (HuginBase::Panorama *m_pano, HuginBase::SrcPanoImage *image, VisualizationState *visualization_state)
virtual void UpdateAndResetIndex ()
virtual bool GetNextFaceCoordinates (Coords *result)
 Get the texture and vertex coordinates for the next face.
void setScale (double scale)
 Set the size to draw the images.

Private Attributes

double scale
 The number number of units between vertex coorinates that gives a pixel in the display.
bool done
ArrayCoords face

Detailed Description

Draw undistored images, but with the correct centre position.

Must be given a scale to draw with, using SetScale.

Definition at line 32 of file LayoutRemapper.h.


Constructor & Destructor Documentation

LayoutRemapper::LayoutRemapper HuginBase::Panorama m_pano,
HuginBase::SrcPanoImage image,
VisualizationState visualization_state
 

Definition at line 34 of file LayoutRemapper.cpp.

References face.


Member Function Documentation

bool LayoutRemapper::GetNextFaceCoordinates Coords *  result  )  [virtual]
 

Get the texture and vertex coordinates for the next face.

The coordinates are ordered [left / right][top / bottom][x coord / y coord].

Returns:
false once specified all faces, true otherwise.

Implements MeshRemapper.

Definition at line 113 of file LayoutRemapper.cpp.

References done, and face.

void LayoutRemapper::setScale double  scale  ) 
 

Set the size to draw the images.

Specify the maximum dimension you would like the image to have. The actual size of the image will have this maximum dimension, and the same aspect ratio as the original image file.

Definition at line 128 of file LayoutRemapper.cpp.

References scale.

Referenced by MeshManager::MeshInfo::Update().

void LayoutRemapper::UpdateAndResetIndex  )  [virtual]
 

Todo:
Offset the centre position for images in brackets, when showing all brackets together.
I think a good offset would be about scale * bracket number / 5, assuming bracket numbers are a sequence of consecutive integers starting at 0.

Reimplemented from MeshRemapper.

Definition at line 52 of file LayoutRemapper.cpp.

References HuginBase::PTools::Transform::createInvTransform(), done, face, VisualizationState::GetOptions(), M_PI, scale, and HuginBase::PTools::Transform::transformImgCoord().


Member Data Documentation

bool LayoutRemapper::done [private]
 

Definition at line 48 of file LayoutRemapper.h.

Referenced by GetNextFaceCoordinates(), and UpdateAndResetIndex().

ArrayCoords LayoutRemapper::face [private]
 

Definition at line 49 of file LayoutRemapper.h.

Referenced by GetNextFaceCoordinates(), LayoutRemapper(), and UpdateAndResetIndex().

double LayoutRemapper::scale [private]
 

The number number of units between vertex coorinates that gives a pixel in the display.

Reimplemented from MeshRemapper.

Definition at line 47 of file LayoutRemapper.h.

Referenced by setScale(), and UpdateAndResetIndex().


The documentation for this class was generated from the following files:
Generated on Thu Apr 17 01:25:48 2014 for Hugintrunk by  doxygen 1.3.9.1