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 "bbvtkText3D.h"
5 #include "bbvtkPackage.h"
7 #include "vtkTextActor3D.h"
8 #include "vtkTextProperty.h"
14 BBTK_ADD_BLACK_BOX_TO_PACKAGE(vtk,Text3D)
15 BBTK_BLACK_BOX_IMPLEMENTATION(Text3D,bbtk::AtomicBlackBox);
17 // 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)
19 void Text3D::Process()
22 // THE MAIN PROCESSING METHOD BODY
23 // Here we simply set the input 'In' value to the output 'Out'
24 // And print out the output value
25 // INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
26 // void bbSet{Input|Output}NAME(const TYPE&)
27 // const TYPE& bbGet{Input|Output}NAME() const
29 // * NAME is the name of the input/output
30 // (the one provided in the attribute 'name' of the tag 'input')
31 // * TYPE is the C++ type of the input/output
32 // (the one provided in the attribute 'type' of the tag 'input')
34 vtkTextActor3D *textActor = vtkTextActor3D::New();
35 vtkTextProperty *textprop = vtkTextProperty::New();
36 textprop->SetColor( bbGetInputColour()[0] , bbGetInputColour()[1], bbGetInputColour()[2] );
37 textprop->SetFontSize( 14 );
39 textActor->SetTextProperty( textprop );
41 textActor->SetInput( bbGetInputIn().c_str() );
42 textActor->SetPosition( bbGetInputX(), bbGetInputY(),bbGetInputZ() );
43 bbGetInputRenderer()->AddActor( textActor );
44 bbSetOutputOut(textActor);
48 // 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)
50 void Text3D::bbUserSetDefaultValues()
53 // SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
54 // Here we initialize the input 'In' to 0
55 bbSetInputIn("<void>");
60 std::vector<double> colour;
64 bbSetInputColour(colour);
65 bbSetInputRenderer(NULL);
68 // 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)
70 void Text3D::bbUserInitializeProcessing()
73 // THE INITIALIZATION METHOD BODY :
75 // but this is where you should allocate the internal/output pointers
81 // 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)
83 void Text3D::bbUserFinalizeProcessing()
86 // THE FINALIZATION METHOD BODY :
88 // but this is where you should desallocate the internal/output pointers