[an error occurred while processing this directive]
Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

MeshRemapper Class Reference

An abstract base class for objects that calculate an approximate remap specified by quadrilatrials. More...

#include <MeshRemapper.h>

Inheritance diagram for MeshRemapper:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 MeshRemapper (HuginBase::Panorama *m_pano, unsigned int image_number, ViewState *view_state)
virtual ~MeshRemapper ()
virtual void UpdateAndResetIndex ()
virtual bool GetNextFaceCoordinates (Coords *result)=0
 Get the texture and vertex coordinates for the next face.

Protected Member Functions

void SetCrop ()
 Fill the crop values of the MeshRemapper from the source image.
void ClipFace (Coords *face)
 Crop a face to the source image, return true if there is anything left.
bool GiveClipFaceResult (Coords *result)
 Get a face that was produced by ClipFace.

Protected Attributes

ViewStateview_state
HuginBase::Panoramam_pano
unsigned int image_number
float scale
 The number number of units between vertex coorinates that gives a pixel in the display.
double height
 The sizes of the input images in pixels.
double width
 The sizes of the input images in pixels.
HuginBase::PTools::Transform transform
 A transform to use to remap the images.
HuginBase::SrcPanoImage::CropMode crop_mode
 Crop mode of the source image.
double crop_x1
double crop_x2
double crop_y1
double crop_y2
double circle_crop_centre_x
double circle_crop_centre_y
double circle_crop_radius_x
double circle_crop_radius_y
bool circle_crop

Detailed Description

An abstract base class for objects that calculate an approximate remap specified by quadrilatrials.

Each quadrilatrial has vertex coordinates and texture coordinates. The texture coordinates specify for each vertex a point on the image to be mapped to that vertex location, where the range 0 to 1 in either direction is the entirity of the image. The vertex locations are the coordinates in the output in pixels. (They are scaled down to fit in the preview).

A MeshManager then converts the faces specifed into a format sutible for the whatever graphics system is being used to draw them.


Constructor & Destructor Documentation

MeshRemapper::MeshRemapper HuginBase::Panorama m_pano,
unsigned int  image_number,
ViewState view_state
 

MeshRemapper::~MeshRemapper  )  [virtual]
 


Member Function Documentation

void MeshRemapper::ClipFace Coords face  )  [protected]
 

Crop a face to the source image, return true if there is anything left.

SetCrop() must have been called beforehand with up to date information.

Returns:
true if anything remains, false if the entire face was removed.

virtual bool MeshRemapper::GetNextFaceCoordinates Coords result  )  [pure 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.

Implemented in ChoosyRemapper, LayoutRemapper, TexCoordRemapper, and VertexCoordRemapper.

bool MeshRemapper::GiveClipFaceResult Coords result  )  [protected]
 

Get a face that was produced by ClipFace.

Parameters:
result Place to copy the face to. The pointers in result must be valid.
Returns:
true if a valid face was returned, false if there are no faces.

void MeshRemapper::SetCrop  )  [protected]
 

Fill the crop values of the MeshRemapper from the source image.

void MeshRemapper::UpdateAndResetIndex  )  [virtual]
 

Reimplemented in ChoosyRemapper, LayoutRemapper, TexCoordRemapper, and VertexCoordRemapper.


Member Data Documentation

bool MeshRemapper::circle_crop [protected]
 

double MeshRemapper::circle_crop_centre_x [protected]
 

double MeshRemapper::circle_crop_centre_y [protected]
 

double MeshRemapper::circle_crop_radius_x [protected]
 

double MeshRemapper::circle_crop_radius_y [protected]
 

HuginBase::SrcPanoImage::CropMode MeshRemapper::crop_mode [protected]
 

Crop mode of the source image.

double MeshRemapper::crop_x1 [protected]
 

double MeshRemapper::crop_x2 [protected]
 

double MeshRemapper::crop_y1 [protected]
 

double MeshRemapper::crop_y2 [protected]
 

double MeshRemapper::height [protected]
 

The sizes of the input images in pixels.

Children should use this to scale their texture coordinates since the Tranform uses image pixels rather than scaling each image to the range 0 to 1.

unsigned int MeshRemapper::image_number [protected]
 

HuginBase::Panorama* MeshRemapper::m_pano [protected]
 

float MeshRemapper::scale [protected]
 

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

HuginBase::PTools::Transform MeshRemapper::transform [protected]
 

A transform to use to remap the images.

ViewState* MeshRemapper::view_state [protected]
 

double MeshRemapper::width [protected]
 

The sizes of the input images in pixels.

Children should use this to scale their texture coordinates since the Tranform uses image pixels rather than scaling each image to the range 0 to 1.


The documentation for this class was generated from the following files:

Generated on Mon Sep 20 01:01:34 2010 for Hugintrunk by doxygen 1.3.9.1