Commit 892850d4 authored by Philippe Pébay's avatar Philippe Pébay
Browse files

Added a MinimumAngle iVar to the API; set defaults

Change-Id: I49fda312ce73277471a5c99ffe6fa3f14d7477fa
parent 0bab713b
......@@ -66,6 +66,7 @@ void vtkPolarAxesActor::PrintSelf( ostream& os, vtkIndent indent )
os << indent << "Maximum Radius" << this->MaximumRadius << endl;
os << indent << "Auto-Scale Radius" << this->AutoScaleRadius << endl;
os << indent << "Minimum Angle" << this->MinimumAngle << endl;
os << indent << "Maximum Angle" << this->MaximumAngle << endl;
os << indent << "Radial Units (degrees): "
<< ( this->RadialUnits ? "On\n" : "Off\n" ) << endl;
......@@ -130,6 +131,9 @@ vtkPolarAxesActor::vtkPolarAxesActor() : vtkActor()
// Do not auto-scale radius by default
this->AutoScaleRadius = false;
// Default minimum polar angle
this->MinimumAngle = 0.;
// Default maximum polar angle
this->MaximumAngle = VTK_DEFAULT_MAXIMUM_POLAR_ANGLE;
......@@ -680,7 +684,7 @@ void vtkPolarAxesActor::BuildPolarAxisTicks( double x0 )
axis->SetMajorRangeStart( 0. );
axis->SetDeltaRangeMajor( delta );
axis->SetMajorStart( VTK_AXIS_TYPE_X, x0 );
// Build in numerical robustness
// Build in numerical robustness to avoid truncation errors at endpoint
delta *= VTK_POLAR_AXES_ACTOR_RTOL;
axis->SetDeltaMajor( VTK_AXIS_TYPE_X, delta );
}
......
......@@ -98,17 +98,18 @@ public:
vtkSetMacro( AutoScaleRadius,bool );
vtkGetMacro( AutoScaleRadius,bool );
// Description:
// Set/Get the minimum radius of the polar coordinates (in degrees).
// Default: 0.
vtkSetClampMacro( MinimumAngle, double, 0., 360. );
vtkGetMacro( MinimumAngle, double );
// Description:
// Set/Get the maximum radius of the polar coordinates (in degrees).
// Default: VTK_DEFAULT_MAXIMUM_POLAR_ANGLE
vtkSetClampMacro( MaximumAngle, double, 0., 360. );
vtkGetMacro( MaximumAngle, double );
// Description:
// Set/Get the RebuildAxes flag
vtkSetMacro( RebuildAxes, bool );
vtkGetMacro( RebuildAxes, bool );
// Description: Set/Get whether angle units (degrees) are used to label radial axes
// Default: true
vtkSetMacro( RadialUnits, bool );
......@@ -272,7 +273,11 @@ protected:
bool AutoScaleRadius;
// Description:
// Maximum polar angle (minimum is always 0)
// Minimum polar angle
double MinimumAngle;
// Description:
// Maximum polar angle
double MaximumAngle;
// Description:
......@@ -293,8 +298,6 @@ protected:
// Control variables for radial axes
vtkAxisActor** RadialAxes;
bool RebuildAxes;
// Description:
// Title to be used for the polar axis
// NB: The other axes use the polar angle value as a title
......
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