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() );
26 mBox->bbSignalOutputModification();
31 BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaVtk,MeshManager)
32 BBTK_BLACK_BOX_IMPLEMENTATION(MeshManager,bbtk::AtomicBlackBox);
34 // 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)
36 void MeshManager::Process()
38 // THE MAIN PROCESSING METHOD BODY
39 // Here we simply set the input 'In' value to the output 'Out'
40 // And print out the output value
41 // INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
42 // void bbSet{Input|Output}NAME(const TYPE&)
43 // const TYPE& bbGet{Input|Output}NAME() const
45 // * NAME is the name of the input/output
46 // (the one provided in the attribute 'name' of the tag 'input')
47 // * TYPE is the C++ type of the input/output
48 // (the one provided in the attribute 'type' of the tag 'input')
49 // bbSetOutputOut( bbGetInputIn() );
50 // std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
52 if (meshManagerModel_Box==NULL)
54 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();
63 meshManagerModel_Box->MeshMemoryModeOn();
64 meshManagerModel_Box->SetHistory(50);
65 meshManagerModel_Box->AddMesh_( bbGetInputMesh() );
66 meshManagerModel_Box->SaveMemoryMode();
69 //meshManagerModel_Box->SetMeshBase( bbGetInputMesh() );
70 meshManagerModel_Box->RefreshOutputs(false);
71 bbSetOutputMeshManagerModel( meshManagerModel_Box );
72 } // if meshManagerModel_Box
76 // 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)
78 void MeshManager::bbUserSetDefaultValues()
80 // SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
81 // Here we initialize the input 'In' to 0
83 meshManagerModel_Box = NULL;
88 // 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)
90 void MeshManager::bbUserInitializeProcessing()
92 // THE INITIALIZATION METHOD BODY :
94 // but this is where you should allocate the internal/output pointers
99 // 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)
101 void MeshManager::bbUserFinalizeProcessing()
103 // THE FINALIZATION METHOD BODY :
105 // but this is where you should desallocate the internal/output pointers
109 } // EO namespace bbcreaVtk