[vtk-developers] spline widget design query (quandry?)

Dean Inglis dean.inglis at on.aibn.com
Tue Dec 3 15:43:14 EST 2002


Hi,

I added a small fix to vtkSplineWidget after looking
at other  vtk_Some_Kind_Of_Spline tcl examples:
changed the parametric variable range passed to the
internal spline so that it no longer goes from 0-1
(see cvs).
Now an externally allocated spline (Kochanek, Cardinal)
can be set up so that the widget's splines are, for example,
set to ClosedOn etc.  I'm wondering if it is better to 
make the widget's API set up so the superclass (vtkSpline)
methods, such as ClosedOn etc., are echoed in the widget:
e.g.,
aSplineWidget->ClosedOn();

implementation:

void vtkSplineWidget::ClosedOn(void)
{
  this->XSpline->ClosedOn();
  this->YSpline->ClosedOn();
  this->ZSpline->ClosedOn();
  this->FixUpTheHandleLocationsAccordingly();
}

etc.

or, is it better to let the user manually do this in an
application.  The former ensures consistency between x,y,z
splines (but only through the superclass, vtkSpline, API)
as well as enabling the spline widget to 'evenly' space 
out the widget handles.

Any thoughts?
Dean






More information about the vtk-developers mailing list