Newer
Older
#include "glincludes.h"
class OpenGLCanvas:
public QGLWidget,
public FileRead
{
Q_OBJECT
public:
explicit OpenGLCanvas(QWidget *parent = 0);
protected:
void load_image(const char *new_image);
void initializeGL();
void resizeGL(int w, int h);
void paintGL();
void define_texture_coordinates(float *texCoord, int m, int n, float min_phi, float max_phi, float min_lambda, float max_lambda);
void vertex_transformation(float *positions, int m, int n, float center_lambda, float center_phi, float fov_rads, float scale);
void load_sphere_mesh(float *positions, int m, int n);
float calculate_extent(float fov_rads);
void define_triangle_indices(unsigned int * indices, int m, int n);
void mousePressEvent(QMouseEvent *event);
void mouseMoveEvent(QMouseEvent *event);
void change_fov(int new_fov);
void change_fov_max(int new_fov_max);
// void change_scale(double s);
void change_center_lambda(double lambda);
void change_center_phi(double phi);
void change_fov_scale_relation(QString name);
void change_visualization(QString name);
double fov_max; // the \phi_{max} on the technote
double scale;
double center_lambda;
double center_phi;
QString fov_scale_relation;
QString visualization;
Chronos time_time;
QTimer time_timer;
int time_frames;
double time_start;
double time_fps;
unsigned int numberOfIndices;
unsigned int * triangleIndices;
float * verticesPositions;
float * textureCoordinates;
//float windowWidth;
//float windowHeight;
char* shader_dir;
char* input_image_file;
int image_size_x;
int image_size_y;
QPoint lastPos; // mouse click position