Commit bb327498 authored by js9's avatar js9

Adding a 3D equivalent of full-frame mode, where you can scale

the view without scaling the dimensions of the plot.


git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@11430 18c085ea-50e0-402c-830e-de6fd14e8384
parent bb7570b3
......@@ -1969,8 +1969,8 @@ vtkVisItCubeAxesActor::AdjustTicksComputeRange(vtkVisItAxisActor *axes[4])
}
else
{
majorStart = major*(ffix(sortedRange[0]*(1./major) + .9999));
minorStart = minor*(ffix(sortedRange[0]*(1./minor) + .9999));
majorStart = major*(ffix(sortedRange[0]*(1./major) + .999));
minorStart = minor*(ffix(sortedRange[0]*(1./minor) + .999));
}
for (int i = 0; i < 4; i++)
......
......@@ -85,6 +85,9 @@ avtView3D::avtView3D()
// Eric Brugger, Mon Feb 9 16:02:13 PST 2004
// Added centerOfRotationSet and centerOfRotation.
//
// Jeremy Meredith, Wed May 19 14:15:58 EDT 2010
// Support 3D axis scaling (3D equivalent of full-frame mode).
//
// ****************************************************************************
avtView3D &
......@@ -112,6 +115,10 @@ avtView3D::operator=(const avtView3D &vi)
centerOfRotation[0] = vi.centerOfRotation[0];
centerOfRotation[1] = vi.centerOfRotation[1];
centerOfRotation[2] = vi.centerOfRotation[2];
axis3DScaleFlag = vi.axis3DScaleFlag;
axis3DScales[0] = vi.axis3DScales[0];
axis3DScales[1] = vi.axis3DScales[1];
axis3DScales[2] = vi.axis3DScales[2];
return *this;
}
......@@ -135,6 +142,9 @@ avtView3D::operator=(const avtView3D &vi)
// Eric Brugger, Mon Feb 9 16:02:13 PST 2004
// Added centerOfRotationSet and centerOfRotation.
//
// Jeremy Meredith, Wed May 19 14:15:58 EDT 2010
// Support 3D axis scaling (3D equivalent of full-frame mode).
//
// ****************************************************************************
bool
......@@ -165,12 +175,20 @@ avtView3D::operator==(const avtView3D &vi)
return false;
}
if (axis3DScales[0] != vi.axis3DScales[0] ||
axis3DScales[1] != vi.axis3DScales[1] ||
axis3DScales[2] != vi.axis3DScales[2])
{
return false;
}
if (viewAngle != vi.viewAngle || parallelScale != vi.parallelScale ||
nearPlane != vi.nearPlane || farPlane != vi.farPlane ||
imagePan[0] != vi.imagePan[0] || imagePan[1] != vi.imagePan[1] ||
imageZoom != vi.imageZoom || perspective != vi.perspective ||
eyeAngle != vi.eyeAngle ||
centerOfRotationSet != vi.centerOfRotationSet)
centerOfRotationSet != vi.centerOfRotationSet ||
axis3DScaleFlag != vi.axis3DScaleFlag)
{
return false;
}
......@@ -202,6 +220,9 @@ avtView3D::operator==(const avtView3D &vi)
// Eric Brugger, Mon Feb 9 16:02:13 PST 2004
// Added centerOfRotationSet and centerOfRotation.
//
// Jeremy Meredith, Wed May 19 14:15:58 EDT 2010
// Support 3D axis scaling (3D equivalent of full-frame mode).
//
// ****************************************************************************
void
......@@ -229,6 +250,10 @@ avtView3D::SetToDefault()
centerOfRotation[0] = 0.;
centerOfRotation[1] = 0.;
centerOfRotation[2] = 0.;
axis3DScaleFlag = false;
axis3DScales[0] = 1.0;
axis3DScales[1] = 1.0;
axis3DScales[2] = 1.0;
}
// ****************************************************************************
......@@ -364,6 +389,9 @@ avtView3D::SetViewInfoFromView(avtViewInfo &viewInfo) const
// Eric Brugger, Mon Feb 9 16:02:13 PST 2004
// Added centerOfRotationSet and centerOfRotation.
//
// Jeremy Meredith, Wed May 19 14:15:58 EDT 2010
// Support 3D axis scaling (3D equivalent of full-frame mode).
//
// ****************************************************************************
void
......@@ -375,6 +403,7 @@ avtView3D::SetFromView3DAttributes(const View3DAttributes *view3DAtts)
focus[i] = view3DAtts->GetFocus()[i];
viewUp[i] = view3DAtts->GetViewUp()[i];
centerOfRotation[i] = view3DAtts->GetCenterOfRotation()[i];
axis3DScales[i] = view3DAtts->GetAxis3DScales()[i];
}
viewAngle = view3DAtts->GetViewAngle();
......@@ -387,6 +416,7 @@ avtView3D::SetFromView3DAttributes(const View3DAttributes *view3DAtts)
perspective = view3DAtts->GetPerspective();
eyeAngle = view3DAtts->GetEyeAngle();
centerOfRotationSet = view3DAtts->GetCenterOfRotationSet();
axis3DScaleFlag = view3DAtts->GetAxis3DScaleFlag();
}
// ****************************************************************************
......@@ -411,6 +441,9 @@ avtView3D::SetFromView3DAttributes(const View3DAttributes *view3DAtts)
// Eric Brugger, Mon Feb 9 16:02:13 PST 2004
// Added centerOfRotationSet and centerOfRotation.
//
// Jeremy Meredith, Wed May 19 14:15:58 EDT 2010
// Support 3D axis scaling (3D equivalent of full-frame mode).
//
// ****************************************************************************
void
......@@ -429,4 +462,6 @@ avtView3D::SetToView3DAttributes(View3DAttributes *view3DAtts) const
view3DAtts->SetEyeAngle(eyeAngle);
view3DAtts->SetCenterOfRotationSet(centerOfRotationSet);
view3DAtts->SetCenterOfRotation(centerOfRotation);
view3DAtts->SetAxis3DScaleFlag(axis3DScaleFlag);
view3DAtts->SetAxis3DScales(axis3DScales);
}
......@@ -73,6 +73,9 @@ class View3DAttributes;
// Eric Brugger, Mon Feb 9 15:59:15 PST 2004
// Added centerOfRotationSet and centerOfRotation.
//
// Jeremy Meredith, Wed May 19 14:15:58 EDT 2010
// Support 3D axis scaling (3D equivalent of full-frame mode).
//
// ****************************************************************************
struct AVTVIEW_API avtView3D
......@@ -90,6 +93,8 @@ struct AVTVIEW_API avtView3D
bool perspective;
bool centerOfRotationSet;
double centerOfRotation[3];
bool axis3DScaleFlag;
double axis3DScales[3];
public:
avtView3D();
......
......@@ -370,7 +370,7 @@ VisWinAxes3D::RemoveAxes3DFromWindow(void)
// bounds The bounds as min-x, max-x, min-y, max-y, min-z, and max-z.
//
// Programmer: Kathleen Bonnell
// Creation: June 20, 2l01
// Creation: June 20, 2001
//
// Modifications:
// Kathleen Bonnell, Tue Oct 30 10:30:10 PST 2001
......@@ -386,19 +386,33 @@ VisWinAxes3D::RemoveAxes3DFromWindow(void)
// For now, we set the range to be the same as the bounds until we
// add support for independent control.
//
// Jeremy Meredith, Wed May 19 14:15:58 EDT 2010
// Account for 3D axis scaling (3D equivalent of full-frame mode).
// This affects the extents where the bounding box is drawn, but
// not the labels applied to the axes.
//
// ****************************************************************************
void
VisWinAxes3D::SetBounds(double bounds[6])
VisWinAxes3D::SetBounds(double bounds[6], double scales[3])
{
bool boundsChanged = false;
// See if any bounds have changed
for (int i = 0; i < 6 ; i++)
{
if (currentBounds[i] == bounds[i])
{
continue;
}
boundsChanged = true;
break;
}
// Scaling affects the bounds
for (int i = 0; i < 3 ; i++)
{
if (currentScaleFactors[i] == scales[i])
continue;
boundsChanged = true;
break;
......@@ -406,6 +420,17 @@ VisWinAxes3D::SetBounds(double bounds[6])
if (boundsChanged)
{
currentBounds[0] = bounds[0];
currentBounds[1] = bounds[1];
currentBounds[2] = bounds[2];
currentBounds[3] = bounds[3];
currentBounds[4] = bounds[4];
currentBounds[5] = bounds[5];
currentScaleFactors[0] = scales[0];
currentScaleFactors[1] = scales[1];
currentScaleFactors[2] = scales[2];
double fudgeX;
double fudgeY;
double fudgeZ;
......@@ -434,16 +459,30 @@ VisWinAxes3D::SetBounds(double bounds[6])
// Add a fudge-factor to prevent axes from being obscured by plots
// that fill their full extents.
//
currentBounds[0] = bounds[0] - fudgeX;
currentBounds[1] = bounds[1] + fudgeX;
currentBounds[2] = bounds[2] - fudgeY;
currentBounds[3] = bounds[3] + fudgeY;
currentBounds[4] = bounds[4] - fudgeZ;
currentBounds[5] = bounds[5] + fudgeZ;
axes->SetBounds(currentBounds);
axes->SetRanges(currentBounds);
axesBoxSource->SetBounds(currentBounds);
double fudgedBounds[6] = {
bounds[0] - fudgeX,
bounds[1] + fudgeX,
bounds[2] - fudgeY,
bounds[3] + fudgeY,
bounds[4] - fudgeZ,
bounds[5] + fudgeZ
};
axes->SetRanges(fudgedBounds);
//
// Yeah, scale the fudge factors as well
//
double scaledBounds[6] = {
fudgedBounds[0] * scales[0],
fudgedBounds[1] * scales[0],
fudgedBounds[2] * scales[1],
fudgedBounds[3] * scales[1],
fudgedBounds[4] * scales[2],
fudgedBounds[5] * scales[2]
};
axes->SetBounds(scaledBounds);
axesBoxSource->SetBounds(scaledBounds);
}
}
......@@ -1363,3 +1402,33 @@ VisWinAxes3D::UpdateLabelTextAttributes(double fr, double fg, double fb)
labelTextAttributes[2].scale);
}
// ****************************************************************************
// Method: VisWinAxes3D::Set3DAxisScalingFactors
//
// Purpose:
// Scaling factors affect the bounds. If these have changed, then
// update the bounds with the new info.
//
// Arguments:
// scale true if scaling applied
// s the axis scaling factors
//
// Programmer: Jeremy Meredith
// Creation: May 19, 2010
//
// ****************************************************************************
void
VisWinAxes3D::Set3DAxisScalingFactors(bool scale,
const double s[3])
{
double newS[3] = {scale ? s[0] : 1, scale ? s[1] : 1, scale ? s[2] : 1};
bool dirty = (s[0] != currentScaleFactors[0]) ||
(s[1] != currentScaleFactors[1]) ||
(s[2] != currentScaleFactors[2]);
if (dirty)
{
SetBounds(currentBounds, newS);
}
}
......@@ -90,6 +90,9 @@ class vtkOutlineSource;
// Jeremy Meredith, Wed May 5 14:32:23 EDT 2010
// Added support for title visibility separate from label visibility.
//
// Jeremy Meredith, Wed May 19 14:15:58 EDT 2010
// Account for 3D axis scaling (3D equivalent of full-frame mode).
//
// ****************************************************************************
class VISWINDOW_API VisWinAxes3D : public VisWinColleague
......@@ -109,7 +112,7 @@ class VISWINDOW_API VisWinAxes3D : public VisWinColleague
virtual void NoPlots(void);
virtual void ReAddToWindow(void);
void SetBounds(double [6]);
void SetBounds(double [6], double scales[3]);
void SetXTickVisibility(int, int);
void SetYTickVisibility(int, int);
void SetZTickVisibility(int, int);
......@@ -149,6 +152,9 @@ class VISWINDOW_API VisWinAxes3D : public VisWinColleague
const VisWinTextAttributes &xAxis,
const VisWinTextAttributes &yAxis,
const VisWinTextAttributes &zAxis);
void Set3DAxisScalingFactors(bool scale,
const double s[3]);
protected:
void UpdateTitleTextAttributes(double fr, double fg, double fb);
void UpdateLabelTextAttributes(double fr, double fg, double fb);
......@@ -160,6 +166,7 @@ class VISWINDOW_API VisWinAxes3D : public VisWinColleague
bool addedAxes3D;
double currentBounds[6];
double currentScaleFactors[3];
bool visibility;
std::string userXTitle;
......
......@@ -118,6 +118,9 @@ class ColorAttribute;
// Eric Brugger, Tue Dec 9 14:25:37 PST 2008
// Added the AxisParallel window mode.
//
// Jeremy Meredith, Wed May 19 14:15:58 EDT 2010
// Account for 3D axis scaling (3D equivalent of full-frame mode).
//
// ****************************************************************************
class VISWINDOW_API VisWinColleague
......@@ -174,6 +177,8 @@ class VISWINDOW_API VisWinColleague
virtual void FullFrameOn(const double, const int) {;};
virtual void FullFrameOff(void) {;};
virtual void Set3DAxisScalingFactors(bool,const double s[3]){}
virtual void SetFrameAndState(int, int, int, int,
int, int, int) {;};
......
......@@ -274,6 +274,10 @@ VisWinPlots::~VisWinPlots()
// Mark C. Miller, Thu Jun 21 00:12:28 PDT 2007
// Added support to overlay curve plots on 2D plots.
// Reset scale vec to all 1's if not in full frame mode.
//
// Jeremy Meredith, Wed May 19 14:15:58 EDT 2010
// Account for 3D axis scaling (3D equivalent of full-frame mode).
//
// ****************************************************************************
void
......@@ -300,6 +304,7 @@ VisWinPlots::AddPlot(avtActor_p &p)
p->SetTransparencyActor(transparencyActor);
double vec[3] = { 1. , 1., 1.};
double axisscale[3] = { 1. , 1., 1.};
if (mediator.GetFullFrameMode())
{
double scale;
......@@ -311,6 +316,10 @@ VisWinPlots::AddPlot(avtActor_p &p)
vec[1] = scale;
p->ScaleByVector(vec);
}
else if (mediator.Get3DAxisScalingFactors(axisscale))
{
p->ScaleByVector(axisscale);
}
else
{
p->ScaleByVector(vec);
......@@ -343,6 +352,16 @@ VisWinPlots::AddPlot(avtActor_p &p)
{
double bounds[6];
GetRealBounds(bounds);
double axisscale[3] = { 1. , 1., 1.};
if (mediator.Get3DAxisScalingFactors(axisscale))
{
bounds[0] *= axisscale[0];
bounds[1] *= axisscale[0];
bounds[2] *= axisscale[1];
bounds[3] *= axisscale[1];
bounds[4] *= axisscale[2];
bounds[5] *= axisscale[2];
}
SetBoundingBox(bounds);
p->VisibilityOff();
}
......@@ -676,6 +695,9 @@ VisWinPlots::SetViewExtentsType(avtExtentType vt)
// Mark C. Miller, Wed Jun 8 10:53:46 PDT 2005
// Used new SaveVisibility interface for externally rendered images actor
//
// Jeremy Meredith, Wed May 19 14:15:58 EDT 2010
// Account for 3D axis scaling (3D equivalent of full-frame mode).
//
// ****************************************************************************
void
......@@ -710,6 +732,16 @@ VisWinPlots::StartBoundingBox(void)
//
double bounds[6];
GetRealBounds(bounds);
double axisscale[3] = { 1. , 1., 1.};
if (mediator.Get3DAxisScalingFactors(axisscale))
{
bounds[0] *= axisscale[0];
bounds[1] *= axisscale[0];
bounds[2] *= axisscale[1];
bounds[3] *= axisscale[1];
bounds[4] *= axisscale[2];
bounds[5] *= axisscale[2];
}
SetBoundingBox(bounds);
bbox->VisibilityOn();
......@@ -1937,6 +1969,33 @@ VisWinPlots::FullFrameOff()
}
// ****************************************************************************
// Method: VisWinPlots::Set3DAxisScalingFactors
//
// Purpose:
// Scales the 3D plots.
//
// Programmer: Jeremy Meredith
// Creation: December 21, 2009
//
// ****************************************************************************
void
VisWinPlots::Set3DAxisScalingFactors(bool scale, const double s[3])
{
double vec[3] = {1., 1., 1.};
if (scale)
{
vec[0] = s[0];
vec[1] = s[1];
vec[2] = s[2];
}
ScalePlots(vec);
}
// ****************************************************************************
// Method: VisWinPlots::TransparenciesExist
//
......
......@@ -194,6 +194,9 @@ class avtTransparencyActor;
// Tom Fogal, Mon May 25 18:20:46 MDT 2009
// Added GetTransparencyActor method.
//
// Jeremy Meredith, Wed May 19 14:15:58 EDT 2010
// Account for 3D axis scaling (3D equivalent of full-frame mode).
//
// ****************************************************************************
class VISWINDOW_API VisWinPlots : public VisWinColleague
......@@ -256,6 +259,8 @@ class VISWINDOW_API VisWinPlots : public VisWinColleague
virtual void FullFrameOn(const double, const int);
virtual void FullFrameOff(void);
virtual void Set3DAxisScalingFactors(bool scale,
const double s[3]);
bool DoAllPlotsAxesHaveSameUnits();
bool TransparenciesExist(void);
......
......@@ -253,6 +253,9 @@ VisWinQuery::SetForegroundColor(double fr, double fg, double fb)
// Kathleen Bonnell, Fri Jun 11 14:49:39 PDT 2004
// Add back in the line that computes and sets the Scale for a pick.
//
// Jeremy Meredith, Wed May 19 14:15:58 EDT 2010
// Account for 3D axis scaling (3D equivalent of full-frame mode).
//
// ****************************************************************************
void
......@@ -286,6 +289,18 @@ VisWinQuery::UpdateView()
it->pickActor->Translate(transVec);
}
}
else
{
double scale[3] = {1,1,1};
if (mediator.Get3DAxisScalingFactors(scale))
{
double newShift[3] = {shiftVec[0]/scale[0],
shiftVec[1]/scale[1],
shiftVec[2]/scale[2]};
it->pickActor->ResetPosition(newShift);
it->pickActor->Translate(scale);
}
}
it->pickActor->UpdateView();
}
}
......@@ -1195,3 +1210,40 @@ VisWinQuery::Start3DMode()
// Remove 2d pick actors if they exists
ClearPickPoints(2);
}
// ****************************************************************************
// Method: VisWinQuery::Set3DAxisScalingFactors
//
// Purpose:
// Reset the pick point positions in 3D if the scaling changes.
//
// Programmer: Jeremy Meredith
// Creation: May 19, 2010
//
// ****************************************************************************
void
VisWinQuery::Set3DAxisScalingFactors(bool doscaling,const double scale[3])
{
if (!pickPoints.empty())
{
double distance = CalculateShiftDistance();
double shiftVec[3];
CreateShiftVector(shiftVec, distance);
std::vector< PickEntry >::iterator it;
for (it = pickPoints.begin() ; it != pickPoints.end() ; it++)
{
if (doscaling)
{
double newShift[3] = {shiftVec[0]/scale[0],
shiftVec[1]/scale[1],
shiftVec[2]/scale[2]};
it->pickActor->ResetPosition(newShift);
it->pickActor->Translate(scale);
}
else
{
it->pickActor->ResetPosition(shiftVec);
}
}
}
}
......@@ -110,6 +110,9 @@
// inappropriate for the new mode can be removed. Added optional int arg
// to ClearPickPoints method.
//
// Jeremy Meredith, Wed May 19 14:15:58 EDT 2010
// Account for 3D axis scaling (3D equivalent of full-frame mode).
//
// ****************************************************************************
class VISWINDOW_API VisWinQuery : public VisWinColleague
{
......@@ -136,6 +139,7 @@ class VISWINDOW_API VisWinQuery : public VisWinColleague
virtual void FullFrameOn(const double, const int);
virtual void FullFrameOff(void);
virtual void ReAddToWindow(void);
virtual void Set3DAxisScalingFactors(bool,const double s[3]);
void GetVisualCues(const VisualCueInfo::CueType cueType,
std::vector<const VisualCueInfo *>& cues) const;
......
......@@ -1173,6 +1173,28 @@ VisWinTools::FullFrameOff()
}
// ****************************************************************************
// Method: VisWinTools::Set3DAxisScalingFactors
//
// Purpose:
// Update tools with any new 3D scaling settings.
//
// Arguments:
// scale true if scaling is enabled
// s the axis scaling factors
//
// Programmer: Jeremy Meredith
// Creation: May 19, 2010
//
// ****************************************************************************
void
VisWinTools::Set3DAxisScalingFactors(bool scale, const double s[3])
{
for(int i = 0; i < numTools; ++i)
tools[i]->Set3DAxisScalingFactors(scale, s);
}
// ****************************************************************************
// Method: VisWinTools::UpdatePlotList
//
......
......@@ -105,6 +105,9 @@ class vtkHighlightActor2D;
// Jeremy Meredith, Tue Apr 22 14:33:01 EDT 2008
// Removed Extents tool. (Subsumed by axis restriction tool.)
//
// Jeremy Meredith, Wed May 19 11:00:51 EDT 2010
// Added support for 3D axis scaling.
//
// ****************************************************************************
class VISWINDOW_API VisWinTools : public VisWinColleague
......@@ -143,6 +146,8 @@ class VISWINDOW_API VisWinTools : public VisWinColleague
virtual void FullFrameOn(const double, const int);
virtual void FullFrameOff(void);
virtual void Set3DAxisScalingFactors(bool scale, const double s[3]);
protected:
void ClearHighlight();
void RegenerateHighlight();
......
......@@ -142,6 +142,9 @@
// plot, and the functionality has been accomodated in a new window
// modality supporting the correct style annotations.
//
// Jeremy Meredith, Wed May 19 14:15:58 EDT 2010
// Support 3D axis scaling (3D equivalent of full-frame mode).
//
// ****************************************************************************
class VISWINDOW_API VisWindowColleagueProxy : public VisWindowProtectionProxy
......@@ -229,6 +232,9 @@ class VISWINDOW_API VisWindowColleagueProxy : public VisWindowProtectionProxy
bool GetFullFrameMode()
{ return ProxiedGetFullFrameMode(); };
bool Get3DAxisScalingFactors(double s[3])
{ return ProxiedGet3DAxisScalingFactors(s); }
bool GetSpecularFlag()
{ return ProxiedGetSpecularFlag(); };
......
......@@ -1138,6 +1138,27 @@ VisWindowProtectionProxy::ProxiedGetBackgroundMode() const
return viswin->GetBackgroundMode();
}
// ****************************************************************************
// Method: VisWindowProtectionProxy::ProxiedGet3DAxisScalingFactors
//
// Purpose:
// Return the 3D axis scaling factors and enabled flag.
//
// Arguments:
// s (o) the scaling factors
//
// Returns: true if scaling is enabled
//
// Programmer: Jeremy Meredith
// Creation: May 19, 2010
//
// ****************************************************************************
bool
VisWindowProtectionProxy::ProxiedGet3DAxisScalingFactors(double s[3])
{
return viswin->Get3DAxisScalingFactors(s);
}
// ****************************************************************************
// Method: VisWindowProtectionProxy::ProxiedGetToolUpdateMode
......
......@@ -163,6 +163,9 @@ class VisitInteractor;
// Jeremy Meredith, Tue Feb 2 13:45:02 EST 2010
// Added tool update mode.
//
// Jeremy Meredith, Wed May 19 14:15:58 EDT 2010
// Support 3D axis scaling (3D equivalent of full-frame mode).
//
// ****************************************************************************
class VISWINDOW_API VisWindowProtectionProxy
......@@ -226,6 +229,7 @@ class VISWINDOW_API VisWindowProtectionProxy
void ProxiedReAddColleaguesToRenderWindow();
bool ProxiedGetAntialiasing();
bool ProxiedGetFullFrameMode();
bool ProxiedGet3DAxisScalingFactors(double s[3]);
bool ProxiedGetSpecularFlag();
double ProxiedGetSpecularCoeff();
double ProxiedGetSpecularPower();
......
......@@ -83,6 +83,9 @@
// Jeremy Meredith, Tue Feb 2 11:12:10 EST 2010
// Added GetToolUpdateMode.
//
// Jeremy Meredith, Wed May 19 14:15:58 EDT 2010
// Support 3D axis scaling (3D equivalent of full-frame mode).
//
// ****************************************************************************
class VISWINDOW_API VisWindowToolProxy : public VisWindowProtectionProxy
......@@ -144,6 +147,9 @@ class VISWINDOW_API VisWindowToolProxy : public VisWindowProtectionProxy
void GetScaleFactorAndType(double &scale, int &type)
{ ProxiedGetScaleFactorAndType(scale, type); };
bool Get3DAxisScalingFactors(double s[3])
{ return ProxiedGet3DAxisScalingFactors(s); }
bool TransparenciesExist()
{ return ProxiedTransparenciesExist(); };
......
......@@ -77,6 +77,9 @@
// Brad Whitlock, Tue Jul 13 14:11:03 PST 2004
// I changed how the hotpoints work for this tool.
//
// Jeremy Meredith, Wed May 19 14:15:58 EDT 2010
// Account for 3D axis scaling (3D equivalent of full-frame mode).
//
// ****************************************************************************
VisitBoxTool::VisitBoxTool(VisWindowToolProxy &p) : VisitInteractiveTool(p),
......@@ -169,6 +172,16 @@ VisitBoxTool::VisitBoxTool(VisWindowToolProxy &p) : VisitInteractiveTool(p),
//
double extents[6];
proxy.GetBounds(extents);
double axisscale[3];
if (proxy.Get3DAxisScalingFactors(axisscale))
{
extents[0] *= axisscale[0];
extents[1] *= axisscale[0];
extents[2] *= axisscale[1];
extents[3] *= axisscale[1];
extents[4] *= axisscale[2];