Commit 57a041b3 authored by Philippe Pébay's avatar Philippe Pébay
Browse files

Create/delete polar arcs, set visibility, add them to rendering

Change-Id: Iea47cb9cfcb391cb005620b8bc8faa9cf07368a1
parent c860b649
......@@ -174,6 +174,13 @@ vtkPolarAxesActor::vtkPolarAxesActor() : vtkActor()
// Default tick location, defined in vtkAxisActor
this->TickLocation = VTK_TICKS_BOTH;
// Create and set polar arcs and ancillary objects
this->PolarArcs = vtkPolyData::New();
this->PolarArcsMapper = vtkPolyDataMapper::New();
this->PolarArcsMapper->SetInput( this->PolarArcs );
this->PolarArcsActor = vtkActor::New();
this->PolarArcsActor->SetMapper( this->PolarArcsMapper );
// By default all features are visible
this->RadialAxesVisibility = 1;
this->RadialTitleVisibility = 1;
......@@ -246,6 +253,23 @@ vtkPolarAxesActor::~vtkPolarAxesActor()
delete [] this->RadialAxes;
this->RadialAxes = NULL;
}
if (this->PolarArcs)
{
this->PolarArcs->Delete();
this->PolarArcs = NULL;
}
if (this->PolarArcsMapper)
{
this->PolarArcsMapper->Delete();
this->PolarArcsMapper = NULL;
}
if (this->PolarArcsActor)
{
this->PolarArcsActor->Delete();
this->PolarArcsActor = NULL;
}
}
// ****************************************************************************
......@@ -342,6 +366,8 @@ void vtkPolarAxesActor::ReleaseGraphicsResources( vtkWindow *win )
{
this->RadialAxes[i]->ReleaseGraphicsResources( win );
}
this->PolarArcsActor->ReleaseGraphicsResources(win);
}
// *************************************************************************
......
......@@ -163,6 +163,12 @@ public:
vtkGetMacro( PolarTickVisibility, int );
vtkBooleanMacro( PolarTickVisibility, int );
// Description:
// Turn on and off the visibility of arcs for polar axis.
vtkSetMacro( PolarArcsVisibility, int );
vtkGetMacro( PolarArcsVisibility, int );
vtkBooleanMacro( PolarArcsVisibility, int );
// Description:
// Set/Get the polar axis title text property.
virtual void SetPolarAxisTitleTextProperty(vtkTextProperty *p);
......@@ -295,9 +301,10 @@ void BuildPolarAxisTicks( double );
int RadialAxesVisibility;
int RadialTitleVisibility;
// Visibility of labels and ticks (major only) on polar axis
// Visibility of polar labels, ticks (major only), and arcs
int PolarLabelVisibility;
int PolarTickVisibility;
int PolarArcsVisibility;
char *RadialLabelFormat;
......
Supports Markdown
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