//===== // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost) //===== #include "bbvtkPlaneClipPolyData.h" #include "bbvtkPackage.h" namespace bbvtk { BBTK_ADD_BLACK_BOX_TO_PACKAGE(vtk,PlaneClipPolyData) BBTK_BLACK_BOX_IMPLEMENTATION(PlaneClipPolyData,bbtk::AtomicBlackBox); //===== // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost) //===== void PlaneClipPolyData::Process() { //std::cout << "RaC PlaneClipPolyData::Process START"<< std::endl; std::vector origin = bbGetInputPlaneOrigin(); std::vector normal = bbGetInputPlaneNormal(); vtkPolyData* inPolyData = bbGetInputPolyData(); vtkPlane* plane = vtkPlane::New(); plane->SetOrigin(origin[0],origin[1],origin[2]); plane->SetNormal(normal[0],normal[1],normal[2]); vtkClipPolyData* clipper = vtkClipPolyData::New(); clipper->SetInputConnection(inPolyData->GetProducerPort()); clipper->SetClipFunction(plane); clipper->Update(); vtkPolyData* outPolydata = clipper->GetOutput(); bbSetOutputClippedPolyData(outPolydata); // std::cout << "RaC PlaneClipPolyData::Process END "<