Commit 4c625e5c authored by hrchilds's avatar hrchilds

Update from July 17, 2003

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@36 18c085ea-50e0-402c-830e-de6fd14e8384
parent da65a6d8
......@@ -143,6 +143,10 @@ avtView2D::SetToDefault()
// Hank Childs, Mon May 5 13:29:51 PDT 2003
// Account for degenerate situation that is hard to prevent.
//
// Kathleen Bonnell, Wed Jul 16 16:46:02 PDT 2003
// Scale window coords at beginning, then reverse the scaling at end,
// so that everything gets set correctly in full-frame mode.
//
// ****************************************************************************
void
......@@ -150,6 +154,13 @@ avtView2D::SetViewFromViewInfo(const avtViewInfo &viewInfo)
{
double valid_window[4];
GetValidWindow(valid_window);
//
// If full-frame mode is ON, then the settings in viewInfo have
// been scaled. Scale our window coords to match, so that they
// can be reset correctly from viewInfo. (ScaleWindow does nothing
// if full-frame mode is OFF).
//
ScaleWindow(valid_window);
//
// Determine the new window. We assume that the viewport stays the
......@@ -177,6 +188,14 @@ avtView2D::SetViewFromViewInfo(const avtViewInfo &viewInfo)
window[1] = xcenter + oldHalfWidth * scale * aspectRatio;
window[2] = ycenter - oldHalfWidth * scale;
window[3] = ycenter + oldHalfWidth * scale;
//
// If full-frame mode is ON, then the scaling of the window coords
// performed at the beginning of this method needs to be reversed.
// We always want the window coords stored here to reflect the actual
// view, not the scaling gymnastics done to facilitate full-frame mode.
// (ReverseScaleWindow does nothing if full-frame mode is OFF).
//
ReverseScaleWindow(window);
}
// ****************************************************************************
......@@ -197,6 +216,12 @@ avtView2D::SetViewFromViewInfo(const avtViewInfo &viewInfo)
// Hank Childs, Wed May 7 08:14:33 PDT 2003
// Account for degenerate situation that is hard to prevent.
//
// Kathleen Bonnell, Wed Jul 16 16:46:02 PDT 2003
// Call ScaleWindow (effective only in full-frame mode).
//
// Akira Haddox, Wed Jul 16 16:50:49 PDT 2003
// Force the clipping planes to be at least a certain distance away.
//
// ****************************************************************************
void
......@@ -204,6 +229,14 @@ avtView2D::SetViewInfoFromView(avtViewInfo &viewInfo) const
{
double valid_window[4];
GetValidWindow(valid_window);
//
// If full-frame mode is ON, then we want to scale our window coords
// before using them to set view info. (ScaleWindow does nothing if
// full-frame mode is OFF.) This is only a temporary scaling for use in
// this method as we always want the window coords stored here to
// display the extents of what the user is looking at.
//
ScaleWindow(valid_window);
//
//
......@@ -214,6 +247,12 @@ avtView2D::SetViewInfoFromView(avtViewInfo &viewInfo) const
width = valid_window[3] - valid_window[2];
//
// If we put the clipping planes too close, bad things start to happen.
//
if (width < 5e-4)
width = 5e-4;
viewInfo.viewUp[0] = 0.;
viewInfo.viewUp[1] = 1.;
viewInfo.viewUp[2] = 0.;
......@@ -225,7 +264,6 @@ avtView2D::SetViewInfoFromView(avtViewInfo &viewInfo) const
viewInfo.camera[0] = viewInfo.focus[0];
viewInfo.camera[1] = viewInfo.focus[1];
viewInfo.camera[2] = width / 2.;
//
// Set the projection mode, parallel scale and view angle. The
// projection mode is always parallel for 2D. The parallel scale is
......@@ -265,6 +303,9 @@ avtView2D::SetViewInfoFromView(avtViewInfo &viewInfo) const
// Hank Childs, Wed May 7 08:25:48 PDT 2003
// Always make sure we are dealing with a valid window.
//
// Kathleen Bonnell, Wed Jul 16 16:46:02 PDT 2003
// Call ScaleWindow (effective only in full-frame mode).
//
// ****************************************************************************
void
......@@ -273,6 +314,14 @@ avtView2D::SetViewportFromView(double *winViewport, const int width,
{
double valid_window[4];
GetValidWindow(valid_window);
//
// If full-frame mode is ON, then we want to scale our window coords
// before using them to set the viewport. (ScaleWindow does nothing if
// full-frame mode is OFF.) This is only a temporary scaling for use in
// this method as we always want the window coords stored here to
// display the extents of what the user is looking at.
//
ScaleWindow(valid_window);
double viewportDX, viewportDY, viewportDXDY;
double windowDX, windowDY, windowDXDY;
......@@ -403,3 +452,71 @@ avtView2D::SetToViewAttributes(ViewAttributes *viewAtts) const
viewAtts->SetViewportCoords(viewport);
}
// ****************************************************************************
// Method: avtView2D::ScaleWindow
//
// Purpose:
// Scale the passed window coordinates by the current axisScaleFactor.
// Scaling only occurs if full-frame mode is ON (axisScaleFactor != 0.)
//
// Arguments:
// swin The window coords to be scaled.
//
// Programmer: Kathleen Bonnell
// Creation: July 15, 2003
//
// ****************************************************************************
void
avtView2D::ScaleWindow(double *swin) const
{
if (axisScaleFactor != 0.)
{
if (axisScaleType == 0) // requires x-axis scaling
{
swin[0] *= axisScaleFactor;
swin[1] *= axisScaleFactor;
}
else // requires y-axis scaling
{
swin[2] *= axisScaleFactor;
swin[3] *= axisScaleFactor;
}
}
}
// ****************************************************************************
// Method: avtView2D::ReverseScaleWindow
//
// Purpose:
// Reverse the scaling of the passed window coordinates by the current
// axisScaleFactor. Scaling only occurs if full-frame mode is ON
// (axisScaleFactor != 0.)
//
// Arguments:
// swin The window coords to be scaled.
//
// Programmer: Kathleen Bonnell
// Creation: July 15, 2003
//
// ****************************************************************************
void
avtView2D::ReverseScaleWindow(double *swin) const
{
if (axisScaleFactor != 0.)
{
if (axisScaleType == 0) // requires x-axis scaling
{
swin[0] /= axisScaleFactor;
swin[1] /= axisScaleFactor;
}
else // requires y-axis scaling
{
swin[2] /= axisScaleFactor;
swin[3] /= axisScaleFactor;
}
}
}
......@@ -22,6 +22,9 @@ class ViewAttributes;
// Kathleen Bonnell, Thu May 15 09:46:46 PDT 2003
// Added members axisScaleFactor and axisScaleType.
//
// Kathleen Bonnell, Wed Jul 16 16:46:02 PDT 2003
// Added methods ScaleWindow and ReverseScaleWindow.
//
// ****************************************************************************
struct PIPELINE_API avtView2D
......@@ -45,6 +48,8 @@ struct PIPELINE_API avtView2D
protected:
void GetValidWindow(double *) const;
void ScaleWindow(double *) const;
void ReverseScaleWindow(double *) const;
};
......
......@@ -41,6 +41,9 @@ avtCurrentExtentFilter::Execute(void)
// Hank Childs, Fri Mar 15 18:11:12 PST 2002
// Account for avtDatasetExaminer.
//
// Hank Childs, Thu Jul 17 17:40:24 PDT 2003
// Treat 2D vectors as 3D since VTK will assume that vectors are 3D.
//
// ****************************************************************************
void
......@@ -49,6 +52,8 @@ avtCurrentExtentFilter::RefashionDataObjectInfo(void)
avtDataAttributes &atts = GetInput()->GetInfo().GetAttributes();
avtDataAttributes &outAtts = GetOutput()->GetInfo().GetAttributes();
int dataDim = atts.GetVariableDimension();
if (dataDim == 2)
dataDim = 3;
double *de = new double[dataDim*2];
avtDataset_p ds = GetTypedInput();
......
......@@ -336,6 +336,9 @@ avtSamplePointExtractor::ExecuteTree(avtDataTree_p dt)
// Hank Childs, Fri Dec 7 10:15:45 PST 2001
// Added early termination for zero-opacity cells.
//
// Hank Childs, Thu Jul 17 17:27:59 PDT 2003
// Don't extract VTK or AVT variables.
//
// ****************************************************************************
void
......@@ -355,6 +358,10 @@ avtSamplePointExtractor::ExtractHex(vtkHexahedron *hex, vtkDataSet *ds,
for (v = 0 ; v < ncd ; v++)
{
vtkDataArray *arr = cd->GetArray(v);
if (strstr(arr->GetName(), "vtk") != NULL)
continue;
if (strstr(arr->GetName(), "avt") != NULL)
continue;
float val = arr->GetComponent(hexind, 0);
for (i = 0 ; i < 8 ; i++)
{
......@@ -371,6 +378,10 @@ avtSamplePointExtractor::ExtractHex(vtkHexahedron *hex, vtkDataSet *ds,
for (v = 0 ; v < npd ; v++)
{
vtkDataArray *arr = pd->GetArray(v);
if (strstr(arr->GetName(), "vtk") != NULL)
continue;
if (strstr(arr->GetName(), "avt") != NULL)
continue;
vtkIdList *ids = hex->GetPointIds();
for (i = 0 ; i < 8 ; i++)
{
......@@ -429,6 +440,9 @@ avtSamplePointExtractor::ExtractHex(vtkHexahedron *hex, vtkDataSet *ds,
// Hank Childs, Fri Dec 7 10:15:45 PST 2001
// Added early termination for zero-opacity cells.
//
// Hank Childs, Thu Jul 17 17:27:59 PDT 2003
// Don't extract VTK or AVT variables.
//
// ****************************************************************************
void
......@@ -448,6 +462,10 @@ avtSamplePointExtractor::ExtractWedge(vtkWedge *wedge, vtkDataSet *ds,
for (v = 0 ; v < ncd ; v++)
{
vtkDataArray *arr = cd->GetArray(v);
if (strstr(arr->GetName(), "vtk") != NULL)
continue;
if (strstr(arr->GetName(), "avt") != NULL)
continue;
float val = arr->GetComponent(wedgeind, 0);
for (i = 0 ; i < 6 ; i++)
{
......@@ -464,6 +482,10 @@ avtSamplePointExtractor::ExtractWedge(vtkWedge *wedge, vtkDataSet *ds,
for (v = 0 ; v < npd ; v++)
{
vtkDataArray *arr = pd->GetArray(v);
if (strstr(arr->GetName(), "vtk") != NULL)
continue;
if (strstr(arr->GetName(), "avt") != NULL)
continue;
vtkIdList *ids = wedge->GetPointIds();
for (i = 0 ; i < 6 ; i++)
{
......@@ -522,6 +544,9 @@ avtSamplePointExtractor::ExtractWedge(vtkWedge *wedge, vtkDataSet *ds,
// Hank Childs, Fri Dec 7 10:15:45 PST 2001
// Added early termination for zero-opacity cells.
//
// Hank Childs, Thu Jul 17 17:27:59 PDT 2003
// Don't extract VTK or AVT variables.
//
// ****************************************************************************
void
......@@ -541,6 +566,10 @@ avtSamplePointExtractor::ExtractTet(vtkTetra *tet, vtkDataSet *ds,
for (v = 0 ; v < ncd ; v++)
{
vtkDataArray *arr = cd->GetArray(v);
if (strstr(arr->GetName(), "vtk") != NULL)
continue;
if (strstr(arr->GetName(), "avt") != NULL)
continue;
float val = arr->GetComponent(tetind, 0);
for (i = 0 ; i < 4 ; i++)
{
......@@ -557,6 +586,10 @@ avtSamplePointExtractor::ExtractTet(vtkTetra *tet, vtkDataSet *ds,
for (v = 0 ; v < npd ; v++)
{
vtkDataArray *arr = pd->GetArray(v);
if (strstr(arr->GetName(), "vtk") != NULL)
continue;
if (strstr(arr->GetName(), "avt") != NULL)
continue;
vtkIdList *ids = tet->GetPointIds();
for (i = 0 ; i < 4 ; i++)
{
......@@ -615,6 +648,9 @@ avtSamplePointExtractor::ExtractTet(vtkTetra *tet, vtkDataSet *ds,
// Hank Childs, Fri Dec 7 10:15:45 PST 2001
// Added early termination for zero-opacity cells.
//
// Hank Childs, Thu Jul 17 17:27:59 PDT 2003
// Don't extract VTK or AVT variables.
//
// ****************************************************************************
void
......@@ -634,6 +670,10 @@ avtSamplePointExtractor::ExtractPyramid(vtkPyramid *pyr, vtkDataSet *ds,
for (v = 0 ; v < ncd ; v++)
{
vtkDataArray *arr = cd->GetArray(v);
if (strstr(arr->GetName(), "vtk") != NULL)
continue;
if (strstr(arr->GetName(), "avt") != NULL)
continue;
float val = arr->GetComponent(pyrind, 0);
for (i = 0 ; i < 5 ; i++)
{
......@@ -650,6 +690,10 @@ avtSamplePointExtractor::ExtractPyramid(vtkPyramid *pyr, vtkDataSet *ds,
for (v = 0 ; v < npd ; v++)
{
vtkDataArray *arr = pd->GetArray(v);
if (strstr(arr->GetName(), "vtk") != NULL)
continue;
if (strstr(arr->GetName(), "avt") != NULL)
continue;
vtkIdList *ids = pyr->GetPointIds();
for (i = 0 ; i < 5 ; i++)
{
......@@ -708,6 +752,9 @@ avtSamplePointExtractor::ExtractPyramid(vtkPyramid *pyr, vtkDataSet *ds,
// Hank Childs, Fri Dec 7 10:15:45 PST 2001
// Added early termination for zero-opacity cells.
//
// Hank Childs, Thu Jul 17 17:27:59 PDT 2003
// Don't extract VTK or AVT variables.
//
// ****************************************************************************
void
......@@ -727,6 +774,10 @@ avtSamplePointExtractor::ExtractVoxel(vtkVoxel *voxel, vtkDataSet *ds,
for (v = 0 ; v < ncd ; v++)
{
vtkDataArray *arr = cd->GetArray(v);
if (strstr(arr->GetName(), "vtk") != NULL)
continue;
if (strstr(arr->GetName(), "avt") != NULL)
continue;
float val = arr->GetComponent(voxind, 0);
for (i = 0 ; i < 8 ; i++)
{
......@@ -748,6 +799,10 @@ avtSamplePointExtractor::ExtractVoxel(vtkVoxel *voxel, vtkDataSet *ds,
for (v = 0 ; v < npd ; v++)
{
vtkDataArray *arr = pd->GetArray(v);
if (strstr(arr->GetName(), "vtk") != NULL)
continue;
if (strstr(arr->GetName(), "avt") != NULL)
continue;
vtkIdList *ids = voxel->GetPointIds();
for (i = 0 ; i < 8 ; i++)
{
......
......@@ -488,6 +488,10 @@ avtActor::ShiftByVector(const float vec[3])
// Programmer: Kathleen Bonnell
// Creation: July 12, 2002
//
// Modifications:
// Kathleen Bonnell, Wed Jul 16 16:40:47 PDT 2003
// Scale the transparency actor.
//
// ****************************************************************************
void
......@@ -498,6 +502,10 @@ avtActor::ScaleByVector(const float vec[3])
{
decorations->ScaleByVector(vec);
}
if (transparencyActor != NULL && transparencyIndex >= 0)
{
transparencyActor->ScaleByVector(vec);
}
}
......
......@@ -989,3 +989,22 @@ avtTransparencyActor::PrepareDataset(int input, int subinput)
}
// ****************************************************************************
// Method: avtTransparencyActor::ScaleByVector
//
// Purpose:
// Scales the actor by a vector.
//
// Arguments:
// vec The vector to scale by.
//
// Programmer: Kathleen Bonnell
// Creation: July 16, 2003
//
// ****************************************************************************
void
avtTransparencyActor::ScaleByVector(const float vec[3])
{
myActor->SetScale(vec[0], vec[1], vec[2]);
}
......@@ -47,6 +47,9 @@ class vtkRenderer;
// Jeremy Meredith, Fri Jul 26 14:28:09 PDT 2002
// Made perfect sorting a permanent mode instead of a one-frame mode.
//
// Kathleen Bonnell, Wed Jul 16 16:39:02 PDT 2003
// Added ScaleByVector method.
//
// ****************************************************************************
class PLOTTER_API avtTransparencyActor
......@@ -76,6 +79,7 @@ class PLOTTER_API avtTransparencyActor
void AddToRenderer(vtkRenderer *);
void RemoveFromRenderer(vtkRenderer *);
void ScaleByVector(const float vec[3]);
protected:
std::vector<std::vector <vtkDataSet *> > datasets;
......
......@@ -744,6 +744,9 @@ VisWinAxes::AdjustRange(float min_x, float max_x, float min_y, float max_y)
// Hank Childs, Tue Sep 18 10:41:30 PDT 2001
// Casted to get rid of warning.
//
// Akira Haddox, Wed Jul 16 16:48:20 PDT 2003
// Added special case for when range is zero.
//
// ****************************************************************************
int
......@@ -751,6 +754,10 @@ Digits(float min, float max)
{
float range = max - min;
float pow10 = log10(range);
if (range <= 0)
pow10 = -5;
int ipow10 = (int)floor(pow10);
int digitsPastDecimal = -ipow10;
......
......@@ -1994,6 +1994,10 @@ VisWindow::ResetView(void)
// Removed call to ScalePlots. Added calls to FullFramOn/Off so that all
// colleagues can be notified when full-frame mode changes.
//
// Kathleen Bonnell, Wed Jul 16 16:32:43 PDT 2003
// Allow FullFrameOn to be called when scale factor changes, not just
// when full-frame turned on for first time.
//
// ****************************************************************************
void
......@@ -2007,13 +2011,13 @@ VisWindow::SetView2D(const avtView2D &v)
//
int fframe = 0;
if (v.axisScaleFactor > 0. && view2D.axisScaleFactor == 0.)
{
fframe = 1;
}
else if (v.axisScaleFactor == 0. && view2D.axisScaleFactor > 0.)
if (v.axisScaleFactor != view2D.axisScaleFactor)
{
fframe = 2;
fframe = 1;
if (v.axisScaleFactor == 0. && view2D.axisScaleFactor > 0.)
{
fframe = 2;
}
}
//
......
......@@ -817,7 +817,7 @@ Engine::WriteData(NonBlockingRPC *rpc, avtDataObjectWriter_p &writer)
}
visitTimer->StopTimer(collectData, "Collecting data");
// indicate that cumulative extents in data object good as true extents
// indicate that cumulative extents in data object now as good as true extents
ui_dob->GetInfo().GetAttributes().SetCanUseCummulativeAsTrueOrCurrent(true);
//
......@@ -891,6 +891,7 @@ Engine::WriteData(NonBlockingRPC *rpc, avtDataObjectWriter_p &writer)
#else // serial
avtDataObject_p dob = writer->GetInput();
dob->GetInfo().GetAttributes().SetCanUseCummulativeAsTrueOrCurrent(true);
avtDataValidity &v = dob->GetInfo().GetValidity();
if (!v.HasErrorOccurred())
{
......
......@@ -1368,6 +1368,10 @@ ViewerWindow::GetMaintainViewMode() const
// Kathleen Bonnell, Fri Jun 6 16:39:22 PDT 2003
// Removed call to ScalePlots. Now handled at VisWindow level.
//
// Kathleen Bonnell, Wed Jul 16 10:02:52 PDT 2003
// Removed scaling of view2D.window, handled by avtView2D.
// Moved test for valid bbox to Compute2DScaleFactor.
//
// ****************************************************************************
void
......@@ -1380,7 +1384,7 @@ ViewerWindow::SetFullFrameMode(const bool mode)
fullFrame = mode;
if (viewDimension == 2 && !GetTypeIsCurve() && boundingBoxValid2d)
if (viewDimension == 2 && !GetTypeIsCurve())
{
avtView2D view2D=visWindow->GetView2D();
if (fullFrame)
......@@ -1389,38 +1393,9 @@ ViewerWindow::SetFullFrameMode(const bool mode)
// Scale the window.
//
Compute2DScaleFactor(view2D.axisScaleFactor, view2D.axisScaleType);
if (view2D.axisScaleFactor != 0.)
{
if (view2D.axisScaleType == 0) // requires x-axis scaling
{
view2D.window[0] *= view2D.axisScaleFactor;
view2D.window[1] *= view2D.axisScaleFactor;
}
else // requires y-axis scaling
{
view2D.window[2] *= view2D.axisScaleFactor;
view2D.window[3] *= view2D.axisScaleFactor;
}
}
}
else
{
//
// Un-do the previous scaling on the window.
//
if (view2D.axisScaleFactor != 0.)
{
if (view2D.axisScaleType == 0) // requires x-axis scaling
{
view2D.window[0] /= view2D.axisScaleFactor;
view2D.window[1] /= view2D.axisScaleFactor;
}
else // requires y-axis scaling
{
view2D.window[2] /= view2D.axisScaleFactor;
view2D.window[3] /= view2D.axisScaleFactor;
}
}
view2D.axisScaleFactor = 0.;
}
......@@ -2293,6 +2268,10 @@ ViewerWindow::CopyViewAttributes(const ViewerWindow *source)
// I renamed camera to view normal in the view attributes. I added
// image pan and image zoom to the 3d view attributes.
//
// Kathleen Bonnell, Wed Jul 16 10:02:52 PDT 2003
// Don't instantiate new avtView2D, but retrieve from VisWindow so that
// axisScale information can be preserved.
//
// ****************************************************************************
void
......@@ -2308,7 +2287,7 @@ ViewerWindow::UpdateCameraView()
{
view2DAtts->GetAtts(animation->GetFrameIndex(), curView);
avtView2D view2d;
avtView2D view2d = visWindow->GetView2D();
const double *viewport=curView->GetViewportCoords();
const double *window=curView->GetWindowCoords();
......@@ -2756,6 +2735,9 @@ ViewerWindow::SetPlotColors(const double *bg, const double *fg)
// Kathleen Bonnell, Thu May 15 11:52:56 PDT 2003
// Added code to compute axis scale factor when in fullFrame mode.
//
// Kathleen Bonnell, Wed Jul 16 10:02:52 PDT 2003
// Don't scale view2D's window, handled in avtView2d.
//
// ****************************************************************************
void
......@@ -2795,16 +2777,6 @@ ViewerWindow::RecenterView2d(const double *limits)
if (fullFrame)
{
Compute2DScaleFactor(view2D.axisScaleFactor, view2D.axisScaleType);
if (view2D.axisScaleType == 0) // requires x-axis scaling
{
view2D.window[0] *= view2D.axisScaleFactor;
view2D.window[1] *= view2D.axisScaleFactor;
}
else // requires y-axis scaling
{
view2D.window[2] *= view2D.axisScaleFactor;
view2D.window[3] *= view2D.axisScaleFactor;
}
}
else
{
......@@ -2833,15 +2805,39 @@ ViewerWindow::RecenterView2d(const double *limits)
// Creation: May 13, 2003
//
// Modifications:
// Kathleen Bonnell, Wed Jul 16 16:32:43 PDT 2003
// Use boundingBox2d only if valid, otherwise retrieve plot extents.
//
// ****************************************************************************
void
ViewerWindow::Compute2DScaleFactor(double &s, int & t)
{
// assumes a valid boundingBox2d.
double width = boundingBox2d[1] - boundingBox2d[0];
double height = boundingBox2d[3] - boundingBox2d[2];
double width, height;
if (boundingBoxValid2d)
{
width = boundingBox2d[1] - boundingBox2d[0];
height = boundingBox2d[3] - boundingBox2d[2];
}
else
{
//
// Get the extents based on the plot limits.
//
double ext[4];
GetExtents(2, ext);
if (ext[0] == DBL_MAX && ext[1] == -DBL_MAX)
{
// no scaling can take place, plot limits invalid.
s = 0.;
t = 1; // scale the y_axis (default)
return;
}
width = ext[1] - ext[0];
height = ext[3] - ext[2];
}
if (width > height && height > 0.)
{
s = width / height;
......@@ -3103,6 +3099,9 @@ ViewerWindow::RecenterViewCurve(const double *limits)
// Kathleen Bonnell, Thu May 15 11:52:56 PDT 2003
// Create a square window by scaling, if in fullFrame mode.
//
// Kathleen Bonnell, Wed Jul 16 10:02:52 PDT 2003
// Don't scale view2D's window, handled in avtView2d.
//
// ****************************************************************************
void
......@@ -3136,19 +3135,6 @@ ViewerWindow::ResetView2d()
if (fullFrame)
{
Compute2DScaleFactor(view2D.axisScaleFactor, view2D.axisScaleType);
if (view2D.axisScaleFactor != 0.)
{
if (view2D.axisScaleType == 0) // requires x-axis scaling
{
view2D.window[0] *= view2D.axisScaleFactor;
view2D.window[1] *= view2D.axisScaleFactor;
}
else // requires y-axis scaling
{
view2D.window[2] *= view2D.axisScaleFactor;
view2D.window[3] *= view2D.axisScaleFactor;
}
}
}
else
{
......
......@@ -1729,12 +1729,16 @@ ViewerWindowManager::SetInteractionMode(INTERACTION_MODE m,
// Brad Whitlock, Tue Nov 19 14:40:03 PST 2002
// I changed UpdateViewAtts so the 3d view will not be sent to the client.
//
// Kathleen Bonnell, Tue Jul 15 08:30:52 PDT 2003
// Retrieve active window's 2d view, instead of instantiating a new one,
// so that scale factor for full-frame mode is not lost during update.
//
// ****************************************************************************
void
ViewerWindowManager::SetView2DFromClient()
{
avtView2D view2d;
avtView2D view2d = windows[activeWindow]->GetView2D();
const double *viewport=view2DClientAtts->GetViewportCoords();
const double *window=view2DClientAtts->GetWindowCoords();
......
......@@ -793,6 +793,9 @@ inline double fsign(double value, double sign)
// Kathleen Bonnell, Fri Jul 6 14:48:53 PDT 2001
// Added support for drawing gridlines.
//
// Akira Haddox, Wed Jul 16 16:45:48 PDT 2003
// Added special case for when range is too small.
//
// *******************************************************************
void vtkHankAxisActor2D::AdjustLabelsComputeRange(float inRange[2],
......@@ -861,6 +864,19 @@ void vtkHankAxisActor2D::AdjustLabelsComputeRange(float inRange[2],
}
minor = (fxt/div) / 10.;
// When we get too close, we lose the tickmarks. Run some special case code.
if (minor == 0)
{
numTicks = 3;
ticksize[0] = (float)major_tick;
proportion[0] = 0.0;
ticksize[1] = (float)major_tick;
proportion[1] = 0.5;
ticksize[2] = (float)major_tick;
proportion[2] = 1.0;
return;
}
// Figure out the first major and minor tick locations, relative to the
// start of the axis.
if (sortedRange[0] < 0.)
......
......@@ -622,6 +622,10 @@ void vtkVerticalScalarBarActor:: BuildTics(float width, float height)
// Don't modify the lookup table, since that causes display lists to
/