]> Creatis software - creaVtk.git/blob - bbtk_creaVtk_PKG/src/bbcreaVtkMeshManager_tool.cxx
bda31e1b44a90818c75af3cb1514f33a543bbc5e
[creaVtk.git] / bbtk_creaVtk_PKG / src / bbcreaVtkMeshManager_tool.cxx
1 //===== 
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)
3 //===== 
4 #include "bbcreaVtkMeshManager_tool.h"
5 #include "bbcreaVtkPackage.h"
6 namespace bbcreaVtk
7 {
8
9 BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaVtk,MeshManager_tool)
10 BBTK_BLACK_BOX_IMPLEMENTATION(MeshManager_tool,bbtk::AtomicBlackBox);
11 //===== 
12 // 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)
13 //===== 
14 void MeshManager_tool::Process()
15 {
16 // THE MAIN PROCESSING METHOD BODY
17 //   Here we simply set the input 'In' value to the output 'Out'
18 //   And print out the output value
19 // INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
20 //    void bbSet{Input|Output}NAME(const TYPE&)
21 //    const TYPE& bbGet{Input|Output}NAME() const 
22 //    Where :
23 //    * NAME is the name of the input/output
24 //      (the one provided in the attribute 'name' of the tag 'input')
25 //    * TYPE is the C++ type of the input/output
26 //      (the one provided in the attribute 'type' of the tag 'input')
27 //    bbSetOutputOut( bbGetInputIn() );
28 //    std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
29
30     if (bbGetInputMeshManagerModel()!=NULL)
31     {
32         if (bbGetInputTool()==10) // Undo
33         {
34             printf("EED Warning!   MeshManager_tool Undo   Not implemented.\n");
35         } // if Tool 10 Undo
36         
37         if (bbGetInputTool()==20) // Redo
38         {
39             printf("EED Warning!   MeshManager_tool Redo   Not implemented.\n");
40         } // if Tool 20 Redo
41
42         if (bbGetInputTool()==30)  // Set
43         {
44             printf("EED    MeshManager_tool::Process Set\n");
45             if (bbGetInputMesh()!=NULL){
46                 vtkPoints   *points = bbGetInputMesh()->GetPoints();
47                 if (points!=NULL)
48                 {
49                     bbGetInputMeshManagerModel()->SetMeshBase( bbGetInputMesh() );
50                 } // if points!=NULL
51             } // Mesh!=NULL
52         } // if Tool 30 Set
53
54         if (bbGetInputTool()==40) // Reset
55         {
56             printf("EED Warning!   MeshManager_tool Reset   Not implemented.\n");
57         } // if Tool 40 Reset
58     } else {
59         printf("EED Warning! MeshManager_tool : MeshManagerModel not defined. \n");
60     }// if MeshManagerModel != NULL
61 }
62
63 //===== 
64 // 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)
65 //===== 
66 void MeshManager_tool::bbUserSetDefaultValues()
67 {
68 //  SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX 
69 //    Here we initialize the input 'In' to 0
70    bbSetInputTool(0);
71    bbSetInputMesh(NULL);
72    bbSetInputMeshManagerModel(NULL);
73 }
74
75 //===== 
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)
77 //===== 
78 void MeshManager_tool::bbUserInitializeProcessing()
79 {
80 //  THE INITIALIZATION METHOD BODY :
81 //    Here does nothing 
82 //    but this is where you should allocate the internal/output pointers 
83 //    if any
84 }
85 //===== 
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)
87 //===== 
88 void MeshManager_tool::bbUserFinalizeProcessing()
89 {
90 //  THE FINALIZATION METHOD BODY :
91 //    Here does nothing 
92 //    but this is where you should desallocate the internal/output pointers 
93 //    if any
94 }
95
96 } // EO namespace bbcreaVtk
97
98