[vtkusers] vtkCommand Question

naresh naresh at winner.co.in
Thu Aug 5 08:52:27 EDT 2010


Hi

I am using vtkCommand for InteractionEvent for vtkBoxWidget. In Execute 
function i am trying to split sphere using vtkClipCloseSurface two times but 
only one part is rendering at time means second parts not goes visible or 
might not spliting .

If i split it outside the Execute function that i works fine.So is there any 
limitation in Execute Function ?

Here is referance code.


virtual void Execute(vtkObject *caller, unsigned long eventID, void*)

{

vtkBoxWidget *widget = reinterpret_cast<vtkBoxWidget*>(caller);

// Clip Red part

vtkPlaneCollection* planeColRed = vtkPlaneCollection::New();

planeColRed->AddItem(planes->GetPlane(0)); // X min plane

ClipperRed->SetClippingPlanes(planeColRed);

ClipperRed->Modified();


planeColRed->Delete();

// Clip Blue part

vtkPlaneCollection* planeColBlue = vtkPlaneCollection::New();

planeColBlue->AddItem(planes->GetPlane(1)); // X max plane

ClipperBlue->SetClippingPlanes(planeColBlue);

ClipperBlue->Modified();

// Clean up

planeColBlue->Delete();


planes->Delete();

}







More information about the vtkusers mailing list