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 "bbcreaMaracasVisuChangeInformation3Dto2DforRuler.h"
5 #include "bbcreaMaracasVisuPackage.h"
6 namespace bbcreaMaracasVisu
9 BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaMaracasVisu,ChangeInformation3Dto2DforRuler)
10 BBTK_BLACK_BOX_IMPLEMENTATION(ChangeInformation3Dto2DforRuler,bbtk::AtomicBlackBox);
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)
14 void ChangeInformation3Dto2DforRuler::Process()
17 // THE MAIN PROCESSING METHOD BODY
18 // Here we simply set the input 'In' value to the output 'Out'
19 // And print out the output value
20 // INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
21 // void bbSet{Input|Output}NAME(const TYPE&)
22 // const TYPE& bbGet{Input|Output}NAME() const
24 // * NAME is the name of the input/output
25 // (the one provided in the attribute 'name' of the tag 'input')
26 // * TYPE is the C++ type of the input/output
27 // (the one provided in the attribute 'type' of the tag 'input')
28 // bbSetOutputOut( bbGetInputIn() );
29 // std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
32 std::vector<double> rotationvector;
33 std::vector<double> outpointX;
34 std::vector<double> outpointY;
35 std::vector<double> outpointZ;
39 rotationvector.push_back( bbGetInputAngle() ); // angle
40 if (bbGetInputDirection() == 0)
42 rotationvector.push_back(1); // vx
43 rotationvector.push_back(0); // vy
44 rotationvector.push_back(0); // vz
47 if (bbGetInputDirection() == 1)
49 rotationvector.push_back(0); // vx
50 rotationvector.push_back(1); // vy
51 rotationvector.push_back(0); // vz
54 if (bbGetInputDirection() == 2)
56 rotationvector.push_back(0); // vx
57 rotationvector.push_back(0); // vy
58 rotationvector.push_back(1); // vz
60 bbSetOutputNormalVector(rotationvector);
64 if (bbGetInputDirection() == 0)
66 outpointX.push_back( 900 );
67 outpointX.push_back( 900 );
68 outpointY.push_back( 0 );
69 outpointY.push_back( 0+bbGetInputSize() );
70 outpointZ.push_back( 0 );
71 outpointZ.push_back( 0 );
74 if (bbGetInputDirection() == 1)
76 outpointX.push_back( 0 );
77 outpointX.push_back( 0+bbGetInputSize() );
78 outpointY.push_back( -900 );
79 outpointY.push_back( -900 );
80 outpointZ.push_back( 0 );
81 outpointZ.push_back( 0 );
84 if (bbGetInputDirection() == 2)
86 outpointX.push_back( 0 );
87 outpointX.push_back( 0+bbGetInputSize() );
88 outpointY.push_back( 0 );
89 outpointY.push_back( 0 );
90 outpointZ.push_back( -900 );
91 outpointZ.push_back( -900 );
93 bbSetOutputOutPointX(outpointX);
94 bbSetOutputOutPointY(outpointY);
95 bbSetOutputOutPointZ(outpointZ);
100 // 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)
102 void ChangeInformation3Dto2DforRuler::bbUserSetDefaultValues()
105 // SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
106 // Here we initialize the input 'In' to 0
109 bbSetInputDirection(2);
116 // 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)
118 void ChangeInformation3Dto2DforRuler::bbUserInitializeProcessing()
121 // THE INITIALIZATION METHOD BODY :
123 // but this is where you should allocate the internal/output pointers
129 // 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)
131 void ChangeInformation3Dto2DforRuler::bbUserFinalizeProcessing()
134 // THE FINALIZATION METHOD BODY :
136 // but this is where you should desallocate the internal/output pointers
141 // EO namespace bbcreaMaracasVisu