Commit 3d052fce authored by js9's avatar js9
Browse files

merge from 2.1RC: fix to 3D axis scaling, and some config site changes


git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@12421 18c085ea-50e0-402c-830e-de6fd14e8384
parent 061d2626
#/apps/visit/cmake/2.6.4/linux-x86_64/bin/cmake
# 1. YOU MUST UPGRADE TO cmake 2.6.4 !!!! This script assumes 2.6.4 but it is unknown whether it exists on your system.
# 2. This script does not use ${VISITARCH}. You should rerun build_visit to produce more uniformly installed libraries and a better config file.
##
## Set the VISITHOME environment variable.
##
SET(VISITHOME /apps/visit)
SET(VISIT_VERBOSE_MAKEFILE TRUE)
##
## Specify the location of the mesa include files and libraries.
##
VISIT_OPTION_DEFAULT(VISIT_MESA_DIR ${VISITHOME}/mesa/5.0/linux-x86_64)
##
## Specify the location of the vtk include files and libraries.
##
#VTK=$VISITHOME/vtk/2003.10.28c/linux-x86_64
VISIT_OPTION_DEFAULT(VISIT_VTK_DIR ${VISITHOME}/vtk/5.0.0c/linux-x86_64/lib/vtk-5.0)
##
## Specify the location of the qt include files and libraries.
##
VISIT_OPTION_DEFAULT(VISIT_QT_BIN ${VISITHOME}/qt/3.3.2/linux-x86_64/bin)
##
## Specify the location of the python include files and libraries.
##
VISIT_OPTION_DEFAULT(VISIT_PYTHON_DIR ${VISITHOME}/python/linux-x86_64)
##
## Tell VisIt where to find cmake in case we want to build slivr.
##
##
## Set the flags for compilation
##
SET(VISIT_C_FLAGS "-fPIC")
SET(VISIT_CXX_FLAGS "-fPIC -Wno-deprecated")
##
## Add parallel arguments.
##
# use mpich for parallel
SET(VISIT_MPI_CXX_FLAGS "-DMPICH_SKIP_MPICXX -I/usr/local/include")
SET(VISIT_MPI_LD_FLAGS "-L/usr/local/lib")
SET(VISIT_MPI_LIBS mpich)
##
## If enable_viewer_mesa_stub in not set, then disable it.
##
#if test -z "$enable_viewer_mesa_stub"; then
#not done -- enable_viewer_mesa_stub = no
#fi
##
## Database reader plugin support libraries
##
###############################################################################
##
## Boxlib
##
##DEFAULT_BOXLIB2D_INCLUDE=$VISITHOME/boxlib/linux-x86_64/include/2D
##DEFAULT_BOXLIB2D_LIBS=$VISITHOME/boxlib/linux-x86_64/lib
##DEFAULT_BOXLIB3D_INCLUDE=$VISITHOME/boxlib/linux-x86_64/include/3D
##DEFAULT_BOXLIB3D_LIBS=$VISITHOME/boxlib/linux-x86_64/lib
##
## HDF4
##
VISIT_OPTION_DEFAULT(VISIT_HDF4_DIR ${VISITHOME}/hdf4/4.2r1)
VISIT_OPTION_DEFAULT(VISIT_HDF4_LIBDEP /usr/lib jpeg)
##
## netCDF
##
VISIT_OPTION_DEFAULT(VISIT_NETCDF_DIR ${VISITHOME}/netcdf/3.6.0/hawk_x86_64)
##
## HDF5
##
VISIT_OPTION_DEFAULT(VISIT_HDF5_DIR ${VISITHOME}/hdf5/1.6.5/linux-x86_64_gcc-3.4.6)
VISIT_OPTION_DEFAULT(VISIT_HDF5_LIBDEP ${VISITHOME}/szip/2.1/${VISITARCH}/lib sz)
##
## Silo
##
VISIT_OPTION_DEFAULT(VISIT_SILO_DIR ${VISITHOME}/silo/4.6.1/linux-x86_64)
VISIT_OPTION_DEFAULT(VISIT_SILO_LIBDEP HDF5_LIBRARY_DIR hdf5 ${VISIT_HDF5_LIBDEP})
......@@ -35,6 +35,11 @@ VISIT_OPTION_DEFAULT(VISIT_QT_BIN ${VISITHOME}/qt/4.6.1/${VISITARCH}/bin)
##
VISIT_OPTION_DEFAULT(VISIT_PYTHON_DIR ${VISITHOME}/python/2.6.4/${VISITARCH})
##
## You can make distributions on this machine, so install 3rd-party stuff.
##
VISIT_OPTION_DEFAULT(VISIT_INSTALL_THIRD_PARTY ON)
##
## Compiler flags.
##
......
......@@ -35,6 +35,11 @@ VISIT_OPTION_DEFAULT(VISIT_QT_BIN ${VISITHOME}/qt/4.6.1/${VISITARCH}/bin)
##
VISIT_OPTION_DEFAULT(VISIT_PYTHON_DIR ${VISITHOME}/python/2.6.4/${VISITARCH})
##
## You can make distributions on this machine, so install 3rd-party stuff.
##
VISIT_OPTION_DEFAULT(VISIT_INSTALL_THIRD_PARTY ON)
##
## Compiler flags.
##
......
......@@ -35,6 +35,11 @@ VISIT_OPTION_DEFAULT(VISIT_QT_BIN ${VISITHOME}/qt/4.4.3/${VISITARCH}/bin)
##
VISIT_OPTION_DEFAULT(VISIT_PYTHON_DIR ${VISITHOME}/python/2.6.4/${VISITARCH})
##
## You can make distributions on this machine, so install 3rd-party stuff.
##
VISIT_OPTION_DEFAULT(VISIT_INSTALL_THIRD_PARTY ON)
##
## Compiler flags.
##
......
......@@ -4236,6 +4236,13 @@ ViewerWindow::RecenterView2d(const double *limits)
// Jeremy Meredith, Wed May 19 14:15:58 EDT 2010
// Support 3D axis scaling (3D equivalent of full-frame mode).
//
// Jeremy Meredith, Thu Sep 2 15:06:26 EDT 2010
// When using 3D scaling, everything (including the lower bounding box
// limits) is rescaled -- set the focus accordingly. Also, ignore
// effects of 3D scaling when setting parallel scale -- if you don't, then
// repeated re-centering with a non-1:1:1 3D scale will cause the parallel
// scale to keep shrinking/growing.
//
// ****************************************************************************
void
......@@ -4274,20 +4281,6 @@ ViewerWindow::RecenterView3d(const double *limits)
return;
}
//
// Determine the zoom factor.
//
double width;
double zoomFactor;
width = 0.5 * sqrt(((boundingBox3d[1] - boundingBox3d[0]) *
(boundingBox3d[1] - boundingBox3d[0])) +
((boundingBox3d[3] - boundingBox3d[2]) *
(boundingBox3d[3] - boundingBox3d[2])) +
((boundingBox3d[5] - boundingBox3d[4]) *
(boundingBox3d[5] - boundingBox3d[4])));
zoomFactor = width / view3D.parallelScale;
//
// Set the new window.
//
......@@ -4308,12 +4301,30 @@ ViewerWindow::RecenterView3d(const double *limits)
view3D.axis3DScales[1] : 1.0),
sizeOrig[2] * (view3D.axis3DScaleFlag ?
view3D.axis3DScales[2] : 1.0)};
double startScaled[3] ={boundingBox3d[0] * (view3D.axis3DScaleFlag ?
view3D.axis3DScales[0] : 1.0),
boundingBox3d[2] * (view3D.axis3DScaleFlag ?
view3D.axis3DScales[1] : 1.0),
boundingBox3d[4] * (view3D.axis3DScaleFlag ?
view3D.axis3DScales[2] : 1.0)};
//
// Determine the zoom factor.
//
double width;
double zoomFactor;
width = 0.5 * sqrt(sizeScaled[0]*sizeScaled[0] +
sizeScaled[1]*sizeScaled[1] +
sizeScaled[2]*sizeScaled[2]);
zoomFactor = width / view3D.parallelScale;
//
// Calculate the new focal point.
//
view3D.focus[0] = sizeScaled[0]/2. + boundingBox3d[0];
view3D.focus[1] = sizeScaled[1]/2. + boundingBox3d[2];
view3D.focus[2] = sizeScaled[2]/2. + boundingBox3d[4];
view3D.focus[0] = sizeScaled[0]/2. + startScaled[0];
view3D.focus[1] = sizeScaled[1]/2. + startScaled[1];
view3D.focus[2] = sizeScaled[2]/2. + startScaled[2];
//
// Calculate the new parallel scale.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment