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"
11 BBTK_ADD_BLACK_BOX_TO_PACKAGE(vtk,Text3D)
12 BBTK_BLACK_BOX_IMPLEMENTATION(Text3D,bbtk::AtomicBlackBox);
14 // 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)
16 void Text3D::Process()
19 // THE MAIN PROCESSING METHOD BODY
20 // Here we simply set the input 'In' value to the output 'Out'
21 // And print out the output value
22 // INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
23 // void bbSet{Input|Output}NAME(const TYPE&)
24 // const TYPE& bbGet{Input|Output}NAME() const
26 // * NAME is the name of the input/output
27 // (the one provided in the attribute 'name' of the tag 'input')
28 // * TYPE is the C++ type of the input/output
29 // (the one provided in the attribute 'type' of the tag 'input')
31 // First time : creates the text actor and sets its text.
32 if (_textActor == NULL)
34 _textActor = vtkTextActor3D::New();
35 _textProp = vtkTextProperty::New();
36 if ( bbGetInputRenderer()!=NULL )
38 bbGetInputRenderer()->AddActor( _textActor );
40 _textProp->SetFontSize( 14 );
41 _textActor->SetTextProperty( _textProp );
43 _textProp->SetColor( bbGetInputColour()[0] , bbGetInputColour()[1], bbGetInputColour()[2] );
45 _textActor->SetInput( bbGetInputIn().c_str() );
46 _textActor->SetPosition( bbGetInputX(), bbGetInputY(),bbGetInputZ() );
48 if ( bbGetInputTransform()!=NULL )
50 _textActor->SetUserTransform( bbGetInputTransform() );
53 bbSetOutputOut(_textActor);
58 // 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)
60 void Text3D::bbUserSetDefaultValues()
63 // SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
64 // Here we initialize the input 'In' to 0
65 bbSetInputIn("<void>");
70 std::vector<double> colour;
74 bbSetInputColour(colour);
75 bbSetInputRenderer(NULL);
76 bbSetInputTransform(NULL);
82 // 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)
84 void Text3D::bbUserInitializeProcessing()
87 // THE INITIALIZATION METHOD BODY :
89 // but this is where you should allocate the internal/output pointers
95 // 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)
97 void Text3D::bbUserFinalizeProcessing()
100 // THE FINALIZATION METHOD BODY :
102 // but this is where you should desallocate the internal/output pointers
107 // EO namespace bbvtk