MCPcopy Create free account
hub / github.com/Kitware/VTK / ClipWithVtkClipDataSet

Method ClipWithVtkClipDataSet

Filters/ParallelGeometry/vtkPDistributedDataFilter.cxx:2644–2683  ·  view source on GitHub ↗

------------------------------------------------------------------------------ this is here temporarily, until vtkBoxClipDataSet is fixed to be able to generate the clipped output

Source from the content-addressed store, hash-verified

2642// this is here temporarily, until vtkBoxClipDataSet is fixed to
2643// be able to generate the clipped output
2644void vtkPDistributedDataFilter::ClipWithVtkClipDataSet(
2645 vtkUnstructuredGrid *grid, double *bounds,
2646 vtkUnstructuredGrid **outside, vtkUnstructuredGrid **inside)
2647{
2648 vtkUnstructuredGrid *in;
2649 vtkUnstructuredGrid *out ;
2650
2651 vtkClipDataSet *clipped = vtkClipDataSet::New();
2652
2653 vtkBox *box = vtkBox::New();
2654 box->SetBounds(bounds);
2655
2656 clipped->SetClipFunction(box);
2657 box->Delete();
2658 clipped->SetValue(0.0);
2659 clipped->InsideOutOn();
2660
2661 clipped->SetInputData(grid);
2662
2663 if (outside)
2664 {
2665 clipped->GenerateClippedOutputOn();
2666 }
2667
2668 clipped->Update();
2669
2670 if (outside)
2671 {
2672 out = clipped->GetClippedOutput();
2673 out->Register(this);
2674 *outside = out;
2675 }
2676
2677 in = clipped->GetOutput();
2678 in->Register(this);
2679 *inside = in;
2680
2681
2682 clipped->Delete();
2683}
2684#endif
2685
2686//------------------------------------------------------------------------------

Callers 1

Calls 9

DeleteMethod · 0.65
NewFunction · 0.50
SetBoundsMethod · 0.45
SetValueMethod · 0.45
SetInputDataMethod · 0.45
UpdateMethod · 0.45
GetClippedOutputMethod · 0.45
RegisterMethod · 0.45
GetOutputMethod · 0.45

Tested by

no test coverage detected