Hugin trunk 0.1
Loading...
Searching...
No Matches
Namespaces | Macros | Functions
PanoToolsTransformGPU.cpp File Reference

GPU shader program conversion for PTools::Transform. More...

#include <hugin_config.h>
#include <stdlib.h>
#include "PanoToolsInterface.h"
#include <iostream>
#include <iomanip>
Include dependency graph for PanoToolsTransformGPU.cpp:

Go to the source code of this file.

Namespaces

namespace  HuginBase
 mainly consists of wrapper around the pano tools library, to assist in ressource management and to provide a nicer interface.
 
namespace  HuginBase::PTools
 

Macros

#define distanceparam   (*((double*)params))
 
#define shift   (*((double*)params))
 
#define var0   ((double*)params)[0]
 
#define var1   ((double*)params)[1]
 
#define var2   ((double*)params)[2]
 
#define var3   ((double*)params)[3]
 
#define var4   ((double*)params)[4]
 
#define var5   ((double*)params)[5]
 
#define mp   ((struct MakeParams*)params)
 
#define DISCARD   "{ discardA = 0.0; discardB = 1.0; }"
 

Functions

static void rotate_erect_glsl (ostringstream &oss, const void *params)
 
static void resize_glsl (ostringstream &oss, const void *params)
 
static void vert_glsl (ostringstream &oss, const void *params)
 
static void horiz_glsl (ostringstream &oss, const void *params)
 
static void shear_glsl (ostringstream &oss, const void *params)
 
static void erect_pano_glsl (ostringstream &oss, const void *params)
 
static void erect_rect_glsl (ostringstream &oss, const void *params)
 
static void erect_sphere_tp_glsl (ostringstream &oss, const void *params)
 
static void sphere_tp_erect_glsl (ostringstream &oss, const void *params)
 
static void vertical_glsl (ostringstream &oss, const void *params)
 
static void deregister_glsl (ostringstream &oss, const void *params)
 
static void radial_glsl (ostringstream &oss, const void *params)
 
static void pano_sphere_tp_glsl (ostringstream &oss, const void *params)
 
static void rect_sphere_tp_glsl (ostringstream &oss, const void *params)
 
static void persp_sphere_glsl (ostringstream &oss, const void *params)
 
static void erect_mercator_glsl (ostringstream &oss, const void *params)
 
static void erect_millercylindrical_glsl (ostringstream &oss, const void *params)
 
static void erect_lambert_glsl (ostringstream &oss, const void *params)
 
static void erect_transmercator_glsl (ostringstream &oss, const void *params)
 
static void erect_sinusoidal_glsl (ostringstream &oss, const void *params)
 
static void erect_lambertazimuthal_glsl (ostringstream &oss, const void *params)
 
static void erect_hammer_glsl (ostringstream &oss, const void *params)
 
static void erect_arch_glsl (ostringstream &oss, const void *params)
 
static void erect_stereographic_glsl (ostringstream &oss, const void *params)
 
static void stereographic_erect_glsl (ostringstream &oss, const void *params)
 
static void erect_albersequalareaconic_glsl (ostringstream &oss, const void *params)
 
static void lambertazimuthal_erect_glsl (ostringstream &oss, const void *params)
 
static void sphere_tp_equisolid_glsl (ostringstream &oss, const void *params)
 
static void sphere_tp_orthographic_glsl (ostringstream &oss, const void *params)
 
static void orthographic_sphere_tp_glsl (ostringstream &oss, const void *params)
 
static void sphere_tp_thoby_glsl (ostringstream &oss, const void *params)
 
static void thoby_sphere_tp_glsl (ostringstream &oss, const void *params)
 
static void plane_transfer_to_camera_glsl (ostringstream &oss, const void *params)
 

Detailed Description

GPU shader program conversion for PTools::Transform.

Author
Andrew Mihal

$Id$

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this software. If not, see http://www.gnu.org/licenses/.

Definition in file PanoToolsTransformGPU.cpp.

Macro Definition Documentation

◆ DISCARD

#define DISCARD   "{ discardA = 0.0; discardB = 1.0; }"

Definition at line 51 of file PanoToolsTransformGPU.cpp.

◆ distanceparam

#define distanceparam   (*((double*)params))

Definition at line 39 of file PanoToolsTransformGPU.cpp.

◆ mp

Definition at line 47 of file PanoToolsTransformGPU.cpp.

◆ shift

#define shift   (*((double*)params))

Definition at line 40 of file PanoToolsTransformGPU.cpp.

◆ var0

#define var0   ((double*)params)[0]

Definition at line 41 of file PanoToolsTransformGPU.cpp.

◆ var1

#define var1   ((double*)params)[1]

Definition at line 42 of file PanoToolsTransformGPU.cpp.

◆ var2

#define var2   ((double*)params)[2]

Definition at line 43 of file PanoToolsTransformGPU.cpp.

◆ var3

#define var3   ((double*)params)[3]

Definition at line 44 of file PanoToolsTransformGPU.cpp.

◆ var4

#define var4   ((double*)params)[4]

Definition at line 45 of file PanoToolsTransformGPU.cpp.

◆ var5

#define var5   ((double*)params)[5]

Definition at line 46 of file PanoToolsTransformGPU.cpp.

Function Documentation

◆ deregister_glsl()

static void deregister_glsl ( ostringstream &  oss,
const void params 
)
static

Definition at line 155 of file PanoToolsTransformGPU.cpp.

References threshold(), var1, var2, var3, and var4.

Referenced by HuginBase::PTools::Transform::emitGLSL().

◆ erect_albersequalareaconic_glsl()

static void erect_albersequalareaconic_glsl ( ostringstream &  oss,
const void params 
)
static

Definition at line 338 of file PanoToolsTransformGPU.cpp.

References DISCARD, M_PI, mp, and threshold().

Referenced by HuginBase::PTools::Transform::emitGLSL().

◆ erect_arch_glsl()

static void erect_arch_glsl ( ostringstream &  oss,
const void params 
)
static

Definition at line 297 of file PanoToolsTransformGPU.cpp.

References distanceparam, and threshold().

Referenced by HuginBase::PTools::Transform::emitGLSL().

◆ erect_hammer_glsl()

static void erect_hammer_glsl ( ostringstream &  oss,
const void params 
)
static

Definition at line 282 of file PanoToolsTransformGPU.cpp.

References DISCARD, distanceparam, M_PI, and threshold().

Referenced by HuginBase::PTools::Transform::emitGLSL().

◆ erect_lambert_glsl()

static void erect_lambert_glsl ( ostringstream &  oss,
const void params 
)
static

Definition at line 240 of file PanoToolsTransformGPU.cpp.

References distanceparam, and threshold().

Referenced by HuginBase::PTools::Transform::emitGLSL().

◆ erect_lambertazimuthal_glsl()

static void erect_lambertazimuthal_glsl ( ostringstream &  oss,
const void params 
)
static

Definition at line 265 of file PanoToolsTransformGPU.cpp.

References DISCARD, distanceparam, M_PI, and threshold().

Referenced by HuginBase::PTools::Transform::emitGLSL().

◆ erect_mercator_glsl()

static void erect_mercator_glsl ( ostringstream &  oss,
const void params 
)
static

Definition at line 228 of file PanoToolsTransformGPU.cpp.

References distanceparam, and threshold().

Referenced by HuginBase::PTools::Transform::emitGLSL().

◆ erect_millercylindrical_glsl()

static void erect_millercylindrical_glsl ( ostringstream &  oss,
const void params 
)
static

Definition at line 234 of file PanoToolsTransformGPU.cpp.

References distanceparam, and threshold().

Referenced by HuginBase::PTools::Transform::emitGLSL().

◆ erect_pano_glsl()

static void erect_pano_glsl ( ostringstream &  oss,
const void params 
)
static

Definition at line 95 of file PanoToolsTransformGPU.cpp.

References distanceparam, and threshold().

Referenced by HuginBase::PTools::Transform::emitGLSL().

◆ erect_rect_glsl()

static void erect_rect_glsl ( ostringstream &  oss,
const void params 
)
static

Definition at line 101 of file PanoToolsTransformGPU.cpp.

References distanceparam, and threshold().

Referenced by HuginBase::PTools::Transform::emitGLSL().

◆ erect_sinusoidal_glsl()

static void erect_sinusoidal_glsl ( ostringstream &  oss,
const void params 
)
static

Definition at line 258 of file PanoToolsTransformGPU.cpp.

References DISCARD, distanceparam, M_PI, and threshold().

Referenced by HuginBase::PTools::Transform::emitGLSL().

◆ erect_sphere_tp_glsl()

static void erect_sphere_tp_glsl ( ostringstream &  oss,
const void params 
)
static

Definition at line 108 of file PanoToolsTransformGPU.cpp.

References distanceparam, and threshold().

Referenced by HuginBase::PTools::Transform::emitGLSL().

◆ erect_stereographic_glsl()

static void erect_stereographic_glsl ( ostringstream &  oss,
const void params 
)
static

Definition at line 309 of file PanoToolsTransformGPU.cpp.

References DISCARD, distanceparam, and threshold().

Referenced by HuginBase::PTools::Transform::emitGLSL().

◆ erect_transmercator_glsl()

static void erect_transmercator_glsl ( ostringstream &  oss,
const void params 
)
static

Definition at line 246 of file PanoToolsTransformGPU.cpp.

References DISCARD, distanceparam, M_PI, and threshold().

Referenced by HuginBase::PTools::Transform::emitGLSL().

◆ horiz_glsl()

static void horiz_glsl ( ostringstream &  oss,
const void params 
)
static

Definition at line 83 of file PanoToolsTransformGPU.cpp.

References shift, and threshold().

Referenced by HuginBase::PTools::Transform::emitGLSL().

◆ lambertazimuthal_erect_glsl()

static void lambertazimuthal_erect_glsl ( ostringstream &  oss,
const void params 
)
static

Definition at line 370 of file PanoToolsTransformGPU.cpp.

References DISCARD, distanceparam, and threshold().

Referenced by HuginBase::PTools::Transform::emitGLSL().

◆ orthographic_sphere_tp_glsl()

static void orthographic_sphere_tp_glsl ( ostringstream &  oss,
const void params 
)
static

Definition at line 401 of file PanoToolsTransformGPU.cpp.

References DISCARD, distanceparam, and threshold().

Referenced by HuginBase::PTools::Transform::emitGLSL().

◆ pano_sphere_tp_glsl()

static void pano_sphere_tp_glsl ( ostringstream &  oss,
const void params 
)
static

Definition at line 178 of file PanoToolsTransformGPU.cpp.

References distanceparam, and threshold().

Referenced by HuginBase::PTools::Transform::emitGLSL().

◆ persp_sphere_glsl()

static void persp_sphere_glsl ( ostringstream &  oss,
const void params 
)
static

Definition at line 206 of file PanoToolsTransformGPU.cpp.

References threshold().

Referenced by HuginBase::PTools::Transform::emitGLSL().

◆ plane_transfer_to_camera_glsl()

static void plane_transfer_to_camera_glsl ( ostringstream &  oss,
const void params 
)
static

Definition at line 434 of file PanoToolsTransformGPU.cpp.

References DISCARD, mp, and threshold().

Referenced by HuginBase::PTools::Transform::emitGLSL().

◆ radial_glsl()

static void radial_glsl ( ostringstream &  oss,
const void params 
)
static

Definition at line 165 of file PanoToolsTransformGPU.cpp.

References threshold(), var0, var1, var2, var3, var4, and var5.

Referenced by HuginBase::PTools::Transform::emitGLSL().

◆ rect_sphere_tp_glsl()

static void rect_sphere_tp_glsl ( ostringstream &  oss,
const void params 
)
static

Definition at line 192 of file PanoToolsTransformGPU.cpp.

References distanceparam, M_PI, and threshold().

Referenced by HuginBase::PTools::Transform::emitGLSL().

◆ resize_glsl()

static void resize_glsl ( ostringstream &  oss,
const void params 
)
static

Definition at line 71 of file PanoToolsTransformGPU.cpp.

References threshold(), var0, and var1.

Referenced by HuginBase::PTools::Transform::emitGLSL().

◆ rotate_erect_glsl()

static void rotate_erect_glsl ( ostringstream &  oss,
const void params 
)
static

Definition at line 53 of file PanoToolsTransformGPU.cpp.

References threshold(), var0, and var1.

Referenced by HuginBase::PTools::Transform::emitGLSL().

◆ shear_glsl()

static void shear_glsl ( ostringstream &  oss,
const void params 
)
static

Definition at line 89 of file PanoToolsTransformGPU.cpp.

References threshold(), var0, and var1.

Referenced by HuginBase::PTools::Transform::emitGLSL().

◆ sphere_tp_equisolid_glsl()

static void sphere_tp_equisolid_glsl ( ostringstream &  oss,
const void params 
)
static

Definition at line 381 of file PanoToolsTransformGPU.cpp.

References distanceparam, and threshold().

Referenced by HuginBase::PTools::Transform::emitGLSL().

◆ sphere_tp_erect_glsl()

static void sphere_tp_erect_glsl ( ostringstream &  oss,
const void params 
)
static

Definition at line 123 of file PanoToolsTransformGPU.cpp.

References distanceparam, M_PI, and threshold().

Referenced by HuginBase::PTools::Transform::emitGLSL().

◆ sphere_tp_orthographic_glsl()

static void sphere_tp_orthographic_glsl ( ostringstream &  oss,
const void params 
)
static

Definition at line 390 of file PanoToolsTransformGPU.cpp.

References DISCARD, distanceparam, and threshold().

Referenced by HuginBase::PTools::Transform::emitGLSL().

◆ sphere_tp_thoby_glsl()

static void sphere_tp_thoby_glsl ( ostringstream &  oss,
const void params 
)
static

Definition at line 413 of file PanoToolsTransformGPU.cpp.

References DISCARD, distanceparam, and threshold().

Referenced by HuginBase::PTools::Transform::emitGLSL().

◆ stereographic_erect_glsl()

static void stereographic_erect_glsl ( ostringstream &  oss,
const void params 
)
static

Definition at line 327 of file PanoToolsTransformGPU.cpp.

References distanceparam, and threshold().

Referenced by HuginBase::PTools::Transform::emitGLSL().

◆ thoby_sphere_tp_glsl()

static void thoby_sphere_tp_glsl ( ostringstream &  oss,
const void params 
)
static

Definition at line 424 of file PanoToolsTransformGPU.cpp.

References distanceparam, and threshold().

Referenced by HuginBase::PTools::Transform::emitGLSL().

◆ vert_glsl()

static void vert_glsl ( ostringstream &  oss,
const void params 
)
static

Definition at line 77 of file PanoToolsTransformGPU.cpp.

References shift, and threshold().

Referenced by HuginBase::PTools::Transform::emitGLSL().

◆ vertical_glsl()

static void vertical_glsl ( ostringstream &  oss,
const void params 
)
static

Definition at line 145 of file PanoToolsTransformGPU.cpp.

References threshold(), var0, var1, var2, var3, and var4.

Referenced by HuginBase::PTools::Transform::emitGLSL().