Commit a2cdabd8 authored by Brad King's avatar Brad King
Browse files

ENH: vtkSpline::MakeObject() is now deprecated.

parent b2e9dffb
......@@ -39,12 +39,6 @@ public:
vtkTypeRevisionMacro(vtkCardinalSpline,vtkSpline);
void PrintSelf(ostream& os, vtkIndent indent);
// Description:
// Virtual constructor creates a spline of the same type as this one.
// Note that the created spline does not copy the data from this instance.
virtual vtkSpline *MakeObject()
{ return vtkCardinalSpline::New(); }
// Description
// Compute Cardinal Splines for each dependent variable
void Compute ();
......
......@@ -59,12 +59,6 @@ public:
// DefaultTension = 0, DefaultContinuity = 0.
static vtkKochanekSpline *New();
// Description:
// Virtual constructor creates a spline of the same type as this one.
// Note that the created spline does not copy the data from this instance.
virtual vtkSpline *MakeObject()
{ return vtkKochanekSpline::New(); }
// Description:
// Compute Kochanek Spline coefficients.
void Compute ();
......
......@@ -19,7 +19,7 @@
#include "vtkPiecewiseFunction.h"
vtkCxxRevisionMacro(vtkSpline, "1.19");
vtkCxxRevisionMacro(vtkSpline, "1.20");
// Construct a spline wth the folloing defaults:
// ClampValueOff
......@@ -147,3 +147,12 @@ void vtkSpline::PrintSelf(ostream& os, vtkIndent indent)
os << indent << "Closed: " << (this->Closed ? "On\n" : "Off\n");
}
//----------------------------------------------------------------------------
#ifndef VTK_REMOVE_LEGACY_CODE
vtkSpline* vtkSpline::MakeObject()
{
VTK_LEGACY_METHOD(MakeObject, "4.2");
return this->NewInstance();
}
#endif
......@@ -51,10 +51,11 @@ public:
vtkTypeRevisionMacro(vtkSpline,vtkObject);
void PrintSelf(ostream& os, vtkIndent indent);
#ifndef VTK_REMOVE_LEGACY_CODE
// Description:
// Virtual constructor creates a spline of the same type as this one.
// Note that the created spline does not copy the data from this instance.
virtual vtkSpline *MakeObject() = 0;
// For legacy compatibility. Do not use.
virtual vtkSpline* MakeObject();
#endif
// Description:
// Set/Get ClampValue. If On, results of the interpolation will be
......
......@@ -23,7 +23,7 @@
#include "vtkObjectFactory.h"
#include "vtkPolyData.h"
vtkCxxRevisionMacro(vtkSplineFilter, "1.9");
vtkCxxRevisionMacro(vtkSplineFilter, "1.10");
vtkStandardNewMacro(vtkSplineFilter);
vtkCxxSetObjectMacro(vtkSplineFilter,Spline,vtkSpline);
......@@ -114,11 +114,11 @@ void vtkSplineFilter::Execute()
outCD->CopyAllocate(cd,numNewCells);
// Set up the splines
this->XSpline = this->Spline->MakeObject();
this->XSpline = this->Spline->NewInstance();
this->XSpline->DeepCopy(this->Spline);
this->YSpline = this->Spline->MakeObject();
this->YSpline = this->Spline->NewInstance();
this->YSpline->DeepCopy(this->Spline);
this->ZSpline = this->Spline->MakeObject();
this->ZSpline = this->Spline->NewInstance();
this->ZSpline->DeepCopy(this->Spline);
// Create points along each polyline.
......
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