Commit 7b92333a authored by Philippe Pébay's avatar Philippe Pébay
Browse files

Added an ivar for smallest radial angle distinguishable from polar

Change-Id: Ieb0a08623382788ac6bb52eebe753febec68fe3a
parent cc1686e0
......@@ -68,6 +68,7 @@ void vtkPolarAxesActor::PrintSelf( ostream& os, vtkIndent indent )
os << indent << "Auto-Scale Radius" << this->AutoScaleRadius << endl;
os << indent << "Minimum Angle" << this->MinimumAngle << endl;
os << indent << "Maximum Angle" << this->MaximumAngle << endl;
os << indent << "Smallest Visible Polar Angle" << this->SmallestVisiblePolarAngle << endl;
os << indent << "Radial Units (degrees): "
<< ( this->RadialUnits ? "On\n" : "Off\n" ) << endl;
......@@ -144,6 +145,9 @@ vtkPolarAxesActor::vtkPolarAxesActor() : vtkActor()
// Default maximum polar angle
this->MaximumAngle = VTK_DEFAULT_MAXIMUM_POLAR_ANGLE;
// Default smallest radial angle distinguishable from polar axis
this->SmallestVisiblePolarAngle = .5;
// By default show angle units (degrees)
this->RadialUnits = true;
......@@ -528,6 +532,12 @@ void vtkPolarAxesActor::BuildAxes( vtkViewport *viewport )
{
// Prevent conflict between radial and polar axes titles
axis->SetTitleVisibility( false );
if ( fabs( alpha ) < this->SmallestVisiblePolarAngle )
{
// Do not show radial axes too close to polar axis
axis->SetAxisVisibility( false );
}
}
else
{
......
......@@ -110,6 +110,13 @@ public:
vtkSetClampMacro( MaximumAngle, double, 0., 360. );
vtkGetMacro( MaximumAngle, double );
// Description:
// Set/Get the minimum radial angle distinguishable from polar axis
// NB: This is used only when polar axis is visible
// Default: 0.5
vtkSetClampMacro( SmallestVisiblePolarAngle, double, 0., 5. );
vtkGetMacro( SmallestVisiblePolarAngle, double );
// Description: Set/Get whether angle units (degrees) are used to label radial axes
// Default: true
vtkSetMacro( RadialUnits, bool );
......@@ -308,6 +315,10 @@ protected:
// Maximum polar angle
double MaximumAngle;
// Description:
// Smallest radial angle distinguishable from polar axis
double SmallestVisiblePolarAngle;
// Description:
// Explicit actor bounds
double Bounds[6];
......
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