Changeset 1335 for trunk


Ignore:
Timestamp:
Sep 28, 2010, 4:03:23 PM (14 years ago)
Author:
garnier
Message:

some changes to check

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/config/sys/Darwin-g++.gmk

    r1213 r1335  
    6767      OGLLIBS   := $(shell test -f /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib && echo "-L/usr/X11R6/lib -lGLU -lGL -Wl,-dylib_file,/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib")
    6868    else
    69       OGLLIBS   := -L$(OGLHOME)/lib -lGLU -lGL
     69#      OGLLIBS   := -L$(OGLHOME)/lib -lGLU -lGL
     70#      OGLLIBS   := $(OGLLIBS) -F/System/Library/Frameworks/ -framework OpenGL -framework AGL
     71      OGLLIBS   := -F/System/Library/Frameworks/ -framework OpenGL -framework AGL
    7072    endif
    7173  endif
     
    99101      QTLIBPATH   := $(shell test -d $(QTHOME)/lib/qt3/lib && echo "$(QTHOME)/lib/qt3/lib" || echo "$(QTHOME)/lib" )
    100102    else
    101       QTLIBPATH  := -F$(QTHOME)/lib -F$(QTHOME)
     103      QTLIBPATH  := -F$(QTHOME)
    102104    endif
    103105  endif
  • trunk/examples/novice/N03/exampleN03.cc

    r1234 r1335  
    5555#endif
    5656
    57 //#define MAC_OSX_APP 1
     57#define MAC_OSX_APP 1
    5858
    5959//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/source/interfaces/basic/src/G4UIQt.cc

    r1329 r1335  
    3232#ifdef G4UI_BUILD_QT_SESSION
    3333
     34//#define QT_CONNECT_TEST 1
     35
    3436#include "G4Types.hh"
    3537
     
    506508)
    507509{
     510#ifdef QT_CONNECT_TEST
    508511  bool shouldConnect = false;
     512#endif
    509513
    510514#ifdef G4DEBUG_INTERFACES_BASIC
     
    537541    fTabWidget->setSizePolicy(policy);
    538542   
     543#ifdef QT_CONNECT_TEST
    539544    shouldConnect = true;
     545#else
     546#if QT_VERSION >= 0x040500
     547    connect(fTabWidget,   SIGNAL(tabCloseRequested(int)), this, SLOT(TabCloseCallback(int)));
     548#endif
     549    connect(fTabWidget, SIGNAL(currentChanged ( int ) ), SLOT(UpdateTabWidget(int)));
     550#endif
     551
    540552  }
    541553
     
    648660  printf("G4UIQt::AddTabWidget -------\n");
    649661#endif
     662#ifdef QT_CONNECT_TEST
    650663  if (shouldConnect) {
    651664#if QT_VERSION >= 0x040500
     
    654667    connect(fTabWidget, SIGNAL(currentChanged ( int ) ), SLOT(UpdateTabWidget(int)));
    655668  }
     669#endif
    656670  return true;
    657671}
  • trunk/source/visualization/OpenGL/src/G4OpenGLQtViewer.cc

    r1333 r1335  
    982982  G4cout <<  G4endl;
    983983  G4cout << "========= Misc =========" << G4endl;
    984   G4cout << "Press ALT +/- to slow/speed auto rotation/move" << G4endl;
     984  G4cout << "Press ALT +/- to slow/speed rotation/move" << G4endl;
    985985  G4cout << "Press H to reset view" << G4endl;
    986986  G4cout << "Press Esc to exit FullScreen" << G4endl;
  • trunk/source/visualization/OpenGL/src/G4OpenGLViewer.cc

    r1332 r1335  
    931931  G4Vector3D zprime;
    932932 
    933   G4double delta_alpha;
    934   G4double delta_theta;
    935  
    936933  G4Vector3D new_vp;
    937934  G4Vector3D new_up;
    938  
    939   G4double cosalpha;
    940   G4double sinalpha;
    941935 
    942936  G4Vector3D a1;
     
    948942  //phi spin stuff here
    949943 
    950 
    951944#ifdef G4DEBUG_VIS_OGL
    952945  printf("G4OpenGLViewer::rotateScene dx:%f dy:%f delta:%f\n",dx,dy, deltaRotation);
     
    955948  vp = fVP.GetViewpointDirection ().unit();
    956949  up = fVP.GetUpVector ().unit();
    957 
    958 
    959950
    960951  G4Vector3D zPrimeVector = G4Vector3D(up.y()*vp.z()-up.z()*vp.y(),
    961952                             up.z()*vp.x()-up.x()*vp.z(),
    962953                             up.x()*vp.y()-up.y()*vp.x());
    963   G4long zPrimeVectorX = up.y()*vp.z()-up.z()*vp.y();
    964   G4long zPrimeVectorY = up.z()*vp.x()-up.x()*vp.z();
    965   G4long zPrimeVectorZ = up.x()*vp.y()-up.y()*vp.x();
    966954
    967955  viewPoint = vp/deltaRotation + (zPrimeVector*dx - up*dy) ;
     
    970958                       viewPoint.x()*zPrimeVector.y()-viewPoint.y()*zPrimeVector.x());
    971959
    972   G4long new_upLenLong = sqrt((G4long)new_up.x()*(G4long)new_up.x()+(G4long)new_up.y()*(G4long)new_up.y()+(G4long)new_up.z()*(G4long)new_up.z());
    973   //  new_up = new_up/new_upLenLong;
    974   //  G4double new_upLenDouble = new_up.x()*new_up.x()+new_up.y()*new_up.y()+new_up.z()*new_up.z();
    975 
    976   G4Vector3D new_upDiv = G4Vector3D((G4double)(new_up.x()/new_upLenLong),
    977                                     (G4double)(new_up.y()/new_upLenLong),
    978                                     (G4double)(new_up.z()/new_upLenLong));
    979 
    980   G4Vector3D new_upPrec = G4Vector3D(((G4double)(((G4long)viewPoint.y()*(G4long)zPrimeVector.z()
    981                                                   -(G4long)viewPoint.z()*(G4long)zPrimeVector.y())/new_upLenLong)),
    982                                      ((G4double)(((G4long)viewPoint.z()*(G4long)zPrimeVector.x()
    983                                                   -(G4long)viewPoint.x()*(G4long)zPrimeVector.z())/new_upLenLong)),
    984                                      ((G4double)(((G4long)viewPoint.x()*(G4long)zPrimeVector.y()
    985                                                   -(G4long)viewPoint.y()*(G4long)zPrimeVector.x())/new_upLenLong)));
    986960  G4Vector3D new_upUnit = new_up.unit();
    987961 
    988962 
    989 #ifdef G4DEBUG_VIS_OGL
    990   printf("G4OpenGLViewer::rotateScene     up: %.10lf %.10lf %.10lf len:%.10lf lenLong:%.10lf %f\n",up.x(),up.y(),up.z(), up.mag(),new_upLenLong,new_upLenLong);
    991   printf("G4OpenGLViewer::rotateScene NEW new up UNIT / %.10lf %.10lf %.10lf\n",new_upUnit.x(),new_upUnit.y(),new_upUnit.z());
    992   printf("G4OpenGLViewer::rotateScene NEW new up Prec: %.10lf %.10lf %.10lf\n",new_upPrec.x(),(viewPoint.z()*zPrimeVectorX-viewPoint.x()*zPrimeVectorZ),new_upPrec.z());
    993   printf("G4OpenGLViewer::rotateScene NEW new up Div: %.10lf %.10lf %.10lf\n",new_upDiv.x(),new_upDiv.y(),new_upDiv.z());
    994   printf("G4OpenGLViewer::rotateScene     vp: %f %f %f\n",vp.x(),vp.y(),vp.z());
    995 
    996   viewPoint = viewPoint*deltaRotation;
    997 
    998   printf("G4OpenGLViewer::rotateScene NEW --new vp: %f %f %f\n",viewPoint.x(),viewPoint.y(),viewPoint.z());
    999 #endif
    1000963
    1001964   fVP.SetUpVector(new_upUnit);
Note: See TracChangeset for help on using the changeset viewer.