Commit df0ae468 authored by Luis Peñaranda's avatar Luis Peñaranda
Browse files

added hidden parameter shrink_for_all=false

parent 562c84c4
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -40,6 +40,7 @@ OpenGLCanvas::OpenGLCanvas(QWidget *parent) :
    fov_scale_relation = "Naive";
    visualization = "Moebius";
    auto_fov_max=false;
    shrink_for_all=false;
    zblambda=.1f; // Zorin-Barr transformation lambda
    zbR=1.f; // Zorin-Barr transformation R

@@ -57,6 +58,7 @@ void OpenGLCanvas::change_fov(double f){

    if (fov!=f && f>=1.f && f<=360.f)
        fov=f;
    if (shrink_for_all || visualization=="Moebius" || visualization=="3D Sphere"){
        if (fov<=fov_max)
            scale=1.f;
        //else if (fov>295.f)
@@ -75,6 +77,9 @@ void OpenGLCanvas::change_fov(double f){
            else if (fov_scale_relation == "Logarithm")
                scale=logf(expf(1.f)+(1.f-expf(1.f))*(fov-fov_max)/(360.f-2.f*fov_max));
        }
    }else{
        scale=1.f;
    }

//    scale = 0.3f;

@@ -101,6 +106,7 @@ void OpenGLCanvas::change_fov(int new_fov){
void OpenGLCanvas::change_fov_max(int new_fov_max){
    if(new_fov_max<=360.f&&new_fov_max>=1)
            fov_max=(double)new_fov_max;
    if (shrink_for_all || visualization=="Moebius" || visualization=="3D Sphere"){
        if (fov<=fov_max)
            scale=1.f;
        //else if (fov>295.f)
@@ -119,6 +125,9 @@ void OpenGLCanvas::change_fov_max(int new_fov_max){
            else if (fov_scale_relation == "Logarithm")
                scale=logf(expf(1.f)+(1.f-expf(1.f))*(fov-fov_max)/(360.f-2.f*fov_max));
        }
    }else{
        scale=1.f;
    }
    fprintf(stderr,"change fov_max, fov=%f, fov_max=%f, new scale=%f\n",fov,fov_max,scale);
    emit max_fov_changed((int)fov_max);
    updateGL();
@@ -158,6 +167,7 @@ void OpenGLCanvas::re_center(){
void OpenGLCanvas::change_fov_scale_relation(QString name){

    fov_scale_relation = name;
    if (shrink_for_all || visualization=="Moebius" || visualization=="3D Sphere"){
        if (fov<fov_max) scale = 1.f;
        //else if (fov>295.f) scale = 0.01f;
        else{
@@ -174,6 +184,9 @@ void OpenGLCanvas::change_fov_scale_relation(QString name){
            else if (fov_scale_relation == "Logarithm")
                scale=logf(expf(1.f)+(1.f-expf(1.f))*(fov-fov_max)/(360.f-2.f*fov_max));
        }
    }else{
        scale=1.f;
    }
    fprintf(stderr,"changed scale relation, scale=%f, fov_max=%f\n",scale,fov_max);
    updateGL();

+1 −0
Original line number Diff line number Diff line
@@ -71,6 +71,7 @@ private:
    QString fov_scale_relation;
    QString visualization;
    bool auto_fov_max;
    bool shrink_for_all;
    float zblambda,zbR; // parameters of the Zorin-Barr transformation

    Chronos time_time;