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 "bbcreaMaracasVisuChangeInformationPoint3Dto2D.h"
5 #include "bbcreaMaracasVisuPackage.h"
6 namespace bbcreaMaracasVisu
9 BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaMaracasVisu,ChangeInformationPoint3Dto2D)
10 BBTK_BLACK_BOX_IMPLEMENTATION(ChangeInformationPoint3Dto2D,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 ChangeInformationPoint3Dto2D::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')
30 // bbSetOutputOut( bbGetInputIn() );
31 // std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
33 std::vector<double> normal;
34 std::vector<double> outpoint;
36 if ( bbGetInputInPoint().size()==3 )
39 if (bbGetInputDirection() == 0)
44 bbSetOutputNormalVector(normal);
45 outpoint.push_back( bbGetInputInPoint()[1] );
46 outpoint.push_back( bbGetInputInPoint()[2] );
47 outpoint.push_back( bbGetInputInPoint()[0] );
48 bbSetOutputOutPoint(outpoint);
51 if (bbGetInputDirection() == 1)
56 bbSetOutputNormalVector(normal);
57 outpoint.push_back( bbGetInputInPoint()[0] );
58 outpoint.push_back( bbGetInputInPoint()[2] );
59 outpoint.push_back( bbGetInputInPoint()[1] );
60 bbSetOutputOutPoint(outpoint);
63 if (bbGetInputDirection() == 2)
68 bbSetOutputNormalVector(normal);
69 outpoint.push_back( bbGetInputInPoint()[0] );
70 outpoint.push_back( bbGetInputInPoint()[1] );
71 outpoint.push_back( bbGetInputInPoint()[2] );
72 bbSetOutputOutPoint(outpoint);
75 } // if bbGetInputInPoint Size
79 // 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)
81 void ChangeInformationPoint3Dto2D::bbUserSetDefaultValues()
84 // SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
85 // Here we initialize the input 'In' to 0
87 bbSetInputDirection(2);
91 // 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)
93 void ChangeInformationPoint3Dto2D::bbUserInitializeProcessing()
96 // THE INITIALIZATION METHOD BODY :
98 // but this is where you should allocate the internal/output pointers
104 // 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)
106 void ChangeInformationPoint3Dto2D::bbUserFinalizeProcessing()
109 // THE FINALIZATION METHOD BODY :
111 // but this is where you should desallocate the internal/output pointers
116 // EO namespace bbcreaMaracasVisu