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 "bbcreaVtkMeshManager.h"
5 #include "bbcreaVtkPackage.h"
9 MeshManagerModel_Box::MeshManagerModel_Box( MeshManager *box )
14 MeshManagerModel_Box::~MeshManagerModel_Box( )
18 void MeshManagerModel_Box::RefreshOutputs(bool signalBox)
20 mBox->bbSetOutputMeshBase( GetMeshBase() );
21 mBox->bbSetOutputMeshTemp( GetMeshTemp() );
22 mBox->bbSetOutputMeshNames( GetMeshNames() );
23 mBox->bbSetOutputAllPolyDatas( GetAllPolyDatas() );
24 mBox->bbSetOutputMeshSelection( GetCurrentMesh() );
27 mBox->bbSignalOutputModification();
32 BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaVtk,MeshManager)
33 BBTK_BLACK_BOX_IMPLEMENTATION(MeshManager,bbtk::AtomicBlackBox);
35 // 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)
37 void MeshManager::Process()
39 // THE MAIN PROCESSING METHOD BODY
40 // Here we simply set the input 'In' value to the output 'Out'
41 // And print out the output value
42 // INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
43 // void bbSet{Input|Output}NAME(const TYPE&)
44 // const TYPE& bbGet{Input|Output}NAME() const
46 // * NAME is the name of the input/output
47 // (the one provided in the attribute 'name' of the tag 'input')
48 // * TYPE is the C++ type of the input/output
49 // (the one provided in the attribute 'type' of the tag 'input')
50 // bbSetOutputOut( bbGetInputIn() );
51 // std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
53 if (meshManagerModel_Box==NULL)
55 meshManagerModel_Box = new MeshManagerModel_Box(this);
56 if(bbGetInputMemoryMode() == false){
57 meshManagerModel_Box->MeshMemoryModeOff();
58 meshManagerModel_Box->AddMeshes_( bbGetInputMeshVector() );
59 meshManagerModel_Box->AddMesh_( bbGetInputMesh() );
60 meshManagerModel_Box->ResetHistory();
62 meshManagerModel_Box->MeshMemoryModeOn();
63 meshManagerModel_Box->SetHistory(50);
64 meshManagerModel_Box->AddMesh_( bbGetInputMesh() );
65 meshManagerModel_Box->SaveMemoryMode();
67 //meshManagerModel_Box->SetMeshBase( bbGetInputMesh() );
68 meshManagerModel_Box->RefreshOutputs(false);
69 bbSetOutputMeshManagerModel( meshManagerModel_Box );
70 } // if meshManagerModel_Box
74 // 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)
76 void MeshManager::bbUserSetDefaultValues()
78 // SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
79 // Here we initialize the input 'In' to 0
81 meshManagerModel_Box = NULL;
86 // 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)
88 void MeshManager::bbUserInitializeProcessing()
90 // THE INITIALIZATION METHOD BODY :
92 // but this is where you should allocate the internal/output pointers
97 // 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)
99 void MeshManager::bbUserFinalizeProcessing()
101 // THE FINALIZATION METHOD BODY :
103 // but this is where you should desallocate the internal/output pointers
107 } // EO namespace bbcreaVtk