[vtkusers] vtkContourWidget Initialize
dean.inglis at camris.ca
dean.inglis at camris.ca
Thu Oct 4 10:32:27 EDT 2007
there does not appear to be a method
to reset vtkContourWidget to its initial
undefined state. I had been using a modified
local version so that I could do this:
widget->Initialize(NULL);
which would clear out the representation
and leave the widget in define state:
void vtkContourWidget::Initialize( vtkPolyData * pd, int state )
{
if (this->WidgetRep)
{
vtkContourRepresentation *rep =
reinterpret_cast<vtkContourRepresentation*>(this->WidgetRep);
if ( pd == NULL )
{
while( rep->DeleteLastNode() );
rep->ClosedLoopOff();
this->WidgetState = vtkContourWidget::Define;
rep->BuildRepresentation();
return;
}
rep->Initialize( pd );
this->WidgetState = (rep->GetClosedLoop() || state == 1 ) ?
vtkContourWidget::Manipulate : vtkContourWidget::Define;
}
}
but this is not working as expected.
Any suggestions?
regards,
Dean
More information about the vtkusers
mailing list