2 // 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)
4 #include "bbcreaVtkMeshReduction_DecimatePro.h"
5 #include "bbcreaVtkPackage.h"
11 BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaVtk,MeshReduction_DecimatePro)
12 BBTK_BLACK_BOX_IMPLEMENTATION(MeshReduction_DecimatePro,bbtk::AtomicBlackBox);
14 // 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)
16 void MeshReduction_DecimatePro::Process()
18 // THE MAIN PROCESSING METHOD BODY
19 // Here we simply set the input 'In' value to the output 'Out'
20 // And print out the output value
21 // INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
22 // void bbSet{Input|Output}NAME(const TYPE&)
23 // const TYPE& bbGet{Input|Output}NAME() const
25 // * NAME is the name of the input/output
26 // (the one provided in the attribute 'name' of the tag 'input')
27 // * TYPE is the C++ type of the input/output
28 // (the one provided in the attribute 'type' of the tag 'input')
32 decimatepro = vtkDecimatePro::New();
34 if (bbGetInputIn()!=NULL)
36 decimatepro->SetInputData( bbGetInputIn() );
37 decimatepro->SetTargetReduction( bbGetInputTargetReduction() );
38 decimatepro->PreserveTopologyOn();
39 decimatepro->Update();
40 bbSetOutputOut(decimatepro->GetOutput() );
42 bbSetOutputOut( NULL );
46 // 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)
48 void MeshReduction_DecimatePro::bbUserSetDefaultValues()
51 // SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
52 // Here we initialize the input 'In' to 0
56 bbSetInputTargetReduction(0.5);
57 bbSetOutputOut( NULL );
60 // 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)
62 void MeshReduction_DecimatePro::bbUserInitializeProcessing()
65 // THE INITIALIZATION METHOD BODY :
67 // but this is where you should allocate the internal/output pointers
73 // 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)
75 void MeshReduction_DecimatePro::bbUserFinalizeProcessing()
78 // THE FINALIZATION METHOD BODY :
80 // but this is where you should desallocate the internal/output pointers
83 if (decimatepro!=NULL)
85 decimatepro->Delete();
90 // EO namespace bbcreaVtk