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 "bbcreaVtkLightKit.h"
5 #include "bbcreaVtkPackage.h"
7 //#include <vtkLight.h>
8 #include <vtkLightCollection.h>
9 #include <vtkLightKit.h>
14 BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaVtk,LightKit)
15 BBTK_BLACK_BOX_IMPLEMENTATION(LightKit,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 LightKit::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 // bbSetOutputOut( bbGetInputIn() );
35 // std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
37 vtkLightCollection* originalLights = bbGetInputRenderer()->GetLights();
38 std::cout << "Now there are " << originalLights->GetNumberOfItems() << " lights." << std::endl;
43 bbGetInputRenderer()->RemoveAllLights();
44 vtkLightKit *lightKit=vtkLightKit::New();
45 //bbGetInputRenderer()->SetTwoSidedLighting(0);
46 lightKit->SetKeyLightWarmth( bbGetInputKeyLightWarmth() );
47 lightKit->SetFillLightWarmth( bbGetInputFillLightWarmth() );
48 lightKit->SetBackLightWarmth( bbGetInputBackLightWarmth() );
49 lightKit->AddLightsToRenderer( bbGetInputRenderer() );
54 // 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)
56 void LightKit::bbUserSetDefaultValues()
59 // SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
60 // Here we initialize the input 'In' to 0
61 bbSetInputRenderer(NULL);
62 bbSetInputKeyLightWarmth(0.8);
63 bbSetInputFillLightWarmth(5.0);
64 bbSetInputBackLightWarmth(0.5);
67 // 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)
69 void LightKit::bbUserInitializeProcessing()
72 // THE INITIALIZATION METHOD BODY :
74 // but this is where you should allocate the internal/output pointers
80 // 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)
82 void LightKit::bbUserFinalizeProcessing()
85 // THE FINALIZATION METHOD BODY :
87 // but this is where you should desallocate the internal/output pointers
92 // EO namespace bbcreaVtk