]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Porting on Mandriva 64
authorapo <apo@opencascade.com>
Mon, 3 Apr 2006 07:09:44 +0000 (07:09 +0000)
committerapo <apo@opencascade.com>
Mon, 3 Apr 2006 07:09:44 +0000 (07:09 +0000)
43 files changed:
adm_local/unix/config_files/check_opengl.m4
adm_local/unix/config_files/check_pyqt.m4
adm_local/unix/config_files/check_qt.m4
adm_local/unix/config_files/check_qwt.m4
adm_local/unix/config_files/check_sip.m4
adm_local/unix/config_files/check_vtk.m4
adm_local/unix/make_conclude.in
src/GLViewer/GLViewer_Drawer.cxx
src/GLViewer/Makefile.in
src/Qtx/QtxMainWindow.cxx
src/RegistryDisplay/RegWidget.cxx
src/SVTK/SALOME_Actor.cxx
src/SVTK/SALOME_Actor.h
src/SVTK/SVTK_Actor.cxx
src/SVTK/SVTK_CubeAxesActor2D.cxx
src/SVTK/SVTK_CubeAxesDlg.cxx
src/SVTK/SVTK_DeviceActor.cxx
src/SVTK/SVTK_DeviceActor.h
src/SVTK/SVTK_InteractorStyle.cxx
src/SVTK/SVTK_MainWindow.cxx
src/SVTK/SVTK_RectPicker.cxx
src/SVTK/SVTK_RectPicker.h
src/SVTK/SVTK_Renderer.cxx
src/SVTK/SVTK_Renderer.h
src/SVTK/SVTK_View.cxx
src/TOOLSGUI/ToolsGUI_RegWidget.cxx
src/VTKViewer/Makefile.in
src/VTKViewer/VTKViewer_Actor.cxx
src/VTKViewer/VTKViewer_Actor.h
src/VTKViewer/VTKViewer_ConvexTool.cxx
src/VTKViewer/VTKViewer_ConvexTool.h
src/VTKViewer/VTKViewer_ExtractUnstructuredGrid.cxx
src/VTKViewer/VTKViewer_GeometryFilter.cxx
src/VTKViewer/VTKViewer_InteractorStyle.cxx
src/VTKViewer/VTKViewer_InteractorStyle.h
src/VTKViewer/VTKViewer_RenderWindow.cxx
src/VTKViewer/VTKViewer_RenderWindowInteractor.cxx
src/VTKViewer/VTKViewer_ShrinkFilter.cxx
src/VTKViewer/VTKViewer_Trihedron.cxx
src/VTKViewer/VTKViewer_Trihedron.h
src/VTKViewer/VTKViewer_Utilities.cxx
src/VTKViewer/VTKViewer_Utilities.h
src/VTKViewer/VTKViewer_ViewWindow.cxx

index dd43d25a03a6b873d0ddee362a62704078b2bb61..0552a4bb5fa5fa180af84ffd3eb67ff1643bfc10 100644 (file)
@@ -22,122 +22,171 @@ dnl
 AC_DEFUN([CHECK_OPENGL],[
 AC_REQUIRE([AC_PROG_CC])dnl
 AC_REQUIRE([AC_PROG_CPP])dnl
+AC_REQUIRE([AC_LINKER_OPTIONS])dnl
+
+AC_LANG_SAVE
+AC_LANG_CPLUSPLUS
+
 AC_ARG_WITH(opengl,
-   [  --with-opengl=DIR root directory path of OpenGL installation ],
-   [
-      opengl_dir="$withval"
-      local_opengl=yes
-    ], [
-      dirs="/usr/lib /usr/local/lib /opt/graphics/OpenGL/lib /usr/openwin/lib /usr/X11R6/lib"
-    ])dnl
+  [AC_HELP_STRING([--with-opengl=DIR],[root directory path of OpenGL installation])],
+  [opengl_dir="$withval"], 
+  [dirs="/usr/lib${LIB_LOCATION_SUFFIX} /usr/local/lib${LIB_LOCATION_SUFFIX} /opt/graphics/OpenGL/lib${LIB_LOCATION_SUFFIX} /usr/openwin/lib${LIB_LOCATION_SUFFIX} /usr/X11R6/lib${LIB_LOCATION_SUFFIX}"])dnl
 
 AC_CHECKING(for OpenGL)
-
-AC_SUBST(OGL_INCLUDES)
-AC_SUBST(OGL_LIBS)
+AC_CHECKING(for OpenGL headers)
 
 OGL_INCLUDES=""
 OGL_LIBS=""
 
 OpenGL_ok=no
+OpenGL_libs_ok=no
+OpenGL_headers_ok=no
 
 dnl openGL headers
-
 # by default
-
-if test "x$local_opengl" = "xyes" ; then
-   if test -f "${opengl_dir}/include/GL/gl.h" ; then
-      OpenGL_ok=yes
-      OGL_INCLUDES="-I${opengl_dir}/include"
-      if test "x${opengl_dir}" = "x/usr"
-      then
-        OGL_LIBS=""
-      else
-        OGL_LIBS="-L${opengl_dir}/lib"
-      fi
-      AC_MSG_RESULT(select OpenGL distribution in ${opengl_dir})
-   else
-      AC_MSG_RESULT(no gl.h header file in ${opengl_dir}/include/GL)
-   fi
+if test "x${opengl_dir}" != "x" ; then
+  AC_MSG_RESULT(for opengl_dir: $opengl_dir)
+  AC_CHECK_HEADER([${opengl_dir}/include/GL/gl.h],
+                  [OpenGL_headers_ok=yes; OGL_INCLUDES="-I${opengl_dir}/include"],
+                  [OpenGL_headers_ok=no])
+  if test "x${OpenGL_headers_ok}" = "xyes" ; then
+    AC_CHECKING(for default OpenGL library)
+    if test "x${opengl_dir}" = "x/usr" ; then
+      OGL_LIBS=""
+    else
+      OGL_LIBS="-L${opengl_dir}/lib"
+    fi
+    LDFLAGS_old="$LDFLAGS"
+    LDFLAGS="$LDFLAGS $OGL_LIBS"
+    AC_CHECK_LIB([GL],
+                 [glBegin],
+                 [OpenGL_libs_ok=yes],
+                 [OpenGL_libs_ok=no])
+    if test "x${OpenGL_libs_ok}" = "xyes" ; then
+      AC_TRY_LINK([],
+                  [],
+                  [OpenGL_libs_ok=yes ; OpenGL_ok=yes; OGL_LIBS="$OGL_LIBS -lGL"],
+                  [OpenGL_libs_ok=no])
+    fi
+    LDFLAGS="$LDFLAGS_old"
+  fi
 fi
 
-if  test "x$OpenGL_ok" = "xno"
-then
-  AC_CHECK_HEADERS(GL/gl.h, [OpenGL_ok=yes])
+if test "x${OpenGL_headers_ok}" = "xno" ; then
+  AC_CHECK_HEADER(GL/gl.h,
+                  [OpenGL_headers_ok=yes],
+                  [OpenGL_headers_ok=no])
 fi
 
-if  test "x$OpenGL_ok" = "xno"
-then
 # under SunOS ?
+if test "x${OpenGL_headers_ok}" = "xno" ; then
   AC_CHECK_HEADERS(/usr/openwin/share/include/GL/glxmd.h,
-                  [OpenGL_ok=yes]
-                  OGL_INCLUDES="-I/usr/openwin/share/include/")
+                  [OpenGL_headers_ok=yes; OGL_INCLUDES="-I/usr/openwin/share/include/"],
+                  [OpenGL_headers_ok=no])
 fi
 
-if  test "x$OpenGL_ok" = "xno"
-then
 # under IRIX ?
+if test "x${OpenGL_headers_ok}" = "xno" ; then
   AC_CHECK_HEADERS(/opt/graphics/OpenGL/include/GL/glxmd.h,
-                  [OpenGL_ok=yes]
-                  OGL_INCLUDES="-I/opt/graphics/OpenGL/include")
+                  [OpenGL_headers_ok=yes; OGL_INCLUDES="-I/opt/graphics/OpenGL/include"],
+                  [OpenGL_headers_ok=no])
 fi
-if  test "x$OpenGL_ok" = "xno"
-then
+
 # some linux OpenGL servers hide the includes in /usr/X11R6/include/GL
+if test "x${OpenGL_headers_ok}" = "xno" ; then
   AC_CHECK_HEADERS(/usr/X11R6/include/GL/gl.h,
-                  [OpenGL_ok=yes]
-                  OGL_INCLUDES="-I/usr/X11R6/include")
+                  [OpenGL_headers_ok=yes; OGL_INCLUDES="-I/usr/X11R6/include"],
+                  [OpenGL_headers_ok=no])
 fi
 
-if  test "x$OpenGL_ok" = "xyes"
-then
+if test "x${OpenGL_headers_ok}" = "xyes" ; then
   AC_CHECKING(for OpenGL library)
-  OpenGL_ok=no
-  for i in $dirs; do
-    if test -r "$i/libGL.so"; then
-dnl      AC_MSG_RESULT(in $i)
-      if test "x$i" = "x/usr/lib"
-      then
+  for idir in $dirs; do
+    if test -r "${idir}/libGL.so"; then
+      AC_MSG_RESULT(in ${idir})
+      if test "x${idir}" = "x/usr/lib${LIB_LOCATION_SUFFIX}" ; then
         OGL_LIBS=""
       else
-        OGL_LIBS="-L$i"
+        OGL_LIBS="-L${idir}"
       fi
       break
     fi
-# under IRIX ?
-    if test -r "$i/libGL.sl"; then
-dnl      AC_MSG_RESULT(in $i)
-      if test "x$i" = "x/usr/lib"
-      then
+    # under IRIX ?
+    if test -r "${idir}/libGL.sl"; then
+      AC_MSG_RESULT(in ${idir})
+      if test "x${idir}" = "x/usr/lib${LIB_LOCATION_SUFFIX}" ; then
         OGL_LIBS=""
       else
-        OGL_LIBS="-L$i"
+        OGL_LIBS="-L${idir}"
       fi
       break
     fi
   done
   LDFLAGS_old="$LDFLAGS"
   LDFLAGS="$LDFLAGS $OGL_LIBS"
-  AC_CHECK_LIB(GL,glBegin,OpenGL_ok=yes,OpenGL_ok=no)
+  AC_CHECK_LIB([GL],
+               [glBegin],
+               [OpenGL_libs_ok=yes],
+               [OpenGL_libs_ok=no])
+  if test "x${OpenGL_libs_ok}" = "xyes" ; then
+    AC_TRY_LINK([],
+                [],
+                [OpenGL_libs_ok=yes ; OGL_LIBS="$OGL_LIBS -lGL"],
+                [OpenGL_libs_ok=no])
+  fi
   LDFLAGS="$LDFLAGS_old"
 fi
 
-if test "x$OpenGL_ok" = "xyes" ; then
-  OGL_LIBS="$OGL_LIBS -lGL"
+if test "x${OpenGL_libs_ok}" = "xyes" ; then
+  for idir in $dirs; do
+    if test -r "${idir}/libGLU.so"; then
+      AC_MSG_RESULT(in ${idir})
+      if test "x${idir}" = "x/usr/lib${LIB_LOCATION_SUFFIX}" ; then
+        OGL_LIBS=""
+      else
+        OGL_LIBS="-L${idir}"
+      fi
+      break
+    fi
+    # under IRIX ?
+    if test -r "${idir}/libGLU.sl"; then
+      AC_MSG_RESULT(in ${idir})
+      if test "x${idir}" = "x/usr/lib${LIB_LOCATION_SUFFIX}" ; then
+        OGL_LIBS=""
+      else
+        OGL_LIBS="-L${idir}"
+      fi
+      break
+    fi
+  done
+  LDFLAGS_old="$LDFLAGS"
+  LDFLAGS="$LDFLAGS $OGL_LIBS"
+  AC_CHECK_LIB([GLU],
+               [gluBeginSurface],
+               [OpenGL_libs_ok=yes],
+               [OpenGL_libs_ok=no])
+  if test "x${OpenGL_libs_ok}" = "xyes" ; then
+    AC_TRY_LINK([],
+                [],
+                [OpenGL_libs_ok=yes ; OGL_LIBS="$OGL_LIBS -lGLU"],
+                [OpenGL_libs_ok=no])
+  fi
+  LDFLAGS="$LDFLAGS_old"
 fi
 
+if test "x${OpenGL_headers_ok}" = "xyes" ; then
+  if test "x${OpenGL_libs_ok}" = "xyes" ; then
+    OpenGL_ok=yes
+  fi
+fi
 
-OpenGLU_ok=no
-LDFLAGS_old="$LDFLAGS"
-LDFLAGS="$LDFLAGS $OGL_LIBS"
-AC_CHECK_LIB(GLU,gluBeginSurface,OpenGLU_ok=yes,OpenGLU_ok=no)
-LDFLAGS="$LDFLAGS_old"
+AC_MSG_RESULT(for OpenGL_headers_ok: $OpenGL_headers_ok)
+AC_MSG_RESULT(for OpenGL_libs_ok: $OpenGL_libs_ok)
+AC_MSG_RESULT(for OpenGL_ok: $OpenGL_ok)
 
-if test "x$OpenGLU_ok" = "xyes" ; then
-  OGL_LIBS="$OGL_LIBS -lGLU"
-fi
+AC_SUBST(OGL_INCLUDES)
+AC_SUBST(OGL_LIBS)
 
-# Save cache
-AC_CACHE_SAVE
+AC_LANG_RESTORE
 
 ])dnl
index ee024efaf8fc2c8caa136b4e12028a1dfe9d430c..7be124e24b4a5f2d68c2ade5bfefc10cb0f36845 100644 (file)
@@ -4,6 +4,7 @@ AC_DEFUN([CHECK_PYQT],[
 AC_REQUIRE([CHECK_PYTHON])dnl
 AC_REQUIRE([CHECK_QT])dnl
 AC_REQUIRE([CHECK_SIP])dnl
+AC_REQUIRE([AC_LINKER_OPTIONS])dnl
 
 AC_LANG_SAVE
 AC_LANG_CPLUSPLUS
@@ -119,15 +120,15 @@ if test "x${PYQTDIR}" != "x"; then
     fi
   fi
   if test "x$pyqt_lib_ok" == "xno"; then
-    dnl try {PYQTDIR}/lib/python${PYTHON_VERSION}/site-packages
-    if test -d {PYQTDIR}/lib/python${PYTHON_VERSION}/site-packages; then
-      AC_CHECK_FILE(${PYQTDIR}/lib/python${PYTHON_VERSION}/site-packages/libqtcmodule.so,pyqt_lib_ok=yes,pyqt_lib_ok=no)
+    dnl try {PYQTDIR}/lib${LIB_LOCATION_SUFFIX}/python${PYTHON_VERSION}/site-packages
+    if test -d {PYQTDIR}/lib${LIB_LOCATION_SUFFIX}/python${PYTHON_VERSION}/site-packages; then
+      AC_CHECK_FILE(${PYQTDIR}/lib${LIB_LOCATION_SUFFIX}/python${PYTHON_VERSION}/site-packages/libqtcmodule.so,pyqt_lib_ok=yes,pyqt_lib_ok=no)
       if test "x$pyqt_lib_ok" == "xyes"; then
-        PYQT_LIBS="-L${PYQTDIR}/lib/python${PYTHON_VERSION}/site-packages -lqtcmodule"
+        PYQT_LIBS="-L${PYQTDIR}/lib${LIB_LOCATION_SUFFIX}/python${PYTHON_VERSION}/site-packages -lqtcmodule"
       else 
-        AC_CHECK_FILE(${PYQTDIR}/lib/python${PYTHON_VERSION}/site-packages/qt.so,pyqt_lib_ok=yes,pyqt_lib_ok=no)
+        AC_CHECK_FILE(${PYQTDIR}/lib${LIB_LOCATION_SUFFIX}/python${PYTHON_VERSION}/site-packages/qt.so,pyqt_lib_ok=yes,pyqt_lib_ok=no)
         if test "x$pyqt_lib_ok" == "xyes"; then
-          PYQT_LIBS="-L${PYQTDIR}/lib/python${PYTHON_VERSION}/site-packages"
+          PYQT_LIBS="-L${PYQTDIR}/lib${LIB_LOCATION_SUFFIX}/python${PYTHON_VERSION}/site-packages"
         fi
       fi
     fi
@@ -160,30 +161,30 @@ if test "x$pyqt_lib_ok" == "xno"; then
   fi
 fi
 if test "x$pyqt_lib_ok" == "xno"; then
-  dnl try ${PYTHONHOME}/lib/python${PYTHON_VERSION}/site-packages
+  dnl try ${PYTHONHOME}/lib${LIB_LOCATION_SUFFIX}/python${PYTHON_VERSION}/site-packages
   if test "x${PYTHONHOME}" != "x"; then
-    if test -d ${PYTHONHOME}/lib/python${PYTHON_VERSION}/site-packages ; then
-      AC_CHECK_FILE(${PYTHONHOME}/lib/python${PYTHON_VERSION}/site-packages/libqtcmodule.so,pyqt_lib_ok=yes,pyqt_lib_ok=no)
+    if test -d ${PYTHONHOME}/lib${LIB_LOCATION_SUFFIX}/python${PYTHON_VERSION}/site-packages ; then
+      AC_CHECK_FILE(${PYTHONHOME}/lib${LIB_LOCATION_SUFFIX}/python${PYTHON_VERSION}/site-packages/libqtcmodule.so,pyqt_lib_ok=yes,pyqt_lib_ok=no)
       if test "x$pyqt_lib_ok" == "xyes"; then
-        PYQT_LIBS="-L${PYTHONHOME}/lib/python${PYTHON_VERSION}/site-packages -lqtcmodule"
+        PYQT_LIBS="-L${PYTHONHOME}/lib${LIB_LOCATION_SUFFIX}/python${PYTHON_VERSION}/site-packages -lqtcmodule"
       else 
-        AC_CHECK_FILE(${PYTHONHOME}/lib/python${PYTHON_VERSION}/site-packages/qt.so,pyqt_lib_ok=yes,pyqt_lib_ok=no)
+        AC_CHECK_FILE(${PYTHONHOME}/lib${LIB_LOCATION_SUFFIX}/python${PYTHON_VERSION}/site-packages/qt.so,pyqt_lib_ok=yes,pyqt_lib_ok=no)
         if test "x$pyqt_lib_ok" == "xyes"; then
-          PYQT_LIBS="-L${PYTHONHOME}/lib/python${PYTHON_VERSION}/site-packages"
+          PYQT_LIBS="-L${PYTHONHOME}/lib${LIB_LOCATION_SUFFIX}/python${PYTHON_VERSION}/site-packages"
         fi
       fi
     fi
   fi   
 fi
 if test "x$pyqt_lib_ok" == "xno"; then
-  dnl try /usr/lib/python${PYTHON_VERSION}/site-packages
-  AC_CHECK_FILE(/usr/lib/python${PYTHON_VERSION}/site-packages/libqtcmodule.so,pyqt_lib_ok=yes,pyqt_lib_ok=no)
+  dnl try /usr/lib${LIB_LOCATION_SUFFIX}/python${PYTHON_VERSION}/site-packages
+  AC_CHECK_FILE(/usr/lib${LIB_LOCATION_SUFFIX}/python${PYTHON_VERSION}/site-packages/libqtcmodule.so,pyqt_lib_ok=yes,pyqt_lib_ok=no)
   if test "x$pyqt_lib_ok" == "xyes"; then
-    PYQT_LIBS="-L/usr/lib/python${PYTHON_VERSION}/site-packages -lqtcmodule"
+    PYQT_LIBS="-L/usr/lib${LIB_LOCATION_SUFFIX}/python${PYTHON_VERSION}/site-packages -lqtcmodule"
   else 
-    AC_CHECK_FILE(/usr/lib/python${PYTHON_VERSION}/site-packages/qt.so,pyqt_lib_ok=yes,pyqt_lib_ok=no)
+    AC_CHECK_FILE(/usr/lib${LIB_LOCATION_SUFFIX}/python${PYTHON_VERSION}/site-packages/qt.so,pyqt_lib_ok=yes,pyqt_lib_ok=no)
     if test "x$pyqt_lib_ok" == "xyes"; then
-      PYQT_LIBS="-L/usr/lib/python${PYTHON_VERSION}/site-packages"
+      PYQT_LIBS="-L/usr/lib${LIB_LOCATION_SUFFIX}/python${PYTHON_VERSION}/site-packages"
     fi
   fi
 fi
index ab2869c21b1cc31c76d888a91a7d219ff72715fe..ba72a02d4b6c95fcf41399b0b5a32141cadb44ed 100644 (file)
@@ -26,8 +26,14 @@ AC_REQUIRE([AC_PROG_CXX])dnl
 AC_REQUIRE([AC_PROG_CPP])dnl
 AC_REQUIRE([AC_PROG_CXXCPP])dnl
 AC_REQUIRE([CHECK_OPENGL])dnl
+AC_REQUIRE([AC_LINKER_OPTIONS])dnl
 
 AC_CHECKING(for QT)
+
+if test "x$OpenGL_ok" != "xyes" ; then
+   AC_MSG_WARN(Qt needs OpenGL correct configuration, check configure output)
+fi
+
 qt_ok=yes
 
 AC_LANG_SAVE
@@ -117,7 +123,7 @@ then
   then
     LIBS="$LIBS -lqt-mt $OGL_LIBS"
   else
-    LIBS="$LIBS -L$QTDIR/lib -lqt-mt $OGL_LIBS"
+    LIBS="$LIBS -L$QTDIR/lib${LIB_LOCATION_SUFFIX} -lqt-mt $OGL_LIBS"
   fi
 
   CXXFLAGS_old=$CXXFLAGS
@@ -145,8 +151,8 @@ then
          QT_LIBS=" -lqt-mt"
       QT_MT_LIBS=" -lqt-mt"
     else
-         QT_LIBS="-L$QTDIR/lib -lqt-mt"
-      QT_MT_LIBS="-L$QTDIR/lib -lqt-mt"
+         QT_LIBS="-L$QTDIR/lib${LIB_LOCATION_SUFFIX} -lqt-mt"
+      QT_MT_LIBS="-L$QTDIR/lib${LIB_LOCATION_SUFFIX} -lqt-mt"
     fi
   fi
 
@@ -160,6 +166,7 @@ AC_SUBST(UIC)
 
 AC_SUBST(QT_ROOT)
 AC_SUBST(QT_INCLUDES)
+AC_SUBST(QT_MT_INCLUDES)
 AC_SUBST(QT_LIBS)
 AC_SUBST(QT_MT_LIBS)
 AC_SUBST(QT_VERS)
index 13bf909147ba480271412e1db79e227c3a09d191..d9bc23fbf59a314d74d59bc2299dd2ee7bc5509b 100644 (file)
@@ -2,6 +2,7 @@ dnl Copyright (C) 2003  CEA/DEN, EDF R&D
 
 AC_DEFUN([CHECK_QWT],[
 AC_REQUIRE([CHECK_QT])dnl
+AC_REQUIRE([AC_LINKER_OPTIONS])dnl
 
 AC_CHECKING(for qwt)
 
@@ -26,7 +27,7 @@ if test -z $QWTHOME; then
   exits_ok=no  
   if test "x$exits_ok" = "xno"; then
      for d in /usr/local /usr ; do
-        AC_CHECK_FILE(${d}/lib/libqwt.so,exits_ok=yes,exits_ok=no)
+        AC_CHECK_FILE(${d}/lib${LIB_LOCATION_SUFFIX}/libqwt.so,exits_ok=yes,exits_ok=no)
         if test "x$exits_ok" = "xyes"; then
            QWTHOME=$d
            AC_MSG_RESULT(libqwt.so detected in $d/lib)
@@ -91,7 +92,7 @@ then
   then
     LIBS="$LIBS -lqt-mt"
   else
-    LIBS="$LIBS -L$QTDIR/lib -lqt-mt"
+    LIBS="$LIBS -L$QTDIR/lib${LIB_LOCATION_SUFFIX} -lqt-mt"
   fi
   if test "x$QWTHOME" = "x/usr"
   then
index 245f2382ee200c658920e7c611dfef42445ea64a..83af9a907589fbcec47688ccca5c3218a82b25c9 100644 (file)
@@ -3,6 +3,7 @@ dnl Copyright (C) 2003  CEA/DEN, EDF R&D
 AC_DEFUN([CHECK_SIP],[
 AC_REQUIRE([CHECK_PYTHON])dnl
 AC_REQUIRE([CHECK_QT])dnl
+AC_REQUIRE([AC_LINKER_OPTIONS])dnl
 
 sip_ok=yes
 
@@ -110,44 +111,44 @@ else
        fi
 
         if test "x$sip_lib_ok" == "xno" ; then
-            dnl look for (lib)sip.so in ${SIPDIR}/lib/python${PYTHON_VERSION}/site-packages
-           if test -d ${SIPDIR}/lib/python${PYTHON_VERSION}/site-packages ; then
-               AC_CHECK_FILE(${SIPDIR}/lib/python${PYTHON_VERSION}/site-packages/libsip.so,sip_lib_ok=yes,sip_lib_ok=no)
+            dnl look for (lib)sip.so in ${SIPDIR}/lib${LIB_LOCATION_SUFFIX}/python${PYTHON_VERSION}/site-packages
+           if test -d ${SIPDIR}/lib${LIB_LOCATION_SUFFIX}/python${PYTHON_VERSION}/site-packages ; then
+               AC_CHECK_FILE(${SIPDIR}/lib${LIB_LOCATION_SUFFIX}/python${PYTHON_VERSION}/site-packages/libsip.so,sip_lib_ok=yes,sip_lib_ok=no)
                if test "x$sip_lib_ok" == "xyes" ; then
-                   SIP_LIBS="-L${SIPDIR}/lib/python${PYTHON_VERSION}/site-packages -lsip"
+                   SIP_LIBS="-L${SIPDIR}/lib${LIB_LOCATION_SUFFIX}/python${PYTHON_VERSION}/site-packages -lsip"
                else
-                   AC_CHECK_FILE(${SIPDIR}/lib/python${PYTHON_VERSION}/site-packages/sip.so,sip_lib_ok=yes,sip_lib_ok=no)
+                   AC_CHECK_FILE(${SIPDIR}/lib${LIB_LOCATION_SUFFIX}/python${PYTHON_VERSION}/site-packages/sip.so,sip_lib_ok=yes,sip_lib_ok=no)
                    if test "x$sip_lib_ok" == "xyes" ; then
-                       SIP_LIBS="-L${SIPDIR}/lib/python${PYTHON_VERSION}/site-packages"
+                       SIP_LIBS="-L${SIPDIR}/lib${LIB_LOCATION_SUFFIX}/python${PYTHON_VERSION}/site-packages"
                    fi
                fi
            fi
        fi
     fi
     if test "x$sip_lib_ok" == "xno" ; then
-        dnl look for (lib)sip.so in ${PYTHON_PREFIX}/lib/python${PYTHON_VERSION}/site-packages
-       if test -d ${PYTHON_PREFIX}/lib/python${PYTHON_VERSION}/site-packages ; then
-            AC_CHECK_FILE(${PYTHON_PREFIX}/lib/python${PYTHON_VERSION}/site-packages/libsip.so,sip_lib_ok=yes,sip_lib_ok=no)
+        dnl look for (lib)sip.so in ${PYTHON_PREFIX}/lib${LIB_LOCATION_SUFFIX}/python${PYTHON_VERSION}/site-packages
+       if test -d ${PYTHON_PREFIX}/lib${LIB_LOCATION_SUFFIX}/python${PYTHON_VERSION}/site-packages ; then
+            AC_CHECK_FILE(${PYTHON_PREFIX}/lib${LIB_LOCATION_SUFFIX}/python${PYTHON_VERSION}/site-packages/libsip.so,sip_lib_ok=yes,sip_lib_ok=no)
            if test "x$sip_lib_ok" == "xyes" ; then
-               SIP_LIBS="-L${PYTHON_PREFIX}/lib/python${PYTHON_VERSION}/site-packages -lsip"
+               SIP_LIBS="-L${PYTHON_PREFIX}/lib${LIB_LOCATION_SUFFIX}/python${PYTHON_VERSION}/site-packages -lsip"
            else
-               AC_CHECK_FILE(${PYTHON_PREFIX}/lib/python${PYTHON_VERSION}/site-packages/sip.so,sip_lib_ok=yes,sip_lib_ok=no)
+               AC_CHECK_FILE(${PYTHON_PREFIX}/lib${LIB_LOCATION_SUFFIX}/python${PYTHON_VERSION}/site-packages/sip.so,sip_lib_ok=yes,sip_lib_ok=no)
                 if test "x$sip_lib_ok" == "xyes" ; then
-                   SIP_LIBS="-L${PYTHON_PREFIX}/lib/python${PYTHON_VERSION}/site-packages"
+                   SIP_LIBS="-L${PYTHON_PREFIX}/lib${LIB_LOCATION_SUFFIX}/python${PYTHON_VERSION}/site-packages"
                 fi
            fi
        fi
     fi
     if test "x$sip_lib_ok" == "xno" ; then
-        dnl look for (lib)sip.so in /usr/lib/python${PYTHON_VERSION}/site-packages
-       if test -d /usr/lib/python${PYTHON_VERSION}/site-packages ; then
-            AC_CHECK_FILE(/usr/lib/python${PYTHON_VERSION}/site-packages/libsip.so,sip_lib_ok=yes,sip_lib_ok=no)
+        dnl look for (lib)sip.so in /usr/lib${LIB_LOCATION_SUFFIX}/python${PYTHON_VERSION}/site-packages
+       if test -d /usr/lib${LIB_LOCATION_SUFFIX}/python${PYTHON_VERSION}/site-packages ; then
+            AC_CHECK_FILE(/usr/lib${LIB_LOCATION_SUFFIX}/python${PYTHON_VERSION}/site-packages/libsip.so,sip_lib_ok=yes,sip_lib_ok=no)
            if test "x$sip_lib_ok" == "xyes" ; then
-               SIP_LIBS="-L$/usr/lib/python${PYTHON_VERSION}/site-packages -lsip"
+               SIP_LIBS="-L$/usr/lib${LIB_LOCATION_SUFFIX}/python${PYTHON_VERSION}/site-packages -lsip"
            else
-               AC_CHECK_FILE(/usr/lib/python${PYTHON_VERSION}/site-packages/sip.so,sip_lib_ok=yes,sip_lib_ok=no)
+               AC_CHECK_FILE(/usr/lib${LIB_LOCATION_SUFFIX}/python${PYTHON_VERSION}/site-packages/sip.so,sip_lib_ok=yes,sip_lib_ok=no)
                 if test "x$sip_lib_ok" == "xyes" ; then
-                   SIP_LIBS="-L/usr/lib/python${PYTHON_VERSION}/site-packages"
+                   SIP_LIBS="-L/usr/lib${LIB_LOCATION_SUFFIX}/python${PYTHON_VERSION}/site-packages"
                fi
             fi
        fi
index df9245b5de903be1c160a1b0b9c6b232ded6f716..ce56911f4b2b02fc1dfaf05ec68f3ecc185081f7 100644 (file)
@@ -25,6 +25,7 @@ AC_REQUIRE([AC_PROG_CC])dnl
 AC_REQUIRE([AC_PROG_CXX])dnl
 AC_REQUIRE([AC_PROG_CPP])dnl
 AC_REQUIRE([AC_PROG_CXXCPP])dnl
+AC_REQUIRE([AC_LINKER_OPTIONS])dnl
 
 AC_CHECKING(for VTK)
 
@@ -41,13 +42,11 @@ VTKPY_MODULES=""
 
 vtk_ok=no
 
-AC_PATH_X
-
-if test "x$OpenGL_ok" != "xyes"
-then
-   AC_MSG_WARN(vtk needs OpenGL correct configuration, check configure output)
+if test "x$OpenGL_ok" != "xyes" ; then
+   AC_MSG_WARN(VTK needs OpenGL correct configuration, check configure output)
 fi
 
+AC_PATH_X
 if test "x$x_libraries" != "x"
 then
    LXLIB="-L$x_libraries"
@@ -86,8 +85,8 @@ fi
 if test ! -z $VTKHOME
 then
    LOCAL_INCLUDES="-I$VTKHOME/include/vtk $LOCAL_INCLUDES"
-   LOCAL_LIBS="-L$VTKHOME/lib/vtk $LOCAL_LIBS"
-   TRY_LINK_LIBS="-L$VTKHOME/lib/vtk $TRY_LINK_LIBS"
+   LOCAL_LIBS="-L$VTKHOME/lib${LIB_LOCATION_SUFFIX}/vtk -L$VTKHOME/lib${LIB_LOCATION_SUFFIX}/vtk/python $LOCAL_LIBS"
+   TRY_LINK_LIBS="-L$VTKHOME/lib${LIB_LOCATION_SUFFIX}/vtk -L$VTKHOME/lib${LIB_LOCATION_SUFFIX}/vtk/python $TRY_LINK_LIBS"
 fi
 
 dnl vtk headers
@@ -115,10 +114,10 @@ AC_CHECK_HEADER(vtkPlane.h,vtk_ok="yes",vtk_ok="no")
  dnl  VTKPY_MODULES="$VTKHOME/python"
 
    AC_CACHE_VAL(salome_cv_lib_vtk,[
-     AC_TRY_LINK(
-#include "vtkPlane.h"
-,   vtkPlane *p = vtkPlane::New();,
-    eval "salome_cv_lib_vtk=yes",eval "salome_cv_lib_vtk=no")
+     AC_TRY_LINK([#include "vtkPlane.h"],
+                vtkPlane::New(),
+                salome_cv_lib_vtk=yes,
+                salome_cv_lib_vtk=no)
   ])
   vtk_ok="$salome_cv_lib_vtk"
   LIBS="$LIBS_old"
@@ -136,13 +135,11 @@ else
   VTK_MT_LIBS="$LOCAL_LIBS"
 fi
 
-AC_MSG_RESULT("for vtk: $vtk_ok")
+AC_MSG_RESULT(for vtk: $vtk_ok)
 
 AC_LANG_RESTORE
 
 # Save cache
 AC_CACHE_SAVE
 
-])dnl
-
-
+])dnl
\ No newline at end of file
index c79350747cc0dd1bf2df872099c46d5d198f10cc..58b0b8f39f9f1a295aaed28bcf73bd2d521f650a 100644 (file)
@@ -89,7 +89,7 @@ $(LIB_BUILD_SO): $(top_builddir)/lib/salome/%.so: %.so
        ln -sf $(CURDIR)/$< $@ || true
 
 $(LIB): $(LIB_OBJ)
-       @$(LT) --mode=link $(CXX) -shared -rpath $(libdir) -o $@ $(CXXFLAGS) $(LIB_OBJ) $(LDFLAGS) $(LIBS)
+       $(LT) --mode=link $(CXX) -shared -rpath $(libdir) -o $@ $(CXXFLAGS) $(LIB_OBJ) $(LDFLAGS) $(LIBS)
 
 # transform idl reference in appropriate obj file
 ifneq ($(GUI_DISABLE_CORBA),yes)
@@ -111,10 +111,10 @@ BIN_CLIENT_OBJ =
 BIN_SERVER_OBJ = 
 endif
 # transform c file in appropriate libtool obj file (.c)
-BIN_OBJ_C =  $(patsubst %.c,  %.o, $(filter %.c, $(BIN_SRC)))
+BIN_OBJ_C =  $(patsubst %.c,  %.lo, $(filter %.c, $(BIN_SRC)))
 # transform c++ file in appropriate libtool obj file (.cc and .cxx)
-BIN_OBJ_CC = $(patsubst %.cc,  %.o, $(filter %.cc, $(BIN_SRC)))
-BIN_OBJ_CXX = $(patsubst %.cxx,  %.o, $(filter %.cxx, $(BIN_SRC)))
+BIN_OBJ_CC = $(patsubst %.cc,  %.lo, $(filter %.cc, $(BIN_SRC)))
+BIN_OBJ_CXX = $(patsubst %.cxx,  %.lo, $(filter %.cxx, $(BIN_SRC)))
 # all obj file in bin target
 BIN_OBJ = $(BIN_OBJ_CC) $(BIN_OBJ_CXX) $(BIN_OBJ_C) $(BIN_CLIENT_OBJ) $(BIN_SERVER_OBJ) 
 
@@ -127,7 +127,7 @@ $(BIN:%=$(top_builddir)/bin/salome/%) $(TEST_PROGS:%=$(top_builddir)/bin/salome/
        ln -sf $(CURDIR)/$< $@
 
 $(BIN) $(TEST_PROGS): %: %.lo $(BIN_OBJ)
-       $(CXX) $(CPPFLAGS) $(CXXFLAGS) -o $@ $^ $(BIN_LIB) $(LDFLAGSFORBIN) $(LIBSFORBIN)
+       $(LT) --mode=link $(CXX) -rpath $(libdir) -o $@ $^ $(CXXFLAGS) $(CPPFLAGS) $(BIN_LIB) $(LDFLAGSFORBIN) $(LIBSFORBIN)
 
 # copy python scripts in $(top_builddir)/bin/salome
 #
@@ -205,7 +205,8 @@ $(libdir) $(includedir) $(bindir) $(datadir) $(idldir) $(sharedpydir):
 install: $(LIB) $(BIN) $(TEST_PROGS) $(libdir) $(includedir) $(bindir) $(datadir) $(idldir) install-python install-sharedpyqt install-qm install-res
        @for f in X $(LIB); do                                                \
           if test $$f != X; then                                             \
-             ($(LT_INSTALL_LIB) $$f $(libdir)/. || exit 1);                  \
+             echo "($(LT_INSTALL_LIB) '$$f' '$(libdir)/$$f' || exit 1)";     \
+             ($(LT_INSTALL_LIB) "$$f" "$(libdir)/$$f" || exit 1);            \
           fi;                                                                \
        done
        @if ! test -z $(LIB_SWIG) ; then                                      \
@@ -213,13 +214,15 @@ install: $(LIB) $(BIN) $(TEST_PROGS) $(libdir) $(includedir) $(bindir) $(datadir
         fi;                                                                  
        @for f in X $(BIN); do                                                \
           if test $$f != X; then                                             \
-            ($(LT_INSTALL_PROG) $$f $(bindir)/. || exit 1);                  \
+            echo "($(LT_INSTALL_PROG) '$$f' '$(bindir)/$f' || exit 1)";      \
+            ($(LT_INSTALL_PROG) "$$f" "$(bindir)/$f" || exit 1);             \
           fi;                                                                \
        done
 # Install tests programmes in bindir
        @for f in X $(TEST_PROGS); do                                         \
           if test $$f != X; then                                             \
-            ($(LT_INSTALL_PROG) $$f $(bindir)/. || exit 1);                  \
+            echo "($(LT_INSTALL_PROG) '$$f' '$(bindir)/$$f' || exit 1)";     \
+            ($(LT_INSTALL_PROG) "$$f" "$(bindir)/$$f" || exit 1);            \
           fi;                                                                \
        done
 # Install exported includes in includedir
index 9a0f3ef6b02ed5faaaf168498f4ac26717b3a9ec..b63cdda6048f0991362bc0e24255a1edb2cbb923 100644 (file)
@@ -160,7 +160,7 @@ bool GLViewer_TexFont::generateTexture()
     aFindFont.myIsItal = myQFont.italic();
     aFindFont.myIsUndl = myQFont.underline();
     aFindFont.myPointSize = myQFont.pointSize();
-    aFindFont.myViewPortId = (int)QGLContext::currentContext();
+    aFindFont.myViewPortId = size_t(QGLContext::currentContext());
         
     if( TexFontBase.contains( aFindFont ) )
     {
@@ -421,7 +421,7 @@ static GLuint displayListBase( QFont* theFont )
     return aList;
   }
 
-  aFindFont.myViewPortId = (int)aCont;
+  aFindFont.myViewPortId = size_t(aCont);
 
   if ( GLViewer_TexFont::BitmapFontCache.contains( aFindFont ) )
     aList = GLViewer_TexFont::BitmapFontCache[aFindFont];
@@ -431,7 +431,7 @@ static GLuint displayListBase( QFont* theFont )
     QMap<GLViewer_TexFindId, GLuint>::iterator it = GLViewer_TexFont::BitmapFontCache.begin();
     for ( ; it != GLViewer_TexFont::BitmapFontCache.end(); ++it )
     {
-      if ( it.key().myViewPortId == (int)aCont && it.data() > listBase )
+      if ( it.key().myViewPortId == size_t(aCont) && it.data() > listBase )
         listBase = it.data();
     }
     listBase += 256;
@@ -810,7 +810,7 @@ void GLViewer_Drawer::drawGLText( QString text, float x, float y,
 {
   QFont aFont( myFont );
   if( smallFont )
-    aFont.setPointSize( aFont.pointSize() * 0.8 );
+    aFont.setPointSize( int(aFont.pointSize() * 0.8) );
 
   GLfloat scale = textScale() > 0. ? textScale() : 1.;
 
index d921dd29453b57fb2c8bfff6c6f180c3655850ca..ef505528f434d37f80735db3870929a515e82bfd 100644 (file)
@@ -98,6 +98,6 @@ CPPFLAGS+=$(QT_INCLUDES) $(OCC_INCLUDES)
 
 LDFLAGS+=$(QT_MT_LIBS) $(CAS_KERNEL)
 
-LIBS+= -L${GUI_ROOT_DIR}/lib/salome -lsuit -L/usr/X11R6/lib -lGLU
+LIBS+= -L${GUI_ROOT_DIR}/lib/salome -lsuit -L/usr/X11R6/lib@LIB_LOCATION_SUFFIX@ -lGLU
 
 @CONCLUDE@
index b8968ef8c025d5d2c3f1cd8c1493f475b0c24936..5f7ce9a2ed5cdd28533ab4e14d5f3ddadc13dbb3 100644 (file)
@@ -246,7 +246,7 @@ void QtxMainWindow::customEvent( QCustomEvent* e )
 {
   QMainWindow::customEvent( e );
 
-  int mode = (int)e->data();
+  size_t mode = size_t(e->data());
   switch ( mode )
   {
   case WS_Normal:
index 0425cc268980f0abede1b4d12a01dbca6393d64b..b5725644599630c0782e2b96fefe44df1d2a6bc4 100755 (executable)
@@ -353,8 +353,10 @@ QString RegWidget::setlongText( const Registry::Infos &c_info)
   a.append( QString( " )<br> " ) + tr( "in directory" ) + QString( " " ));
   a.append( BOLD( c_info.cdir ) );
   
+  time_t aTime;
   a.append( QString( "<br>" ) + tr( "begins" ) + QString( " " ) );
-  char * t1 = (char * )duplicate(ctime(&c_info.tc_start));
+  aTime = time_t(c_info.tc_start);
+  char * t1 = (char * )duplicate(ctime(&aTime));
   t1 [strlen(t1) -1 ] = ' ';
   a.append( BOLD( t1 ) ); 
   delete [] t1;
@@ -362,7 +364,8 @@ QString RegWidget::setlongText( const Registry::Infos &c_info)
   
   if (c_info.tc_hello != 0 )
     {
-      char * t2 = (char * )duplicate(ctime(&c_info.tc_hello));
+      aTime = time_t(c_info.tc_hello);
+      char * t2 = (char * )duplicate(ctime(&aTime));
       t2 [strlen(t2) -1 ] = ' ';
       a.append( tr( "last signal" ) + QString(" : ") ); 
       a.append( BOLD( t2 ) ); 
@@ -371,7 +374,8 @@ QString RegWidget::setlongText( const Registry::Infos &c_info)
     }
   if ((c_info.tc_end - c_info.difftime) != 0)
     {
-      char * t3 = (char * )duplicate(ctime(&c_info.tc_end));
+      aTime = time_t(c_info.tc_end);
+      char * t3 = (char * )duplicate(ctime(&aTime));
       t3 [strlen(t3) -1 ] = ' ';
       a.append( tr( "ends" ) + QString( " " ) ); 
       a.append( BOLD( t3 ) ); 
@@ -459,6 +463,7 @@ void RegWidget::InfoHistory()
     _history->clear();
   try
     {
+      time_t aTime;
       _serverhistory = _VarComponents->history();
       for (CORBA::ULong i=0; i<_serverhistory->length(); i++)
        {       
@@ -466,9 +471,11 @@ void RegWidget::InfoHistory()
          ASSERT( c_info.name!=NULL);
          QString a;
          a.setNum(int(c_info.pid));
-         char * t1 = (char * )duplicate(ctime(&c_info.tc_start));
+         aTime = time_t(c_info.tc_start);
+         char * t1 = (char * )duplicate(ctime(&aTime));
          t1 [strlen(t1) -1 ] = ' ';
-         char * t2 = (char * )duplicate(ctime(&c_info.tc_end));
+         aTime = time_t(c_info.tc_end);
+         char * t2 = (char * )duplicate(ctime(&aTime));
          t2 [strlen(t2) -1 ] = ' ';
          QListViewItem * item = new QListViewItem(_history, QString(c_info.name),\
                                                   a, QString(c_info.pwname), QString(c_info.machine), \
@@ -499,6 +506,7 @@ void RegWidget::InfoReg()
   _clients->clear();
   try
     {
+      time_t aTime;
       _serverclients = _VarComponents->getall();
       for (CORBA::ULong i=0; i<_serverclients->length(); i++)
        {       
@@ -506,9 +514,11 @@ void RegWidget::InfoReg()
          ASSERT( c_info.name!=NULL);
          QString a;
          a.setNum(int(c_info.pid));
-         char * t1 = (char * )duplicate(ctime(&c_info.tc_start));
+         aTime = time_t(c_info.tc_start);
+         char * t1 = (char * )duplicate(ctime(&aTime));
          t1 [strlen(t1) -1 ] = ' ';
-         char * t2 = (char * )duplicate(ctime(&c_info.tc_hello));
+         aTime = time_t(c_info.tc_hello);
+         char * t2 = (char * )duplicate(ctime(&aTime));
          t2 [strlen(t2) -1 ] = ' ';
          QListViewItem * item = new QListViewItem(_clients, QString(c_info.name),\
                                                   a, QString(c_info.pwname), QString(c_info.machine), \
index 7b803a5b6e1c88d96febbe3f548a26e00f266ac7..65073f127f5cbeb3375ee056f0002eb6ad3b77c1 100644 (file)
@@ -83,12 +83,13 @@ namespace
   {
     int anEdgeId = 0;
     if (vtkCell* aPickedCell = theActor->GetElemCell(theObjId)) {
-      float aPickPosition[3];
+      vtkFloatingPointType aPickPosition[3];
       thePicker->GetPickPosition(aPickPosition);
-      float aMinDist = 1000000.0, aDist = 0;
+      vtkFloatingPointType aMinDist = 1000000.0, aDist = 0;
       for (int i = 0, iEnd = aPickedCell->GetNumberOfEdges(); i < iEnd; i++){
        if(vtkLine* aLine = vtkLine::SafeDownCast(aPickedCell->GetEdge(i))){
-         int subId;  float pcoords[3], closestPoint[3], weights[3];
+         int subId;  
+         vtkFloatingPointType pcoords[3], closestPoint[3], weights[3];
          aLine->EvaluatePosition(aPickPosition,closestPoint,subId,pcoords,aDist,weights);
          if (aDist < aMinDist) {
            aMinDist = aDist;
@@ -267,7 +268,9 @@ SALOME_Actor
 
 void
 SALOME_Actor
-::SetPosition(float _arg1, float _arg2, float _arg3)
+::SetPosition(vtkFloatingPointType _arg1, 
+             vtkFloatingPointType _arg2, 
+             vtkFloatingPointType _arg3)
 {
   Superclass::SetPosition(_arg1,_arg2,_arg3);
 
@@ -279,7 +282,7 @@ SALOME_Actor
 
 void
 SALOME_Actor
-::SetPosition(float _arg[3])
+::SetPosition(vtkFloatingPointType _arg[3])
 {
   SetPosition(_arg[0],_arg[1],_arg[2]);
 }
@@ -353,7 +356,7 @@ void
 SALOME_Actor
 ::highlight(bool theIsHighlight)
 {
-  float aBounds[6];
+  vtkFloatingPointType aBounds[6];
   GetInput()->GetBounds(aBounds);
   myOutline->SetBounds(aBounds);
   myOutlineActor->SetVisibility( GetVisibility() && theIsHighlight );
@@ -377,9 +380,9 @@ SALOME_Actor
   Selection_Mode aSelectionMode = theSelectionEvent->mySelectionMode;
   bool anIsChanged = (mySelectionMode != aSelectionMode);
 
-  float x = theSelectionEvent->myX;
-  float y = theSelectionEvent->myY;
-  float z = 0.0;
+  vtkFloatingPointType x = theSelectionEvent->myX;
+  vtkFloatingPointType y = theSelectionEvent->myY;
+  vtkFloatingPointType z = 0.0;
 
   if( !theIsHighlight ) {
     SetPreSelected( false );
@@ -522,9 +525,9 @@ SALOME_Actor
   if ( !theIsHighlight )
     return true;
 
-  float x = theSelectionEvent->myX;
-  float y = theSelectionEvent->myY;
-  float z = 0.0;
+  vtkFloatingPointType x = theSelectionEvent->myX;
+  vtkFloatingPointType y = theSelectionEvent->myY;
+  vtkFloatingPointType z = 0.0;
 
   if( !theSelectionEvent->myIsRectangle ) {
     switch(aSelectionMode){
@@ -591,16 +594,16 @@ SALOME_Actor
       break;
     }
   }else{
-    float xLast = theSelectionEvent->myLastX;
-    float yLast = theSelectionEvent->myLastY;
-    float zLast = 0.0;
+    vtkFloatingPointType xLast = theSelectionEvent->myLastX;
+    vtkFloatingPointType yLast = theSelectionEvent->myLastY;
+    vtkFloatingPointType zLast = 0.0;
 
-    float x1 = x < xLast ? x : xLast;
-    float y1 = y < yLast ? y : yLast;
-    float z1 = z < zLast ? z : zLast;
-    float x2 = x > xLast ? x : xLast;
-    float y2 = y > yLast ? y : yLast;
-    float z2 = z > zLast ? z : zLast;
+    vtkFloatingPointType x1 = x < xLast ? x : xLast;
+    vtkFloatingPointType y1 = y < yLast ? y : yLast;
+    vtkFloatingPointType z1 = z < zLast ? z : zLast;
+    vtkFloatingPointType x2 = x > xLast ? x : xLast;
+    vtkFloatingPointType y2 = y > yLast ? y : yLast;
+    vtkFloatingPointType z2 = z > zLast ? z : zLast;
 
     switch(aSelectionMode){
     case NodeSelection: {
@@ -636,8 +639,8 @@ SALOME_Actor
     }
     case ActorSelection :
     {
-      float aPnt[3];
-      float* aBounds = GetBounds();
+      vtkFloatingPointType aPnt[3];
+      vtkFloatingPointType* aBounds = GetBounds();
 
       bool anIsPicked = true;
       for( int i = 0; i <= 1; i++ ) {
index d377ff633a148f0a96680711ef0f00c8d08f5f0e..3539e4b73c27dad879552cf440225baff1c5f1c8 100644 (file)
@@ -100,12 +100,14 @@ class SVTK_EXPORT SALOME_Actor : public VTKViewer_Actor
   //! Apply additional position
   virtual
   void
-  SetPosition(float _arg1, float _arg2, float _arg3);
+  SetPosition(vtkFloatingPointType _arg1, 
+             vtkFloatingPointType _arg2, 
+             vtkFloatingPointType _arg3);
 
   //! Apply additional position
   virtual
   void
-  SetPosition(float _arg[3]);
+  SetPosition(vtkFloatingPointType _arg[3]);
 
   //----------------------------------------------------------------------------
   //! Visibility management
index 337075bb1a4e8d52e43b9dfba5b3886709200cfc..bc13af9f0d7cad5ddc707f30d6dd01b0c72bc9a2 100644 (file)
@@ -151,7 +151,7 @@ SVTK_Actor
     aPoints->SetNumberOfPoints(aNbOfParts);
     for(int i = 0; i < aNbOfParts; i++){
       int aPartId = theMapIndex( i+1 );
-      if(float* aCoord = theMapActor->GetNodeCoord(aPartId)){
+      if(vtkFloatingPointType* aCoord = theMapActor->GetNodeCoord(aPartId)){
        aPoints->SetPoint(i,aCoord);
        myUnstructuredGrid->InsertNextCell(VTK_VERTEX,1,&i);
       }
index 3fdcf72f38f5c111b99a3ea52be5ca1d8df093ce..f64dfbc0759e07195a56e2536913965cce0b6530 100644 (file)
@@ -198,8 +198,13 @@ int SVTK_CubeAxesActor2D::RenderOverlay(vtkViewport *viewport)
   return renderedSomething;
 }
 
-static void ChangeValues(float* aArray1,float* aArray2,float *aRange1,float* aRange2,bool theY){
-  float tmp=-1000;
+static void ChangeValues(vtkFloatingPointType* aArray1,
+                        vtkFloatingPointType* aArray2,
+                        vtkFloatingPointType *aRange1,
+                        vtkFloatingPointType* aRange2,
+                        bool theY)
+{
+  vtkFloatingPointType tmp=-1000;
   if (!theY){
     for (int i=0; i<4; i++){
       tmp = aArray1[i]; aArray1[i] = aArray2[i]; aArray2[i] = tmp;
@@ -223,9 +228,15 @@ static void ChangeValues(float* aArray1,float* aArray2,float *aRange1,float* aRa
   }
 }
 
-static void ChangeArrays(float* xCoords,float* yCoords,float* zCoords,
-                        float* xRange,float* yRange,float* zRange,
-                        const int xAxes,const int yAxes, const int zAxes)
+static void ChangeArrays(vtkFloatingPointType* xCoords,
+                        vtkFloatingPointType* yCoords,
+                        vtkFloatingPointType* zCoords,
+                        vtkFloatingPointType* xRange,
+                        vtkFloatingPointType* yRange,
+                        vtkFloatingPointType* zRange,
+                        const int xAxes,
+                        const int yAxes, 
+                        const int zAxes)
 {
   if ( xAxes == 0 && yAxes == 2 && zAxes == 1)
     ChangeValues(yCoords,zCoords,yRange,zRange,true);
@@ -249,8 +260,8 @@ static void ChangeArrays(float* xCoords,float* yCoords,float* zCoords,
 // with the boundary of the viewport (minus borders).
 int SVTK_CubeAxesActor2D::RenderOpaqueGeometry(vtkViewport *viewport)
 {
-  float bounds[6], slope = 0.0, minSlope, num, den;
-  float pts[8][3], d2, d2Min, min;
+  vtkFloatingPointType bounds[6], slope = 0.0, minSlope, num, den;
+  vtkFloatingPointType pts[8][3], d2, d2Min, min;
   int i, idx = 0;
   int xIdx, yIdx = 0, zIdx = 0, zIdx2, renderedSomething=0;
   int xAxes = 0, yAxes, zAxes;
@@ -308,7 +319,7 @@ int SVTK_CubeAxesActor2D::RenderOpaqueGeometry(vtkViewport *viewport)
       }
     else
       {
-      float e1[2], e2[2], e3[2];
+      vtkFloatingPointType e1[2], e2[2], e3[2];
 
       // Find distance to origin
       d2Min = VTK_LARGE_FLOAT;
@@ -401,7 +412,7 @@ int SVTK_CubeAxesActor2D::RenderOpaqueGeometry(vtkViewport *viewport)
     }
 
   // Setup the axes for plotting
-  float xCoords[4], yCoords[4], zCoords[4], xRange[2], yRange[2], zRange[2];
+  vtkFloatingPointType xCoords[4], yCoords[4], zCoords[4], xRange[2], yRange[2], zRange[2];
   this->AdjustAxes(pts, bounds, idx, xIdx, yIdx, zIdx, zIdx2, 
                    xAxes, yAxes, zAxes, 
                    xCoords, yCoords, zCoords, xRange, yRange, zRange);
@@ -449,7 +460,7 @@ int SVTK_CubeAxesActor2D::RenderOpaqueGeometry(vtkViewport *viewport)
 #else
   for(i=0;i<numOfLabelsX;i++){
 #endif
-    float val = bounds[0]+i*(bounds[1]-bounds[0])/(numOfLabelsX-1);
+    vtkFloatingPointType val = bounds[0]+i*(bounds[1]-bounds[0])/(numOfLabelsX-1);
     XCoords->InsertNextValue(val);
   }
   // YCoords coordinates for Y grid
@@ -459,7 +470,7 @@ int SVTK_CubeAxesActor2D::RenderOpaqueGeometry(vtkViewport *viewport)
 #else
   for(i=0;i<numOfLabelsX;i++){
 #endif
-    float val = bounds[2]+i*(bounds[3]-bounds[2])/(numOfLabelsY-1);
+    vtkFloatingPointType val = bounds[2]+i*(bounds[3]-bounds[2])/(numOfLabelsY-1);
     YCoords->InsertNextValue(val);
   }
   // ZCoords coordinates for Z grid
@@ -469,7 +480,7 @@ int SVTK_CubeAxesActor2D::RenderOpaqueGeometry(vtkViewport *viewport)
 #else
   for(i=0;i<numOfLabelsZ;i++){
 #endif
-    float val = bounds[4]+i*(bounds[5]-bounds[4])/(numOfLabelsZ-1);
+    vtkFloatingPointType val = bounds[4]+i*(bounds[5]-bounds[4])/(numOfLabelsZ-1);
     ZCoords->InsertNextValue(val);
   }
 
@@ -485,8 +496,8 @@ int SVTK_CubeAxesActor2D::RenderOpaqueGeometry(vtkViewport *viewport)
 
   rgrid->Delete();
 
-  float aCPosition[3];
-  float aCDirection[3];
+  vtkFloatingPointType aCPosition[3];
+  vtkFloatingPointType aCDirection[3];
   this->Camera->GetPosition(aCPosition);
   this->Camera->GetDirectionOfProjection(aCDirection);
 
@@ -494,12 +505,12 @@ int SVTK_CubeAxesActor2D::RenderOpaqueGeometry(vtkViewport *viewport)
   bool replaceXY=false;
   bool replaceYZ=false;
   bool replaceXZ=false;
-  float p[6][3]; // centers of planes
-  float vecs[6][3]; // 6 vectors from camera position to centers
+  vtkFloatingPointType p[6][3]; // centers of planes
+  vtkFloatingPointType vecs[6][3]; // 6 vectors from camera position to centers
 
-  float aMiddleX = (XCoords->GetValue(0) + XCoords->GetValue(numOfLabelsX-1))/2;
-  float aMiddleY = (YCoords->GetValue(0) + YCoords->GetValue(numOfLabelsY-1))/2;
-  float aMiddleZ = (ZCoords->GetValue(0) + ZCoords->GetValue(numOfLabelsZ-1))/2;
+  vtkFloatingPointType aMiddleX = (XCoords->GetValue(0) + XCoords->GetValue(numOfLabelsX-1))/2;
+  vtkFloatingPointType aMiddleY = (YCoords->GetValue(0) + YCoords->GetValue(numOfLabelsY-1))/2;
+  vtkFloatingPointType aMiddleZ = (ZCoords->GetValue(0) + ZCoords->GetValue(numOfLabelsZ-1))/2;
 
   // plane XY
   p[0][0] = aMiddleX; // plane X=0.5 Y=0.5 Z=0
@@ -555,7 +566,7 @@ int SVTK_CubeAxesActor2D::RenderOpaqueGeometry(vtkViewport *viewport)
   YCoords->Delete();
   ZCoords->Delete();
 
-  float color[3];
+  vtkFloatingPointType color[3];
 
   this->GetProperty()->GetColor(color);
   this->wireActorXY->GetProperty()->SetColor(color);
index 57c9e56941750a7d701259b2a4b14eecd8c8381f..b26734e5d1a992d043315f3fb669752aff586077 100644 (file)
@@ -248,7 +248,7 @@ bool SVTK_AxisWidget::ReadData(vtkAxisActor2D* theActor)
   vtkTextProperty* aTitleProp = theActor->GetTitleTextProperty();
   if (aTitleProp !=0)
   {
-    float c[ 3 ];
+    vtkFloatingPointType c[ 3 ];
     aTitleProp->GetColor(c);
     aTitleColor.setRgb((int)(c[ 0 ] * 255), (int)(c[ 1 ] * 255), (int)(c[ 2 ] * 255));
     aTitleFontFamily = aTitleProp->GetFontFamily();
@@ -276,7 +276,7 @@ bool SVTK_AxisWidget::ReadData(vtkAxisActor2D* theActor)
   vtkTextProperty* aLabelsProp = theActor->GetLabelTextProperty();
   if (aLabelsProp !=0)
   {
-    float c[ 3 ];
+    vtkFloatingPointType c[ 3 ];
     aLabelsProp->GetColor(c);
     aLabelsColor.setRgb((int)(c[ 0 ] * 255), (int)(c[ 1 ] * 255), (int)(c[ 2 ] * 255));
     aLabelsFontFamily = aLabelsProp->GetFontFamily();
index be959115cd70535e0f41e59b466884d5f7a6fb79..e9da753f5a15b69385b9d0afab4265e6ece0bb11 100644 (file)
@@ -243,7 +243,7 @@ SVTK_DeviceActor
   }
 }
 
-float
+vtkFloatingPointType
 SVTK_DeviceActor
 ::GetShrinkFactor()
 {
@@ -252,7 +252,7 @@ SVTK_DeviceActor
 
 void 
 SVTK_DeviceActor
-::SetShrinkFactor(float theValue)
+::SetShrinkFactor(vtkFloatingPointType theValue)
 {
   myShrinkFilter->SetShrinkFactor(theValue);
 }
@@ -318,14 +318,14 @@ SVTK_DeviceActor
   return myRepresentation;
 }
 
-float
+vtkFloatingPointType
 SVTK_DeviceActor
 ::GetDefaultPointSize()
 {
   return 5;
 }
 
-float
+vtkFloatingPointType
 SVTK_DeviceActor
 ::GetDefaultLineWidth()
 {
@@ -356,7 +356,7 @@ SVTK_DeviceActor
   return theVtkID;
 }
 
-float
+vtkFloatingPointType
 SVTK_DeviceActor
 ::GetNodeCoord(int theObjID)
 {
@@ -386,7 +386,7 @@ SVTK_DeviceActor
 {
   if(myIsResolveCoincidentTopology){
     int aResolveCoincidentTopology = vtkMapper::GetResolveCoincidentTopology();
-    float aFactor, aUnit; 
+    vtkFloatingPointType aFactor, aUnit; 
     vtkMapper::GetResolveCoincidentTopologyPolygonOffsetParameters(aFactor,aUnit);
     
     vtkMapper::SetResolveCoincidentTopologyToPolygonOffset();
@@ -404,7 +404,8 @@ SVTK_DeviceActor
 
 void
 SVTK_DeviceActor
-::SetPolygonOffsetParameters(float factor, float units)
+::SetPolygonOffsetParameters(vtkFloatingPointType factor, 
+                            vtkFloatingPointType units)
 {
   myPolygonOffsetFactor = factor;
   myPolygonOffsetUnits = units;
@@ -412,7 +413,8 @@ SVTK_DeviceActor
 
 void
 SVTK_DeviceActor
-::GetPolygonOffsetParameters(float& factor, float& units)
+::GetPolygonOffsetParameters(vtkFloatingPointType& factor, 
+                            vtkFloatingPointType& units)
 {
   factor = myPolygonOffsetFactor;
   units = myPolygonOffsetUnits;
index f8a49bc36316937a3669c5542f9fa035ec54332b..2606aa471d031ec0dd6080ed3d326612ff298c4f 100644 (file)
@@ -95,7 +95,7 @@ class SVTK_DeviceActor: public vtkLODActor
   GetNodeObjId(int theVtkID);
 
   virtual
-  float
+  vtkFloatingPointType
   GetNodeCoord(int theObjID);
 
   virtual
@@ -118,12 +118,12 @@ class SVTK_DeviceActor: public vtkLODActor
 
   /** @name For shrink mamnagement purpose */
   //@{
-  float
+  vtkFloatingPointType
   GetShrinkFactor();
 
   virtual 
   void  
-  SetShrinkFactor(float value);
+  SetShrinkFactor(vtkFloatingPointType value);
 
   virtual
   void
@@ -153,11 +153,11 @@ class SVTK_DeviceActor: public vtkLODActor
   GetRepresentation();
 
   virtual
-  float
+  vtkFloatingPointType
   GetDefaultPointSize();
 
   virtual
-  float
+  vtkFloatingPointType
   GetDefaultLineWidth();
 
   bool
@@ -190,11 +190,13 @@ class SVTK_DeviceActor: public vtkLODActor
   bool myIsShrunk;
   
   bool myIsResolveCoincidentTopology;
-  float myPolygonOffsetFactor;
-  float myPolygonOffsetUnits;
+  vtkFloatingPointType myPolygonOffsetFactor;
+  vtkFloatingPointType myPolygonOffsetUnits;
 
-  void SetPolygonOffsetParameters(float factor, float units);
-  void GetPolygonOffsetParameters(float& factor, float& units);
+  void SetPolygonOffsetParameters(vtkFloatingPointType factor, 
+                                 vtkFloatingPointType units);
+  void GetPolygonOffsetParameters(vtkFloatingPointType& factor, 
+                                 vtkFloatingPointType& units);
 
   SVTK_DeviceActor();
   ~SVTK_DeviceActor();
index b6711c6a79714be183e829071ca730700d8ffcef..f442fd9b12b8697b639d5d9761aeda1267a75784 100644 (file)
@@ -1089,7 +1089,7 @@ SVTK_InteractorStyle
 {
   vtkCamera *cam = GetCurrentRenderer()->GetActiveCamera();
   double viewFocus[4], focalDepth, viewPoint[3];
-  float newPickPoint[4], oldPickPoint[4], motionVector[3];
+  vtkFloatingPointType newPickPoint[4], oldPickPoint[4], motionVector[3];
   cam->GetFocalPoint(viewFocus);
 
   this->ComputeWorldToDisplay(viewFocus[0], viewFocus[1],
index 145aa9aa5e744970463019e923572518fd1af7a8..77bc71317c0076b3009076867f850cf399e6e039 100644 (file)
@@ -207,7 +207,7 @@ QColor
 SVTK_MainWindow
 ::BackgroundColor()
 {
-  float aBackgroundColor[3];
+  vtkFloatingPointType aBackgroundColor[3];
   getRenderer()->GetBackground(aBackgroundColor);
   return QColor(int(aBackgroundColor[0]*255), 
                int(aBackgroundColor[1]*255), 
index 775782e807eaea11b3d7214397c48b7486593671..0d3eb9ad6a53ee73b3f6b8295ba544968ef8ad25 100644 (file)
@@ -52,7 +52,7 @@ namespace
 {
   //----------------------------------------------------------------------------
   inline
-  float
+  vtkFloatingPointType
   GetZ(float* theZPtr,
        int theSelection[4],
        int theDX,
@@ -67,13 +67,13 @@ namespace
   int
   Check(float* theZPtr,
        int theSelection[4],
-       float theTolerance,
-       float theDZ,
+       vtkFloatingPointType theTolerance,
+       vtkFloatingPointType theDZ,
        int theDX,
        int theDY)
   {
     int aRet = 0;
-    float aZ = -1.0;
+    vtkFloatingPointType aZ = -1.0;
     if(theDX >= theSelection[0] && theDX <= theSelection[2] &&
        theDY >= theSelection[1] && theDY <= theSelection[3])
     {
@@ -98,7 +98,7 @@ namespace
                      vtkDataSet *theInput,
                      SVTK_RectPicker::TVectorIds& theVisibleIds,
                      SVTK_RectPicker::TVectorIds& theInVisibleIds,
-                     float theTolerance)
+                     vtkFloatingPointType theTolerance)
   {
     theVisibleIds.clear();
     theInVisibleIds.clear();
@@ -134,10 +134,10 @@ namespace
     */
     for(vtkIdType aPntId = 0; aPntId < aNumPts; aPntId++){
       // perform conversion
-      float aX[4] = {1.0, 1.0, 1.0, 1.0};
+      vtkFloatingPointType aX[4] = {1.0, 1.0, 1.0, 1.0};
       theInput->GetPoint(aPntId,aX);
 
-      float aView[4];
+      vtkFloatingPointType aView[4];
       aMatrix->MultiplyPoint(aX,aView);
       if(aView[3] == 0.0)
        continue;
@@ -146,7 +146,7 @@ namespace
                                aView[2]/aView[3]);
       theRenderer->ViewToDisplay();
 
-      float aDX[3];
+      vtkFloatingPointType aDX[3];
       theRenderer->GetDisplayPoint(aDX);
       
       // check whether visible and in selection window 
@@ -212,8 +212,8 @@ namespace
   //----------------------------------------------------------------------------
   inline
   void
-  GetCenter(const float theBounds[6],
-           float theCenter[3])
+  GetCenter(const vtkFloatingPointType theBounds[6],
+           vtkFloatingPointType theCenter[3])
   {
     theCenter[0] = (theBounds[1] + theBounds[0]) / 2.0;
     theCenter[1] = (theBounds[3] + theBounds[2]) / 2.0;
@@ -225,7 +225,7 @@ namespace
                     vtkRenderer *theRenderer,
                     vtkDataSet *theInput,
                     SVTK_RectPicker::TVectorIds& theVectorIds,
-                    float theTolerance)
+                    vtkFloatingPointType theTolerance)
   {
     theVectorIds.clear();
 
@@ -260,14 +260,14 @@ namespace
     for(vtkIdType aCellId = 0; aCellId < aNumCells; aCellId++){
       vtkCell* aCell = theInput->GetCell(aCellId);
 
-      float aBounds[6];
+      vtkFloatingPointType aBounds[6];
       aCell->GetBounds(aBounds);
 
-      float aCenter[3];
+      vtkFloatingPointType aCenter[3];
       GetCenter(aBounds,aCenter);
 
-      float aView[4];
-      float aX[4] = {aCenter[0], aCenter[1], aCenter[2], 1.0};
+      vtkFloatingPointType aView[4];
+      vtkFloatingPointType aX[4] = {aCenter[0], aCenter[1], aCenter[2], 1.0};
       aMatrix->MultiplyPoint(aX,aView);
 
       if(aView[3] == 0.0)
@@ -278,7 +278,7 @@ namespace
                                aView[2]/aView[3]);
       theRenderer->ViewToDisplay();
 
-      float aDX[3];
+      vtkFloatingPointType aDX[3];
       theRenderer->GetDisplayPoint(aDX);
       
       // check whether visible and in selection window 
@@ -306,16 +306,16 @@ namespace
   //----------------------------------------------------------------------------
   void
   CalculatePickPosition(vtkRenderer *theRenderer,
-                       float theSelectionX, 
-                       float theSelectionY, 
-                       float theSelectionZ,
-                       float thePickPosition[3])
+                       vtkFloatingPointType theSelectionX, 
+                       vtkFloatingPointType theSelectionY, 
+                       vtkFloatingPointType theSelectionZ,
+                       vtkFloatingPointType thePickPosition[3])
   {
     // Convert the selection point into world coordinates.
     //
     theRenderer->SetDisplayPoint(theSelectionX, theSelectionY, theSelectionZ);
     theRenderer->DisplayToWorld();
-    float* aWorldCoords = theRenderer->GetWorldPoint();
+    vtkFloatingPointType* aWorldCoords = theRenderer->GetWorldPoint();
     if ( aWorldCoords[3] != 0.0 ) {
       for (int i=0; i < 3; i++) {
        thePickPosition[i] = aWorldCoords[i] / aWorldCoords[3];
@@ -341,7 +341,10 @@ SVTK_RectPicker
 
 int
 SVTK_RectPicker
-::Pick(float, float, float, vtkRenderer*)
+::Pick(vtkFloatingPointType, 
+       vtkFloatingPointType, 
+       vtkFloatingPointType, 
+       vtkRenderer*)
 {
   return 0;
 }
@@ -349,7 +352,9 @@ SVTK_RectPicker
 //----------------------------------------------------------------------------
 int
 SVTK_RectPicker
-::Pick(float theSelection[3], float theSelection2[3], vtkRenderer *theRenderer)
+::Pick(vtkFloatingPointType theSelection[3], 
+       vtkFloatingPointType theSelection2[3], 
+       vtkRenderer *theRenderer)
 {
   return Pick(theSelection[0], theSelection[1], theSelection[2], 
              theSelection2[0], theSelection2[1], theSelection2[2],
@@ -359,8 +364,12 @@ SVTK_RectPicker
 //----------------------------------------------------------------------------
 int 
 SVTK_RectPicker
-::Pick(float theSelectionX, float theSelectionY, float theSelectionZ, 
-       float theSelectionX2, float theSelectionY2, float theSelectionZ2,
+::Pick(vtkFloatingPointType theSelectionX, 
+       vtkFloatingPointType theSelectionY, 
+       vtkFloatingPointType theSelectionZ, 
+       vtkFloatingPointType theSelectionX2, 
+       vtkFloatingPointType theSelectionY2, 
+       vtkFloatingPointType theSelectionZ2,
        vtkRenderer *theRenderer)
 {
   //  Initialize picking process
@@ -374,14 +383,14 @@ SVTK_RectPicker
   //
   vtkCamera* aCamera = theRenderer->GetActiveCamera();
 
-  float aCameraFP[4];
+  vtkFloatingPointType aCameraFP[4];
   aCamera->GetFocalPoint(aCameraFP); 
   aCameraFP[3] = 1.0;
 
   theRenderer->SetWorldPoint(aCameraFP);
   theRenderer->WorldToDisplay();
-  float* aDisplayCoords = theRenderer->GetDisplayPoint();
-  float aSelectionZ = aDisplayCoords[2];
+  vtkFloatingPointType* aDisplayCoords = theRenderer->GetDisplayPoint();
+  vtkFloatingPointType aSelectionZ = aDisplayCoords[2];
 
   this->SelectionPoint[0] = theSelectionX;
   this->SelectionPoint[1] = theSelectionY;
index a9837c2d9cdc647f6a66a29c71dd73b8461d90af..e994f713235d27a32032162344cba6258d6802eb 100644 (file)
@@ -40,7 +40,7 @@ class vtkRenderer;
 /*! \class vtkAbstractPropPicker
  * \brief For more information see <a href="http://www.vtk.org/">VTK documentation
  */
-/*! \class VTKViewer_RectPicker
+/*! \class SVTK_RectPicker
  * \brief Rectangular picker class.
  */
 class SVTK_EXPORT SVTK_RectPicker : public vtkAbstractPropPicker
@@ -56,8 +56,8 @@ class SVTK_EXPORT SVTK_RectPicker : public vtkAbstractPropPicker
     as fraction of rendering window size. (Rendering window size is measured
     across diagonal.)
   */
-  vtkSetMacro(Tolerance,float);
-  vtkGetMacro(Tolerance,float);
+  vtkSetMacro(Tolerance,vtkFloatingPointType);
+  vtkGetMacro(Tolerance,vtkFloatingPointType);
 
   //! Use these methods to pick points or points and cells
   vtkSetMacro(PickPoints,int);
@@ -66,12 +66,18 @@ class SVTK_EXPORT SVTK_RectPicker : public vtkAbstractPropPicker
 
   virtual 
   int
-  Pick(float theSelectionX, float theSelectionY, float theSelectionZ, 
-       float theSelectionX2, float theSelectionY2, float theSelectionZ2,
+  Pick(vtkFloatingPointType theSelectionX, 
+       vtkFloatingPointType theSelectionY, 
+       vtkFloatingPointType theSelectionZ, 
+       vtkFloatingPointType theSelectionX2, 
+       vtkFloatingPointType theSelectionY2, 
+       vtkFloatingPointType theSelectionZ2,
        vtkRenderer *theRenderer);  
 
   int
-  Pick(float theSelection[3], float theSelection2[3], vtkRenderer *theRenderer);
+  Pick(vtkFloatingPointType theSelection[3], 
+       vtkFloatingPointType theSelection2[3], 
+       vtkRenderer *theRenderer);
 
   typedef std::vector<vtkIdType> TVectorIds;
   typedef std::map<vtkActor*,TVectorIds> TVectorIdsMap;
@@ -87,16 +93,16 @@ class SVTK_EXPORT SVTK_RectPicker : public vtkAbstractPropPicker
   ~SVTK_RectPicker();
 
   //! tolerance for computation (% of window)
-  float Tolerance;
+  vtkFloatingPointType Tolerance;
 
   //! use the following to control picking mode
   int PickPoints;
 
   //! second rectangle selection point in window (pixel) coordinates
-  float SelectionPoint2[3]; 
+  vtkFloatingPointType SelectionPoint2[3]; 
 
   //! second rectangle selection point in world coordinates
-  float PickPosition2[3]; 
+  vtkFloatingPointType PickPosition2[3]; 
 
   TVectorIdsMap myPointIdsMap;
   TVectorIdsMap myCellIdsMap;
@@ -104,7 +110,10 @@ class SVTK_EXPORT SVTK_RectPicker : public vtkAbstractPropPicker
  private:
   virtual 
   int
-  Pick(float, float, float, vtkRenderer*);
+  Pick(vtkFloatingPointType, 
+       vtkFloatingPointType, 
+       vtkFloatingPointType, 
+       vtkRenderer*);
 };
 
 #endif
index 8302903a332405aade259b78d26c450af189cf08..113e7da5522eb8c1211a89cd2e11286eb0c3a7f3 100644 (file)
@@ -334,7 +334,7 @@ SVTK_Renderer
 
 inline
 bool
-CheckBndBox(const float theBounds[6])
+CheckBndBox(const vtkFloatingPointType theBounds[6])
 {
   if(theBounds[0] > -VTK_LARGE_FLOAT && theBounds[1] < VTK_LARGE_FLOAT &&
      theBounds[2] > -VTK_LARGE_FLOAT && theBounds[3] < VTK_LARGE_FLOAT &&
@@ -350,7 +350,7 @@ SVTK_Renderer
   bool aTDisplayed = IsTrihedronDisplayed();
   bool aCDisplayed = IsCubeAxesDisplayed();
 
-  float aNewBndBox[6];
+  vtkFloatingPointType aNewBndBox[6];
   aNewBndBox[ 0 ] = aNewBndBox[ 2 ] = aNewBndBox[ 4 ] = VTK_LARGE_FLOAT;
   aNewBndBox[ 1 ] = aNewBndBox[ 3 ] = aNewBndBox[ 5 ] = -VTK_LARGE_FLOAT;
 
@@ -380,7 +380,7 @@ SVTK_Renderer
        if(anActor->IsResizable())
          anActor->SetSize(0.5*aSize);
         if(anActor->GetVisibility() && !anActor->IsInfinitive()){
-         float *aBounds = anActor->GetBounds();
+         vtkFloatingPointType *aBounds = anActor->GetBounds();
           if(CheckBndBox(aBounds))
            for(int i = 0; i < 5; i = i + 2){
              if(aBounds[i] < aNewBndBox[i]) 
@@ -540,7 +540,7 @@ SVTK_Renderer
   else
     myCubeAxes->VisibilityOff();
 
-  static float aCoeff = 3.0;
+  static vtkFloatingPointType aCoeff = 3.0;
   aCamera->SetParallelScale(aCoeff*aCamera->GetParallelScale());
 }
 
index 5532ea852c141d600452b33aebc4af73e1f815e7..d593643963675016bd109f3e56f3a5f9f5ace077 100644 (file)
@@ -209,7 +209,7 @@ class SVTK_EXPORT SVTK_Renderer : public vtkObject
 
   //----------------------------------------------------------------------------
   // Priority at which events are processed
-  float myPriority;
+  vtkFloatingPointType myPriority;
 
   // Used to process events
   vtkSmartPointer<vtkCallbackCommand> myEventCallbackCommand;
@@ -244,7 +244,7 @@ class SVTK_EXPORT SVTK_Renderer : public vtkObject
   vtkSmartPointer<VTKViewer_Trihedron> myTrihedron;  
   int  myTrihedronSize;
   bool myIsTrihedronRelative;
-  float myBndBox[6];
+  vtkFloatingPointType myBndBox[6];
 };
 
 #endif
index 966ff234064483293d1d318e354c785ef020930f..f16de8862e3ab5906a08d6ebf647dcdbdc17d36d 100644 (file)
@@ -503,11 +503,11 @@ SVTK_View
 ::SetTransparency(const Handle(SALOME_InteractiveObject)& theIObject, 
                  float theTrans)
 {
-  float anOpacity = 1.0 - theTrans;
+  vtkFloatingPointType anOpacity = 1.0 - theTrans;
   using namespace SVTK;
   ForEachIf<SALOME_Actor>(getRenderer()->GetActors(),
                          TIsSameIObject<SALOME_Actor>(theIObject),
-                         TSetFunction<SALOME_Actor,float>
+                         TSetFunction<SALOME_Actor,vtkFloatingPointType>
                          (&SALOME_Actor::SetOpacity,anOpacity));
 }
 
@@ -517,12 +517,12 @@ SVTK_View
 ::SetColor(const Handle(SALOME_InteractiveObject)& theIObject,
           const QColor& theColor) 
 {
-  float aColor[3] = {theColor.red()/255., theColor.green()/255., theColor.blue()/255.};
+  vtkFloatingPointType aColor[3] = {theColor.red()/255., theColor.green()/255., theColor.blue()/255.};
 
   using namespace SVTK;
   ForEachIf<SALOME_Actor>(getRenderer()->GetActors(),
                          TIsSameIObject<SALOME_Actor>(theIObject),
-                         TSetFunction<SALOME_Actor,const float*>
+                         TSetFunction<SALOME_Actor,const vtkFloatingPointType*>
                          (&SALOME_Actor::SetColor,aColor));
 }
 
@@ -536,7 +536,7 @@ SVTK_View
     Find<SALOME_Actor>(getRenderer()->GetActors(),
                       TIsSameIObject<SALOME_Actor>(theIObject));
   if(anActor){
-    float r,g,b;
+    vtkFloatingPointType r,g,b;
     anActor->GetColor(r,g,b);
     return QColor(int(r*255),int(g*255),int(b*255));
   }
index b36f8fdda643f1419467e0cacfa13f07dcfee36a..481aa64a381b4a48d9aa3aaee4c8e08640b90b7a 100755 (executable)
@@ -356,9 +356,11 @@ QString ToolsGUI_RegWidget::setlongText( const Registry::Infos &c_info)
   a.append( BOLD( QString::number( int( c_info.uid ) ) ) );
   a.append( QString( " )<br> " ) + tr( "in directory" ) + QString( " " ));
   a.append( BOLD( c_info.cdir ) );
-  
+
+  time_t aTime;
   a.append( QString( "<br>" ) + tr( "begins" ) + QString( " " ) );
-  char * t1 = (char * )duplicate(ctime(&c_info.tc_start));
+  aTime = time_t(c_info.tc_start);
+  char * t1 = (char * )duplicate(ctime(&aTime));
   t1 [strlen(t1) -1 ] = ' ';
   a.append( BOLD( t1 ) ); 
   delete [] t1;
@@ -366,7 +368,8 @@ QString ToolsGUI_RegWidget::setlongText( const Registry::Infos &c_info)
   
   if (c_info.tc_hello != 0 )
     {
-      char * t2 = (char * )duplicate(ctime(&c_info.tc_hello));
+      aTime = time_t(c_info.tc_hello);
+      char * t2 = (char * )duplicate(ctime(&aTime));
       t2 [strlen(t2) -1 ] = ' ';
       a.append( tr( "last signal" ) + QString(" : ") ); 
       a.append( BOLD( t2 ) ); 
@@ -375,7 +378,8 @@ QString ToolsGUI_RegWidget::setlongText( const Registry::Infos &c_info)
     }
   if ((c_info.tc_end - c_info.difftime) != 0)
     {
-      char * t3 = (char * )duplicate(ctime(&c_info.tc_end));
+      aTime = time_t(c_info.tc_end);
+      char * t3 = (char * )duplicate(ctime(&aTime));
       t3 [strlen(t3) -1 ] = ' ';
       a.append( tr( "ends" ) + QString( " " ) ); 
       a.append( BOLD( t3 ) ); 
@@ -463,6 +467,7 @@ void ToolsGUI_RegWidget::InfoHistory()
     _history->clear();
   try
     {
+      time_t aTime;
       _serverhistory = _VarComponents->history();
       for (CORBA::ULong i=0; i<_serverhistory->length(); i++)
        {       
@@ -470,9 +475,11 @@ void ToolsGUI_RegWidget::InfoHistory()
          ASSERT( c_info.name!=NULL);
          QString a;
          a.setNum(int(c_info.pid));
-         char * t1 = (char * )duplicate(ctime(&c_info.tc_start));
+         aTime = time_t(c_info.tc_start);
+         char * t1 = (char * )duplicate(ctime(&aTime));
          t1 [strlen(t1) -1 ] = ' ';
-         char * t2 = (char * )duplicate(ctime(&c_info.tc_end));
+         aTime = time_t(c_info.tc_end);
+         char * t2 = (char * )duplicate(ctime(&aTime));
          t2 [strlen(t2) -1 ] = ' ';
          QListViewItem * item = new QListViewItem(_history, QString(c_info.name),\
                                                   a, QString(c_info.pwname), QString(c_info.machine), \
@@ -503,6 +510,7 @@ void ToolsGUI_RegWidget::InfoReg()
   _clients->clear();
   try
     {
+      time_t aTime;
       _serverclients = _VarComponents->getall();
       for (CORBA::ULong i=0; i<_serverclients->length(); i++)
        {       
@@ -510,9 +518,11 @@ void ToolsGUI_RegWidget::InfoReg()
          ASSERT( c_info.name!=NULL);
          QString a;
          a.setNum(int(c_info.pid));
-         char * t1 = (char * )duplicate(ctime(&c_info.tc_start));
+         aTime = time_t(c_info.tc_start);
+         char * t1 = (char * )duplicate(ctime(&aTime));
          t1 [strlen(t1) -1 ] = ' ';
-         char * t2 = (char * )duplicate(ctime(&c_info.tc_hello));
+         aTime = time_t(c_info.tc_hello);
+         char * t2 = (char * )duplicate(ctime(&aTime));
          t2 [strlen(t2) -1 ] = ' ';
          QListViewItem * item = new QListViewItem(_clients, QString(c_info.name),\
                                                   a, QString(c_info.pwname), QString(c_info.machine), \
index dd5f7ea29614c9612bf3a0980a41c9287119719d..61b2e7daf6771c65532eb62471654ac58f4886ec 100755 (executable)
@@ -13,7 +13,6 @@ VPATH=.:@srcdir@:@srcdir@/resources
 
 # header files 
 EXPORT_HEADERS= VTKViewer_Actor.h \
-               VTKViewer_CellRectPicker.h \
                VTKViewer_ExtractUnstructuredGrid.h \
                VTKViewer_ConvexTool.h \
                VTKViewer_Filter.h \
@@ -23,7 +22,6 @@ EXPORT_HEADERS= VTKViewer_Actor.h \
                VTKViewer.h \
                VTKViewer_InteractorStyle.h \
                VTKViewer_PassThroughFilter.h \
-               VTKViewer_RectPicker.h \
                VTKViewer_RenderWindow.h \
                VTKViewer_RenderWindowInteractor.h \
                VTKViewer_ShrinkFilter.h \
@@ -47,14 +45,12 @@ PO_FILES = \
 LIB = libVTKViewer.la
 
 LIB_SRC= VTKViewer_Actor.cxx \
-        VTKViewer_CellRectPicker.cxx \
         VTKViewer_ExtractUnstructuredGrid.cxx \
         VTKViewer_Filter.cxx \
         VTKViewer_GeometryFilter.cxx \
         VTKViewer_AppendFilter.cxx \
         VTKViewer_InteractorStyle.cxx \
         VTKViewer_PassThroughFilter.cxx \
-        VTKViewer_RectPicker.cxx \
         VTKViewer_RenderWindow.cxx \
         VTKViewer_RenderWindowInteractor.cxx \
         VTKViewer_ShrinkFilter.cxx \
index d2f72e2b8e8f40b980fdf32092b66e3fd456e6c0..471f2e767d527345444c64553e2f67cbd1ce980f 100755 (executable)
@@ -200,7 +200,7 @@ VTKViewer_Actor
 {
   if(myIsResolveCoincidentTopology){
     int aResolveCoincidentTopology = vtkMapper::GetResolveCoincidentTopology();
-    float aFactor, aUnit; 
+    vtkFloatingPointType aFactor, aUnit; 
     vtkMapper::GetResolveCoincidentTopologyPolygonOffsetParameters(aFactor,aUnit);
     
     vtkMapper::SetResolveCoincidentTopologyToPolygonOffset();
@@ -225,7 +225,8 @@ VTKViewer_Actor
 
 void
 VTKViewer_Actor
-::SetPolygonOffsetParameters(float factor, float units)
+::SetPolygonOffsetParameters(vtkFloatingPointType factor, 
+                            vtkFloatingPointType units)
 {
   myPolygonOffsetFactor = factor;
   myPolygonOffsetUnits = units;
@@ -233,7 +234,8 @@ VTKViewer_Actor
 
 void
 VTKViewer_Actor
-::GetPolygonOffsetParameters(float& factor, float& units)
+::GetPolygonOffsetParameters(vtkFloatingPointType& factor, 
+                            vtkFloatingPointType& units)
 {
   factor = myPolygonOffsetFactor;
   units = myPolygonOffsetUnits;
@@ -241,7 +243,7 @@ VTKViewer_Actor
 
 
 //----------------------------------------------------------------------------
-float
+vtkFloatingPointType
 VTKViewer_Actor
 ::GetShrinkFactor() 
 { 
@@ -359,7 +361,7 @@ VTKViewer_Actor
   return theVtkID;
 }
 
-float
+vtkFloatingPointType
 VTKViewer_Actor
 ::GetNodeCoord(int theObjID)
 {
@@ -408,7 +410,7 @@ bool
 VTKViewer_Actor
 ::IsInfinitive()
 { 
-  static float MIN_DISTANCE = 1.0 / VTK_LARGE_FLOAT;
+  static vtkFloatingPointType MIN_DISTANCE = 1.0 / VTK_LARGE_FLOAT;
 
   if(myIsInfinite || GetLength() < MIN_DISTANCE)
     return true;
@@ -417,7 +419,7 @@ VTKViewer_Actor
 }
 
 
-float
+vtkFloatingPointType
 VTKViewer_Actor
 ::GetBounds()
 {
@@ -427,7 +429,7 @@ VTKViewer_Actor
 
 void
 VTKViewer_Actor
-::GetBounds(float theBounds[6])
+::GetBounds(vtkFloatingPointType theBounds[6])
 {
   Superclass::GetBounds(theBounds);
 }
@@ -450,7 +452,7 @@ VTKViewer_Actor
 
 void
 VTKViewer_Actor
-::SetSize( const float ) 
+::SetSize( const vtkFloatingPointType ) 
 {}
 
 
@@ -462,13 +464,13 @@ VTKViewer_Actor
 //----------------------------------------------------------------------------
 void
 VTKViewer_Actor
-::SetOpacity(float theOpacity)
+::SetOpacity(vtkFloatingPointType theOpacity)
 { 
   myOpacity = theOpacity;
   GetProperty()->SetOpacity(theOpacity);
 }
 
-float
+vtkFloatingPointType
 VTKViewer_Actor
 ::GetOpacity()
 {
@@ -478,23 +480,27 @@ VTKViewer_Actor
 
 void
 VTKViewer_Actor
-::SetColor(float r,float g,float b)
+::SetColor(vtkFloatingPointType r,
+          vtkFloatingPointType g,
+          vtkFloatingPointType b)
 {
   GetProperty()->SetColor(r,g,b);
 }
 
 void
 VTKViewer_Actor
-::SetColor(const float theRGB[3])
+::SetColor(const vtkFloatingPointType theRGB[3])
 { 
   SetColor(theRGB[0],theRGB[1],theRGB[2]);
 }
 
 void
 VTKViewer_Actor
-::GetColor(float& r,float& g,float& b)
+::GetColor(vtkFloatingPointType& r,
+          vtkFloatingPointType& g,
+          vtkFloatingPointType& b)
 {
-  float aColor[3];
+  vtkFloatingPointType aColor[3];
   GetProperty()->GetColor(aColor);
   r = aColor[0];
   g = aColor[1];
index 55711a8c018def10181c0c416ac865daa96ca9e2..37d109da639f36f2f7e8be506706ade2ac83926f 100755 (executable)
@@ -77,27 +77,31 @@ class VTKVIEWER_EXPORT VTKViewer_Actor : public vtkLODActor
   //! Change opacity
   virtual
   void
-  SetOpacity(float theOpacity);
+  SetOpacity(vtkFloatingPointType theOpacity);
 
   //! Get current opacity
   virtual
-  float 
+  vtkFloatingPointType 
   GetOpacity();
 
   //! Change color
   virtual
   void
-  SetColor(float r,float g,float b);
+  SetColor(vtkFloatingPointType r,
+          vtkFloatingPointType g,
+          vtkFloatingPointType b);
 
   //! Get current color
   virtual
   void
-  GetColor(float& r,float& g,float& b);
+  GetColor(vtkFloatingPointType& r,
+          vtkFloatingPointType& g,
+          vtkFloatingPointType& b);
 
   //! Change color
   virtual
   void
-  SetColor(const float theRGB[3]);
+  SetColor(const vtkFloatingPointType theRGB[3]);
 
   //----------------------------------------------------------------------------
   // For selection mapping purpose
@@ -108,7 +112,7 @@ class VTKVIEWER_EXPORT VTKViewer_Actor : public vtkLODActor
 
   //! Get coordinates of a node for given object index
   virtual
-  float*
+  vtkFloatingPointType*
   GetNodeCoord(int theObjID);
 
   //! Maps VTK index of a cell to corresponding object index
@@ -184,12 +188,12 @@ class VTKVIEWER_EXPORT VTKViewer_Actor : public vtkLODActor
     
   //! To calcualte current bounding box
   virtual
-  float
+  vtkFloatingPointType
   GetBounds();
 
   //! To calcualte current bounding box
   void
-  GetBounds(float bounds[6]);
+  GetBounds(vtkFloatingPointType bounds[6]);
 
   //----------------------------------------------------------------------------
   virtual
@@ -202,7 +206,7 @@ class VTKVIEWER_EXPORT VTKViewer_Actor : public vtkLODActor
 
   virtual
   void
-  SetSize( const float );
+  SetSize( const vtkFloatingPointType );
 
   virtual
   void 
@@ -215,11 +219,13 @@ class VTKVIEWER_EXPORT VTKViewer_Actor : public vtkLODActor
 
   //! Set ResolveCoincidentTopology parameters
   void
-  SetPolygonOffsetParameters(float factor, float units);
+  SetPolygonOffsetParameters(vtkFloatingPointType factor, 
+                            vtkFloatingPointType units);
 
   //! Get current ResolveCoincidentTopology parameters
   void
-  GetPolygonOffsetParameters(float& factor, float& units);
+  GetPolygonOffsetParameters(vtkFloatingPointType& factor, 
+                            vtkFloatingPointType& units);
 
   virtual
   void
@@ -228,7 +234,7 @@ class VTKVIEWER_EXPORT VTKViewer_Actor : public vtkLODActor
   //----------------------------------------------------------------------------
   //! Get current shrink factor
   virtual
-  float
+  vtkFloatingPointType
   GetShrinkFactor();
 
   //! Is the actor is shrunkable
@@ -295,12 +301,12 @@ class VTKVIEWER_EXPORT VTKViewer_Actor : public vtkLODActor
  protected:
   //----------------------------------------------------------------------------
   bool myIsResolveCoincidentTopology;
-  float myPolygonOffsetFactor;
-  float myPolygonOffsetUnits;
+  vtkFloatingPointType myPolygonOffsetFactor;
+  vtkFloatingPointType myPolygonOffsetUnits;
 
   std::string myName;
 
-  float myOpacity;
+  vtkFloatingPointType myOpacity;
   int myDisplayMode;
   bool myIsInfinite;
 
index 464b27ce0fff521167fde19b31b363f59418cf90..a709d20c2504a695cbd7c3572fae0ed4d32a45ce 100644 (file)
@@ -52,11 +52,11 @@ namespace
   struct TPolygon
   {
     TConnectivities myConnectivities;
-    float myOrigin[3];
-    float myNormal[3];
+    vtkFloatingPointType myOrigin[3];
+    vtkFloatingPointType myNormal[3];
     TPolygon(const TConnectivities& theConnectivities,
-            float theOrigin[3],
-            float theNormal[3]):
+            vtkFloatingPointType theOrigin[3],
+            vtkFloatingPointType theNormal[3]):
       myConnectivities(theConnectivities)
     {
       myOrigin[0] = theOrigin[0];
@@ -121,9 +121,9 @@ VTKViewer_Triangulator
     return true;
 
   // To calculate the bary center of the cell
-  float aCellCenter[3] = {0.0, 0.0, 0.0};
+  vtkFloatingPointType aCellCenter[3] = {0.0, 0.0, 0.0};
   {
-    float aPntCoord[3];
+    vtkFloatingPointType aPntCoord[3];
     for (int aPntId = 0; aPntId < aNumPts; aPntId++) {
       aPoints->GetPoint(GetPointId(aPntId),aPntCoord);
       //cout<<"\taPntId = "<<aPntId<<" {"<<aPntCoord[0]<<", "<<aPntCoord[1]<<", "<<aPntCoord[2]<<"}\n";
@@ -136,11 +136,11 @@ VTKViewer_Triangulator
     aCellCenter[2] /= aNumPts;
   }
 
-  float aCellLength = GetCellLength();
+  vtkFloatingPointType aCellLength = GetCellLength();
   int aNumFaces = GetNumFaces();
 
-  static float EPS = 1.0E-2;
-  float aDistEps = aCellLength * EPS;
+  static vtkFloatingPointType EPS = 1.0E-2;
+  vtkFloatingPointType aDistEps = aCellLength * EPS;
   //cout<<"\taCellLength = "<<aCellLength<<"; aDistEps = "<<aDistEps<<"\n";
 
   // To initialize set of points that belong to the cell
@@ -199,37 +199,37 @@ VTKViewer_Triangulator
     
     if(!anIsObserved){
       // To get coordinates of the points of the traingle face
-      float aCoord[3][3];
+      vtkFloatingPointType aCoord[3][3];
       aPoints->GetPoint(aNewPts[0],aCoord[0]);
       aPoints->GetPoint(aNewPts[1],aCoord[1]);
       aPoints->GetPoint(aNewPts[2],aCoord[2]);
       
       // To calculate plane normal
-      float aVector01[3] = { aCoord[1][0] - aCoord[0][0],
-                            aCoord[1][1] - aCoord[0][1],
-                            aCoord[1][2] - aCoord[0][2] };
+      vtkFloatingPointType aVector01[3] = { aCoord[1][0] - aCoord[0][0],
+                                           aCoord[1][1] - aCoord[0][1],
+                                           aCoord[1][2] - aCoord[0][2] };
       
-      float aVector02[3] = { aCoord[2][0] - aCoord[0][0],
-                            aCoord[2][1] - aCoord[0][1],
-                            aCoord[2][2] - aCoord[0][2] };
+      vtkFloatingPointType aVector02[3] = { aCoord[2][0] - aCoord[0][0],
+                                           aCoord[2][1] - aCoord[0][1],
+                                           aCoord[2][2] - aCoord[0][2] };
       
       // To calculate the normal for the triangle
-      float aNormal[3];
+      vtkFloatingPointType aNormal[3];
       vtkMath::Cross(aVector02,aVector01,aNormal);
       
       vtkMath::Normalize(aNormal);
       
       // To calculate what points belong to the plane
       // To calculate bounds of the point set
-      float aCenter[3] = {0.0, 0.0, 0.0};
+      vtkFloatingPointType aCenter[3] = {0.0, 0.0, 0.0};
       {
        TPointIds::const_iterator anIter = anInitialPointIds.begin();
        TPointIds::const_iterator anEndIter = anInitialPointIds.end();
        for(; anIter != anEndIter; anIter++){
-         float aPntCoord[3];
+         vtkFloatingPointType aPntCoord[3];
          vtkIdType aPntId = *anIter;
          aPoints->GetPoint(aPntId,aPntCoord);
-         float aDist = vtkPlane::DistanceToPlane(aPntCoord,aNormal,aCoord[0]);
+         vtkFloatingPointType aDist = vtkPlane::DistanceToPlane(aPntCoord,aNormal,aCoord[0]);
          //cout<<"\t\taPntId = "<<aPntId<<" {"<<aPntCoord[0]<<", "<<aPntCoord[1]<<", "<<aPntCoord[2]<<"}; aDist = "<<aDist<<"\n";
          if(fabs(aDist) < aDistEps){
            aPointIds.insert(aPntId);
@@ -245,12 +245,12 @@ VTKViewer_Triangulator
       }
       
       //To sinchronize orientation of the cell and its face
-      float aVectorC[3] = { aCenter[0] - aCellCenter[0],
-                           aCenter[1] - aCellCenter[1],
-                           aCenter[2] - aCellCenter[2] };
+      vtkFloatingPointType aVectorC[3] = { aCenter[0] - aCellCenter[0],
+                                          aCenter[1] - aCellCenter[1],
+                                          aCenter[2] - aCellCenter[2] };
       vtkMath::Normalize(aVectorC);
       
-      float aDot = vtkMath::Dot(aNormal,aVectorC);
+      vtkFloatingPointType aDot = vtkMath::Dot(aNormal,aVectorC);
       //cout<<"\t\taNormal = {"<<aNormal[0]<<", "<<aNormal[1]<<", "<<aNormal[2]<<"}";
       //cout<<"; aVectorC = {"<<aVectorC[0]<<", "<<aVectorC[1]<<", "<<aVectorC[2]<<"}\n";
       //cout<<"\t\taDot = "<<aDot<<"\n";
@@ -261,9 +261,9 @@ VTKViewer_Triangulator
       }
       
       // To calculate the primary direction for point set
-      float aVector0[3] = { aCoord[0][0] - aCenter[0],
-                           aCoord[0][1] - aCenter[1],
-                           aCoord[0][2] - aCenter[2] };
+      vtkFloatingPointType aVector0[3] = { aCoord[0][0] - aCenter[0],
+                                          aCoord[0][1] - aCenter[1],
+                                          aCoord[0][2] - aCenter[2] };
       vtkMath::Normalize(aVector0);
       
       //cout<<"\t\taCenter = {"<<aCenter[0]<<", "<<aCenter[1]<<", "<<aCenter[2]<<"}";
@@ -299,30 +299,30 @@ VTKViewer_Triangulator
       
       // To sort the planar set of the points accrding to the angle
       {
-       typedef std::map<float,vtkIdType> TSortedPointIds;
+       typedef std::map<vtkFloatingPointType,vtkIdType> TSortedPointIds;
        TSortedPointIds aSortedPointIds;
        
        TPointIds::const_iterator anIter = aPointIds.begin();
        TPointIds::const_iterator anEndIter = aPointIds.end();
        for(; anIter != anEndIter; anIter++){
-         float aPntCoord[3];
+         vtkFloatingPointType aPntCoord[3];
          vtkIdType aPntId = *anIter;
          aPoints->GetPoint(aPntId,aPntCoord);
-         float aVector[3] = { aPntCoord[0] - aCenter[0],
-                              aPntCoord[1] - aCenter[1],
-                              aPntCoord[2] - aCenter[2] };
+         vtkFloatingPointType aVector[3] = { aPntCoord[0] - aCenter[0],
+                                             aPntCoord[1] - aCenter[1],
+                                             aPntCoord[2] - aCenter[2] };
          vtkMath::Normalize(aVector);
          
-         float aCross[3];
+         vtkFloatingPointType aCross[3];
          vtkMath::Cross(aVector,aVector0,aCross);
          bool aGreaterThanPi = vtkMath::Dot(aCross,aNormal) < 0;
-         float aCosinus = vtkMath::Dot(aVector,aVector0);
+         vtkFloatingPointType aCosinus = vtkMath::Dot(aVector,aVector0);
          if(aCosinus > 1.0)
            aCosinus = 1.0;
          if(aCosinus < -1.0)
            aCosinus = -1.0;
-         static float a2Pi = 2.0 * vtkMath::Pi();
-         float anAngle = acos(aCosinus);
+         static vtkFloatingPointType a2Pi = 2.0 * vtkMath::Pi();
+         vtkFloatingPointType anAngle = acos(aCosinus);
          //cout<<"\t\t\taPntId = "<<aPntId<<" {"<<aPntCoord[0]<<", "<<aPntCoord[1]<<", "<<aPntCoord[2]<<"}";
          //cout<<"; aGreaterThanPi = "<<aGreaterThanPi<<"; aCosinus = "<<aCosinus<<"; anAngle = "<<anAngle<<"\n";
          if(aGreaterThanPi){
@@ -355,16 +355,16 @@ VTKViewer_Triangulator
     int aNbPolygons = aPolygons.size();
     for (int aPolygonId = 0; aPolygonId < aNbPolygons; aPolygonId++) {
       ::TPolygon& aPolygon = aPolygons[aPolygonId];
-      float* aNormal = aPolygon.myNormal;
-      float* anOrigin = aPolygon.myOrigin;
+      vtkFloatingPointType* aNormal = aPolygon.myNormal;
+      vtkFloatingPointType* anOrigin = aPolygon.myOrigin;
       //cout<<"\taPolygonId = "<<aPolygonId<<"\n";
       //cout<<"\t\taNormal = {"<<aNormal[0]<<", "<<aNormal[1]<<", "<<aNormal[2]<<"}";
       //cout<<"; anOrigin = {"<<anOrigin[0]<<", "<<anOrigin[1]<<", "<<anOrigin[2]<<"}\n";
       for(vtkIdType aPntId = 0; aPntId < aNumPts; aPntId++){
-       float aPntCoord[3];
+       vtkFloatingPointType aPntCoord[3];
        vtkIdType anId = GetPointId(aPntId);
        aPoints->GetPoint(anId,aPntCoord);
-       float aDist = vtkPlane::Evaluate(aNormal,anOrigin,aPntCoord);
+       vtkFloatingPointType aDist = vtkPlane::Evaluate(aNormal,anOrigin,aPntCoord);
        //cout<<"\t\taPntId = "<<anId<<" {"<<aPntCoord[0]<<", "<<aPntCoord[1]<<", "<<aPntCoord[2]<<"}; aDist = "<<aDist<<"\n";
        if(aDist < -aDistEps)
          return false;
@@ -428,7 +428,7 @@ VTKViewer_OrderedTriangulator
   return myCell->GetPointId(thePointId);
 }
 
-float 
+vtkFloatingPointType 
 VTKViewer_OrderedTriangulator
 ::GetCellLength()
 {
@@ -506,7 +506,7 @@ VTKViewer_DelaunayTriangulator
   vtkIdType aNumPts;
   myInput->GetCellPoints(myCellId,aNumPts,myPointIds); 
   {
-    float aPntCoord[3];
+    vtkFloatingPointType aPntCoord[3];
     myPoints->SetNumberOfPoints(aNumPts);
     vtkPoints *anInputPoints = myInput->GetPoints();
     for (int aPntId = 0; aPntId < aNumPts; aPntId++) {
@@ -535,7 +535,7 @@ VTKViewer_DelaunayTriangulator
   return thePointId;
 }
 
-float 
+vtkFloatingPointType 
 VTKViewer_DelaunayTriangulator
 ::GetCellLength()
 {
index f56a502b4ee4bcad36e5e35f4d57a3300c5553db..02feafe418e1487ba53c2faf5a1fd36d71be498e 100644 (file)
@@ -80,7 +80,7 @@ class VTKVIEWER_EXPORT VTKViewer_Triangulator
   GetPointId(vtkIdType thePointId) = 0;
 
   virtual
-  float 
+  vtkFloatingPointType 
   GetCellLength() = 0;
 
   virtual
@@ -127,7 +127,7 @@ class VTKVIEWER_EXPORT VTKViewer_OrderedTriangulator : public VTKViewer_Triangul
   GetPointId(vtkIdType thePointId);
 
   virtual
-  float 
+  vtkFloatingPointType 
   GetCellLength();
 
   virtual
@@ -180,7 +180,7 @@ class VTKVIEWER_EXPORT VTKViewer_DelaunayTriangulator : public VTKViewer_Triangu
   GetPointId(vtkIdType thePointId);
 
   virtual
-  float 
+  vtkFloatingPointType 
   GetCellLength();
 
   virtual
index 19672b7821794d8504d9bb707910d089dcd7302e..a7cc37e52869ad2edbcc4672860909ad497f9b64 100755 (executable)
@@ -32,7 +32,7 @@
 #include <vtkUnstructuredGrid.h>
 #include <vtkObjectFactory.h>
 #include <vtkCellArray.h>
-#include <vtkIntArray.h>
+#include <vtkIdTypeArray.h>
 #include <vtkIdList.h>
 #include <vtkCell.h>
 
@@ -234,7 +234,7 @@ void VTKViewer_ExtractUnstructuredGrid::Execute(){
        }
       }
       if((aNbElems = aConnectivity->GetNumberOfCells())){
-       vtkIntArray* aCellLocationsArray = vtkIntArray::New();
+       vtkIdTypeArray* aCellLocationsArray = vtkIdTypeArray::New();
        aCellLocationsArray->SetNumberOfComponents(1);
        aCellLocationsArray->SetNumberOfTuples(aNbElems);
        aConnectivity->InitTraversal();
@@ -323,7 +323,7 @@ void VTKViewer_ExtractUnstructuredGrid::Execute(){
       }
     }
     if((aNbElems = aConnectivity->GetNumberOfCells())){
-      vtkIntArray* aCellLocationsArray = vtkIntArray::New();
+      vtkIdTypeArray* aCellLocationsArray = vtkIdTypeArray::New();
       aCellLocationsArray->SetNumberOfComponents(1);
       aCellLocationsArray->SetNumberOfTuples(aNbElems);
       aConnectivity->InitTraversal();
index 83d6093ce16fe261a3dc32c8608353db489943bb..fa43f9b3985d980c8d1d240e0f976d1e0d185c12 100755 (executable)
@@ -136,7 +136,7 @@ VTKViewer_GeometryFilter
   char *cellVis;
   vtkIdType newCellId;
   int faceId, *faceVerts, numFacePts;
-  float *x;
+  vtkFloatingPointType *x;
   int PixelConvert[4], aNewPts[VTK_CELL_SIZE];
   // ghost cell stuff
   unsigned char  updateLevel = (unsigned char)(output->GetUpdateGhostLevel());
index 1f69e6085d76aa66a8681c7474371e4dfb807a97..b4937f9e7549bf47a77fe6eddc7fa54fc338b4da 100644 (file)
 #include "VTKViewer_Actor.h"
 #include "VTKViewer_Utilities.h"
 #include "VTKViewer_Trihedron.h"
-#include "VTKViewer_RectPicker.h"
 #include "VTKViewer_ViewWindow.h"
 #include "VTKViewer_RenderWindow.h"
-#include "VTKViewer_CellRectPicker.h"
 #include "VTKViewer_RenderWindowInteractor.h"
 
 //#include "SALOME_Actor.h"
@@ -1366,17 +1364,17 @@ void VTKViewer_InteractorStyle::Place(const int theX, const int theY)
 void VTKViewer_InteractorStyle::TranslateView(int toX, int toY, int fromX, int fromY)
 {
   vtkCamera *cam = this->CurrentRenderer->GetActiveCamera();
-  double viewFocus[4], focalDepth, viewPoint[3];
-  float newPickPoint[4], oldPickPoint[4], motionVector[3];
+  vtkFloatingPointType viewFocus[4], focalDepth, viewPoint[3];
+  vtkFloatingPointType newPickPoint[4], oldPickPoint[4], motionVector[3];
   cam->GetFocalPoint(viewFocus);
 
   this->ComputeWorldToDisplay(viewFocus[0], viewFocus[1],
                              viewFocus[2], viewFocus);
   focalDepth = viewFocus[2];
 
-  this->ComputeDisplayToWorld(double(toX), double(toY),
+  this->ComputeDisplayToWorld(vtkFloatingPointType(toX), vtkFloatingPointType(toY),
                              focalDepth, newPickPoint);
-  this->ComputeDisplayToWorld(double(fromX),double(fromY),
+  this->ComputeDisplayToWorld(vtkFloatingPointType(fromX),vtkFloatingPointType(fromY),
                              focalDepth, oldPickPoint);
   
   // camera motion is reversed
@@ -1400,17 +1398,17 @@ bool VTKViewer_InteractorStyle::IsInRect(vtkActor* theActor,
                                               const int left, const int top, 
                                               const int right, const int bottom)
 {
-  float* aBounds = theActor->GetBounds();
-  float aMin[3], aMax[3];
+  vtkFloatingPointType* aBounds = theActor->GetBounds();
+  vtkFloatingPointType aMin[3], aMax[3];
   ComputeWorldToDisplay(aBounds[0], aBounds[2], aBounds[4], aMin);
   ComputeWorldToDisplay(aBounds[1], aBounds[3], aBounds[5], aMax);
   if (aMin[0] > aMax[0]) {
-    float aBuf = aMin[0];
+    vtkFloatingPointType aBuf = aMin[0];
     aMin[0] = aMax[0];
     aMax[0] = aBuf;
   }
   if (aMin[1] > aMax[1]) {
-    float aBuf = aMin[1];
+    vtkFloatingPointType aBuf = aMin[1];
     aMin[1] = aMax[1];
     aMax[1] = aBuf;    
   }
@@ -1424,17 +1422,17 @@ bool VTKViewer_InteractorStyle::IsInRect(vtkCell* theCell,
                                               const int left, const int top, 
                                               const int right, const int bottom)
 {
-  float* aBounds = theCell->GetBounds();
-  float aMin[3], aMax[3];
+  vtkFloatingPointType* aBounds = theCell->GetBounds();
+  vtkFloatingPointType aMin[3], aMax[3];
   ComputeWorldToDisplay(aBounds[0], aBounds[2], aBounds[4], aMin);
   ComputeWorldToDisplay(aBounds[1], aBounds[3], aBounds[5], aMax);
   if (aMin[0] > aMax[0]) {
-    float aBuf = aMin[0];
+    vtkFloatingPointType aBuf = aMin[0];
     aMin[0] = aMax[0];
     aMax[0] = aBuf;
   }
   if (aMin[1] > aMax[1]) {
-    float aBuf = aMin[1];
+    vtkFloatingPointType aBuf = aMin[1];
     aMin[1] = aMax[1];
     aMax[1] = aBuf;    
   }
@@ -1443,11 +1441,11 @@ bool VTKViewer_InteractorStyle::IsInRect(vtkCell* theCell,
 }
 
 /*!Checks: is given point \a thePoint in rectangle*/
-bool VTKViewer_InteractorStyle::IsInRect(float* thePoint, 
-                                              const int left, const int top, 
-                                              const int right, const int bottom)
+bool VTKViewer_InteractorStyle::IsInRect(vtkFloatingPointType* thePoint, 
+                                        const int left, const int top, 
+                                        const int right, const int bottom)
 {
-  float aPnt[3];
+  vtkFloatingPointType aPnt[3];
   ComputeWorldToDisplay(thePoint[0], thePoint[1], thePoint[2], aPnt);
 
   return ((aPnt[0]>left) && (aPnt[0]<right) && (aPnt[1]>bottom) && (aPnt[1]<top));
index ed3f08d99fd1ec5bcd8d30b5c0de6b3996f6ece2..65aecade467a942a2f160da9f84041c5eae0b2fb 100644 (file)
@@ -121,13 +121,13 @@ class VTKVIEWER_EXPORT VTKViewer_InteractorStyle : public QObject, public vtkInt
   bool IsInRect(vtkCell* theCell, 
                const int left, const int top, 
                const int right, const int bottom);
-  bool IsInRect(float* thePoint, 
+  bool IsInRect(vtkFloatingPointType* thePoint, 
                const int left, const int top, 
                const int right, const int bottom);
 
   int State;
-  float MotionFactor;
-  float RadianToDegree;                 // constant: for conv from deg to rad
+  vtkFloatingPointType MotionFactor;
+  vtkFloatingPointType RadianToDegree;                 // constant: for conv from deg to rad
   double myScale;
 
   VTKViewer_Actor *myPreViewActor, *myPreSelectionActor, *mySelectedActor;
index a6ccdfd6aefa3aead1baff25a7519249b2bcc9c5..d8e7735ffcfe179a5e1b4145d234128165551cfe 100755 (executable)
@@ -136,7 +136,7 @@ void VTKViewer_RenderWindow::wheelEvent(QWheelEvent* event)
 void VTKViewer_RenderWindow::onChangeBackgroundColor()
 {
   //float red, green, blue;
-  float backint[3];
+  vtkFloatingPointType backint[3];
 
   vtkRendererCollection * theRenderers = myRW->GetRenderers();
   theRenderers->InitTraversal();
index daf93e15cb6c35a3af2ed82fcc1730827aab5d9e..dd97fad540c1407d703054304019c844c066d32e 100755 (executable)
@@ -698,7 +698,7 @@ void VTKViewer_RenderWindowInteractor::setActorData(const TColStd_IndexedMapOfIn
                                                    TUpdateActor theFun)
 {
   (*theFun)(theMapIndex,theMapActor,theActor);
-  float aPos[3];
+  vtkFloatingPointType aPos[3];
   theMapActor->GetPosition(aPos);
   theActor->SetPosition(aPos);
 }
index c65699a9a790d6a2d1bcd925c57cb97f19aeff2a..c485a7092c7b628906315a4d7f38e9fdfdbbf4dd 100755 (executable)
@@ -55,13 +55,13 @@ void VTKViewer_ShrinkFilter::Execute()
   int i, j, numIds, abort=0;
   vtkIdType cellId, numCells, numPts;
   vtkIdType oldId, newId;
-  float center[3], *p, pt[3];
+  vtkFloatingPointType center[3], *p, pt[3];
   vtkPointData *pd, *outPD;;
   vtkIdList *ptIds, *newPtIds;
   vtkDataSet *input= this->GetInput();
   vtkUnstructuredGrid *output = this->GetOutput();
   vtkIdType tenth;
-  float decimal;
+  vtkFloatingPointType decimal;
 
   vtkDebugMacro(<<"Shrinking cells");
 
index a6670cb87132b9745aa267d52ed53bdd2d6150e5..38401e6d6f88cb1a0c76b593df7ac97fbfc3ea19 100755 (executable)
@@ -44,7 +44,7 @@ VTKViewer_UnScaledActor::VTKViewer_UnScaledActor()
   Bounds[1] = Bounds[3] = Bounds[5] = -VTK_LARGE_FLOAT;
 }
 
-float
+vtkFloatingPointType
 VTKViewer_UnScaledActor
 ::GetBounds()
 {
@@ -65,19 +65,19 @@ void VTKViewer_UnScaledActor::SetSize(int theSize)
 void VTKViewer_UnScaledActor::Render(vtkRenderer *theRenderer)
 {
   if(theRenderer){
-    float P[2][3] = {{-1.0, -1.0, 0.0},{+1.0, +1.0, 0.0}};
+    vtkFloatingPointType P[2][3] = {{-1.0, -1.0, 0.0},{+1.0, +1.0, 0.0}};
     theRenderer->ViewToWorld(P[0][0],P[0][1],P[0][2]);
     theRenderer->ViewToWorld(P[1][0],P[1][1],P[1][2]);
-    float aWorldDiag = sqrt((P[1][0]-P[0][0])*(P[1][0]-P[0][0])+
-                            (P[1][1]-P[0][1])*(P[1][1]-P[0][1])+
-                            (P[1][2]-P[0][2])*(P[1][2]-P[0][2]));
+    vtkFloatingPointType aWorldDiag = sqrt((P[1][0]-P[0][0])*(P[1][0]-P[0][0])+
+                                          (P[1][1]-P[0][1])*(P[1][1]-P[0][1])+
+                                          (P[1][2]-P[0][2])*(P[1][2]-P[0][2]));
     int* aSize = theRenderer->GetRenderWindow()->GetSize();
-    float aWinDiag = sqrt(float(aSize[0]*aSize[0]+aSize[1]*aSize[1]));
+    vtkFloatingPointType aWinDiag = sqrt(vtkFloatingPointType(aSize[0]*aSize[0]+aSize[1]*aSize[1]));
     vtkDataSet* aDataSet = GetMapper()->GetInput();
-    float aLength = aDataSet->GetLength();
-    float aPrecision = 1.0E-3;
-    float anOldScale = GetScale()[0];
-    float aScale = mySize*aWorldDiag/aWinDiag/aLength*sqrt(float(aSize[0])/float(aSize[1]));
+    vtkFloatingPointType aLength = aDataSet->GetLength();
+    vtkFloatingPointType aPrecision = 1.0E-3;
+    vtkFloatingPointType anOldScale = GetScale()[0];
+    vtkFloatingPointType aScale = mySize*aWorldDiag/aWinDiag/aLength*sqrt(vtkFloatingPointType(aSize[0])/vtkFloatingPointType(aSize[1]));
     if(fabs(aScale - anOldScale)/aScale > aPrecision){
       SetScale(aScale);
     }
@@ -224,9 +224,9 @@ void VTKViewer_Axis::SetProperty(vtkProperty* theProperty){
   myLineActor->SetProperty(theProperty);
 }
 
-void VTKViewer_Axis::SetSize(float theSize)
+void VTKViewer_Axis::SetSize(vtkFloatingPointType theSize)
 {
-  float aPosition[3] = {myDir[0]*theSize, myDir[1]*theSize, myDir[2]*theSize};
+  vtkFloatingPointType aPosition[3] = {myDir[0]*theSize, myDir[1]*theSize, myDir[2]*theSize};
   myLineSource->SetPoint2(aPosition);
   
   myArrowActor->SetPosition(0.0,0.0,0.0);
@@ -324,7 +324,7 @@ VTKViewer_Trihedron::VTKViewer_Trihedron()
   myAxis[0] = VTKViewer_XAxis::New();
   myAxis[1] = VTKViewer_YAxis::New();
   myAxis[2] = VTKViewer_ZAxis::New();
-  static float aSize = 100;
+  static vtkFloatingPointType aSize = 100;
   SetSize(aSize);
 }
 
@@ -336,7 +336,7 @@ VTKViewer_Trihedron::~VTKViewer_Trihedron()
     myAxis[i]->Delete();
 }
 
-void VTKViewer_Trihedron::SetSize(float theSize)
+void VTKViewer_Trihedron::SetSize(vtkFloatingPointType theSize)
 {
   mySize = theSize;
   for(int i = 0; i < 3; i++)
index e40e3bc903d064567b99e27c8fd5c7e329d852c2..56e790205251fb9a42fbbaf7f92c1b9cc7b97a9c 100755 (executable)
@@ -52,7 +52,7 @@ public:
   /*!Create new instance of VTKViewer_UnScaledActor.*/
   static VTKViewer_UnScaledActor *New();
   
-  virtual float* GetBounds();
+  virtual vtkFloatingPointType* GetBounds();
   virtual void SetSize(int theSize);
   virtual void Render(vtkRenderer *theRenderer);
 
@@ -133,14 +133,14 @@ public:
   static VTKViewer_Trihedron *New();
   
   /*!Sets size of trihedron.
-   * \param theSize - float value
+   * \param theSize - vtkFloatingPointType value
    */
-  virtual void        SetSize(float theSize);
+  virtual void        SetSize(vtkFloatingPointType theSize);
 
   /*! Get size of trihedron.
-   * \retval mySize - float value
+   * \retval mySize - vtkFloatingPointType value
    */
-  virtual float       GetSize() { return mySize;}
+  virtual vtkFloatingPointType  GetSize() { return mySize;}
   
   enum TVisibility{eOff, eOn, eOnlyLineOn};
   
@@ -182,7 +182,7 @@ protected:
   VTKViewer_Axis*     myAxis[3];
   
   /*! Common size for trihedron, for each axis.*/
-  float               mySize;
+  vtkFloatingPointType mySize;
 };
 
 //****************************************************************
@@ -225,7 +225,7 @@ public:
   
   /*! Set size of VTKViewer_Axis
    */
-  virtual void SetSize(float theSize);
+  virtual void SetSize(vtkFloatingPointType theSize);
   
   /*! Get label actor.
    * \retval Return myLabelActor.
@@ -248,7 +248,7 @@ protected:
   /*! \var myRot[3]
    * Orientation vector
    */
-  float myDir[3], myRot[3];
+  vtkFloatingPointType myDir[3], myRot[3];
   
   /*! VTKViewer_LineActor actor pointer
    */
index 723eea3fcc6cded3798b7ea3b5c3ce6b394c20b6..2ae1509528fec2cfe603d6a2830fc5b5380fde4f 100755 (executable)
@@ -26,7 +26,7 @@
 #include "VTKViewer_Utilities.h"
 
 
-/*!@see vtkRenderer::ResetCamera(float bounds[6]) method*/
+/*!@see vtkRenderer::ResetCamera(vtkFloatingPointType bounds[6]) method*/
 void ResetCamera(vtkRenderer* theRenderer, int theUsingZeroFocalPoint)
 {  
   if(!theRenderer)
@@ -36,20 +36,20 @@ void ResetCamera(vtkRenderer* theRenderer, int theUsingZeroFocalPoint)
   if(!aCamera) 
     return;
 
-  float aBounds[6];
+  vtkFloatingPointType aBounds[6];
   int aCount = ComputeVisiblePropBounds(theRenderer,aBounds);
 
   if(theUsingZeroFocalPoint || aCount){
-    static float MIN_DISTANCE = 1.0 / VTK_LARGE_FLOAT;
+    static vtkFloatingPointType MIN_DISTANCE = 1.0 / VTK_LARGE_FLOAT;
 
-    float aLength = aBounds[1]-aBounds[0];
+    vtkFloatingPointType aLength = aBounds[1]-aBounds[0];
     aLength = max((aBounds[3]-aBounds[2]),aLength);
     aLength = max((aBounds[5]-aBounds[4]),aLength);
     
     if(aLength < MIN_DISTANCE)
       return;
 
-    float aWidth = 
+    vtkFloatingPointType aWidth = 
       sqrt((aBounds[1]-aBounds[0])*(aBounds[1]-aBounds[0]) +
           (aBounds[3]-aBounds[2])*(aBounds[3]-aBounds[2]) +
           (aBounds[5]-aBounds[4])*(aBounds[5]-aBounds[4]));
@@ -57,10 +57,10 @@ void ResetCamera(vtkRenderer* theRenderer, int theUsingZeroFocalPoint)
     if(aWidth < MIN_DISTANCE)
       return;
 
-    double aViewPlaneNormal[3];
+    vtkFloatingPointType aViewPlaneNormal[3];
     aCamera->GetViewPlaneNormal(aViewPlaneNormal);
     
-    float aCenter[3] = {0.0, 0.0, 0.0};
+    vtkFloatingPointType aCenter[3] = {0.0, 0.0, 0.0};
     if(!theUsingZeroFocalPoint){
       aCenter[0] = (aBounds[0] + aBounds[1])/2.0;
       aCenter[1] = (aBounds[2] + aBounds[3])/2.0;
@@ -68,11 +68,11 @@ void ResetCamera(vtkRenderer* theRenderer, int theUsingZeroFocalPoint)
     }
     aCamera->SetFocalPoint(aCenter[0],aCenter[1],aCenter[2]);
     
-    double aViewAngle = aCamera->GetViewAngle();
-    float aDistance = 2.0*aWidth/tan(aViewAngle*vtkMath::Pi()/360.0);
+    vtkFloatingPointType aViewAngle = aCamera->GetViewAngle();
+    vtkFloatingPointType aDistance = 2.0*aWidth/tan(aViewAngle*vtkMath::Pi()/360.0);
     
     // check view-up vector against view plane normal
-    double aViewUp[3];
+    vtkFloatingPointType aViewUp[3];
     aCamera->GetViewUp(aViewUp);
     if(fabs(vtkMath::Dot(aViewUp,aViewPlaneNormal)) > 0.999)
       aCamera->SetViewUp(-aViewUp[2], aViewUp[0], aViewUp[1]);
@@ -85,7 +85,7 @@ void ResetCamera(vtkRenderer* theRenderer, int theUsingZeroFocalPoint)
     // find size of the window
     int* aWinSize = theRenderer->GetSize();
     if(aWinSize[0] < aWinSize[1]) 
-      aWidth *= float(aWinSize[1])/float(aWinSize[0]);
+      aWidth *= vtkFloatingPointType(aWinSize[1])/vtkFloatingPointType(aWinSize[0]);
     
     if(theUsingZeroFocalPoint) 
       aWidth *= sqrt(2.0);
@@ -97,9 +97,9 @@ void ResetCamera(vtkRenderer* theRenderer, int theUsingZeroFocalPoint)
 }
 
 /*! Compute the bounds of the visible props*/
-int ComputeVisiblePropBounds(vtkRenderer* theRenderer, float theBounds[6])
+int ComputeVisiblePropBounds(vtkRenderer* theRenderer, vtkFloatingPointType theBounds[6])
 {
-  float      *bounds;
+  vtkFloatingPointType      *bounds;
   int        aCount=0;
   
   theBounds[0] = theBounds[2] = theBounds[4] = VTK_LARGE_FLOAT;
@@ -153,7 +153,7 @@ int ComputeVisiblePropBounds(vtkRenderer* theRenderer, float theBounds[6])
   return aCount;
 }
 
-/*!@see vtkRenderer::ResetCameraClippingRange(float bounds[6]) method*/
+/*!@see vtkRenderer::ResetCameraClippingRange(vtkFloatingPointType bounds[6]) method*/
 void ResetCameraClippingRange(vtkRenderer* theRenderer)
 {
   if(!theRenderer || !theRenderer->VisibleActorCount()) return;
@@ -164,28 +164,28 @@ void ResetCameraClippingRange(vtkRenderer* theRenderer)
   }
   
   // Find the plane equation for the camera view plane
-  double vn[3];
+  vtkFloatingPointType vn[3];
   anActiveCamera->GetViewPlaneNormal(vn);
-  double  position[3];
+  vtkFloatingPointType  position[3];
   anActiveCamera->GetPosition(position);
   
-  float bounds[6];
+  vtkFloatingPointType bounds[6];
   theRenderer->ComputeVisiblePropBounds(bounds);
   
-  double center[3];
+  vtkFloatingPointType center[3];
   center[0] = (bounds[0] + bounds[1])/2.0;
   center[1] = (bounds[2] + bounds[3])/2.0;
   center[2] = (bounds[4] + bounds[5])/2.0;
   
-  double width = sqrt((bounds[1]-bounds[0])*(bounds[1]-bounds[0]) +
+  vtkFloatingPointType width = sqrt((bounds[1]-bounds[0])*(bounds[1]-bounds[0]) +
     (bounds[3]-bounds[2])*(bounds[3]-bounds[2]) +
     (bounds[5]-bounds[4])*(bounds[5]-bounds[4]));
   
-  double distance = sqrt((position[0]-center[0])*(position[0]-center[0]) +
+  vtkFloatingPointType distance = sqrt((position[0]-center[0])*(position[0]-center[0]) +
        (position[1]-center[1])*(position[1]-center[1]) +
        (position[2]-center[2])*(position[2]-center[2]));
   
-  float range[2] = {distance - width/2.0, distance + width/2.0};
+  vtkFloatingPointType range[2] = {distance - width/2.0, distance + width/2.0};
   
   // Do not let the range behind the camera throw off the calculation.
   if (range[0] < 0.0) range[0] = 0.0;
@@ -194,23 +194,25 @@ void ResetCameraClippingRange(vtkRenderer* theRenderer)
 }
 
 /*!Compute trihedron size.*/
-bool ComputeTrihedronSize( vtkRenderer* theRenderer,double& theNewSize,
-                          const double theSize, const float theSizeInPercents )
+bool ComputeTrihedronSize( vtkRenderer* theRenderer,
+                          vtkFloatingPointType& theNewSize,
+                          const vtkFloatingPointType theSize, 
+                          const vtkFloatingPointType theSizeInPercents )
 {
   // calculating diagonal of visible props of the renderer
-  float bnd[ 6 ];
+  vtkFloatingPointType bnd[ 6 ];
   if ( ComputeVisiblePropBounds( theRenderer, bnd ) == 0 )
   {
     bnd[ 1 ] = bnd[ 3 ] = bnd[ 5 ] = 100;
     bnd[ 0 ] = bnd[ 2 ] = bnd[ 4 ] = 0;
   }
-  float aLength = 0;
+  vtkFloatingPointType aLength = 0;
 
   aLength = bnd[ 1 ]-bnd[ 0 ];
   aLength = max( ( bnd[ 3 ] - bnd[ 2 ] ),aLength );
   aLength = max( ( bnd[ 5 ] - bnd[ 4 ] ),aLength );
 
-  static float EPS_SIZE = 5.0E-3;
+  static vtkFloatingPointType EPS_SIZE = 5.0E-3;
   theNewSize = aLength * theSizeInPercents / 100.0;
 
   // if the new trihedron size have sufficient difference, then apply the value
index 6341e885d67ed3ca98f3b3898fd16ec1785567f9..59afa34ef4636df03ce3b60c2ba10c401d293396 100755 (executable)
 
 class vtkRenderer;
 
-VTKVIEWER_EXPORT extern void  ResetCamera(vtkRenderer* theRenderer, int theUsingZeroFocalPoint = false);
-VTKVIEWER_EXPORT extern int   ComputeVisiblePropBounds(vtkRenderer* theRenderer, float theBounds[6]);
+VTKVIEWER_EXPORT extern void  ResetCamera(vtkRenderer* theRenderer, 
+                                         int theUsingZeroFocalPoint = false);
+VTKVIEWER_EXPORT extern int   ComputeVisiblePropBounds(vtkRenderer* theRenderer, 
+                                                      vtkFloatingPointType theBounds[6]);
 VTKVIEWER_EXPORT extern void  ResetCameraClippingRange(vtkRenderer* theRenderer);
-VTKVIEWER_EXPORT extern bool  ComputeTrihedronSize(vtkRenderer* theRenderer, double& theNewSize, 
-                                 const double theSize, const float theSizeInPercents);
+VTKVIEWER_EXPORT extern bool  ComputeTrihedronSize(vtkRenderer* theRenderer, 
+                                                  vtkFloatingPointType& theNewSize, 
+                                                  const vtkFloatingPointType theSize, 
+                                                  const vtkFloatingPointType theSizeInPercents);
 
 #ifndef max
 #define max(a,b)            (((a) > (b)) ? (a) : (b))
index 14459080395a8d0d7d87ecde8075d59c494ae263..b61b62cd7645b63c71f3651438a3f5ec34ee8b11 100755 (executable)
@@ -387,7 +387,7 @@ void VTKViewer_ViewWindow::onResetView()
   ::ResetCamera(myRenderer,true);  
   if(aTriedronIsVisible) myTrihedron->VisibilityOn();
   else myTrihedron->VisibilityOff();
-  static float aCoeff = 3.0;
+  static vtkFloatingPointType aCoeff = 3.0;
   aCamera->SetParallelScale(aCoeff*aCamera->GetParallelScale());
   Repaint();
 }
@@ -409,7 +409,7 @@ void VTKViewer_ViewWindow::setBackgroundColor( const QColor& color )
 /*!Returns background of the viewport*/
 QColor VTKViewer_ViewWindow::backgroundColor() const
 {
-  float backint[3];
+  vtkFloatingPointType backint[3];
   if ( myRenderer ) {
     myRenderer->GetBackground( backint );
     return QColor(int(backint[0]*255), int(backint[1]*255), int(backint[2]*255));
@@ -443,11 +443,11 @@ void VTKViewer_ViewWindow::onAdjustTrihedron(){
   int aVisibleNum = myTrihedron->GetVisibleActorCount(myRenderer);
   if(aVisibleNum){
     // calculating diagonal of visible props of the renderer
-    float bnd[6];
+    vtkFloatingPointType bnd[6];
     myTrihedron->VisibilityOff();
     ::ComputeVisiblePropBounds(myRenderer,bnd);
     myTrihedron->VisibilityOn();
-    float aLength = 0;
+    vtkFloatingPointType aLength = 0;
     static bool CalcByDiag = false;
     if(CalcByDiag){
       aLength = sqrt((bnd[1]-bnd[0])*(bnd[1]-bnd[0])+
@@ -459,13 +459,13 @@ void VTKViewer_ViewWindow::onAdjustTrihedron(){
       aLength = max((bnd[5]-bnd[4]),aLength);
     }
    
-    static float aSizeInPercents = 105;
+    static vtkFloatingPointType aSizeInPercents = 105;
     QString aSetting;// = SUIT_CONFIG->getSetting("Viewer:TrihedronSize");
     if(!aSetting.isEmpty()) aSizeInPercents = aSetting.toFloat();
 
-    static float EPS_SIZE = 5.0E-3;
-    float aSize = myTrihedron->GetSize();
-    float aNewSize = aLength*aSizeInPercents/100.0;
+    static vtkFloatingPointType EPS_SIZE = 5.0E-3;
+    vtkFloatingPointType aSize = myTrihedron->GetSize();
+    vtkFloatingPointType aNewSize = aLength*aSizeInPercents/100.0;
     // if the new trihedron size have sufficient difference, then apply the value
     if(fabs(aNewSize-aSize) > aSize*EPS_SIZE || fabs(aNewSize-aSize) > aNewSize*EPS_SIZE){
       myTrihedron->SetSize(aNewSize);