1 #include "bbPackRecalageTransform2DBox.h"
2 #include "bbPackRecalagePackage.h"
3 namespace bbPackRecalage
6 BBTK_ADD_BLACK_BOX_TO_PACKAGE(PackRecalage,Transform2DBox)
7 BBTK_BLACK_BOX_IMPLEMENTATION(Transform2DBox,bbtk::AtomicBlackBox);
8 void Transform2DBox::Process()
10 if(bbGetInputCenterPoint()[0])
12 // The inputs are set in the library transformer
13 transformer->SetCenterPoint( bbGetInputCenterPoint() );
14 transformer->SetAngle( bbGetInputAngle() );
15 transformer->SetScaleX( bbGetInputScaleX() );
16 transformer->SetScaleY( bbGetInputScaleY() );
17 transformer->SetScaleZ( bbGetInputScaleZ() );
18 // The calculation of the transformations are made
20 // We get the results of transformer and set it as result of this box
21 bbSetOutputOut( transformer->GetResult() );
25 bbSetOutputOut( NULL );
29 void Transform2DBox::bbUserSetDefaultValues()
31 //We initialize the points with an empty vector, the angle in 0 and the scales in 1
32 std::vector<int> nuevo(3,0);
34 bbSetInputCenterPoint(nuevo);
36 bbSetInputScaleX(100);
37 bbSetInputScaleY(100);
38 bbSetInputScaleZ(100);
42 void Transform2DBox::bbUserInitializeProcessing()
44 //We initialize the transformer
45 transformer=new Transformer();
49 void Transform2DBox::bbUserFinalizeProcessing()
51 //We delete the transformer
56 // EO namespace bbPackRecalage