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().empty())
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() );
19 // The calculation of the transformations are made
21 // We get the results of transformer and set it as result of this box
22 bbSetOutputOut( transformer->GetResult() );
26 bbSetOutputOut( NULL );
30 void Transform2DBox::bbUserSetDefaultValues()
32 //We initialize the points with an empty vector, the angle in 0 and the scales in 1
33 std::vector<int> nuevo(3,0);
35 bbSetInputCenterPoint(nuevo);
37 bbSetInputScaleX(100);
38 bbSetInputScaleY(100);
39 bbSetInputScaleZ(100);
43 void Transform2DBox::bbUserInitializeProcessing()
45 //We initialize the transformer
46 transformer=new Transformer();
50 void Transform2DBox::bbUserFinalizeProcessing()
52 //We delete the transformer
57 // EO namespace bbPackRecalage