]> Creatis software - bbtk.git/commitdiff
no message
authorEduardo Davila <Eduardo.Davila@creatis.insa-lyon.fr>
Thu, 16 Feb 2012 12:27:00 +0000 (12:27 +0000)
committerEduardo Davila <Eduardo.Davila@creatis.insa-lyon.fr>
Thu, 16 Feb 2012 12:27:00 +0000 (12:27 +0000)
packages/vtk/src/bbvtkText3D.cxx
packages/vtk/src/bbvtkText3D.h

index bf831ad43fa0aea543d8bb56115a185ecbdf75a5..ef38350d3ea4aa35aba036c22337e6f95d8e9547 100644 (file)
@@ -40,7 +40,16 @@ void Text3D::Process()
 
        textActor->SetInput( bbGetInputIn().c_str()  );
        textActor->SetPosition(  bbGetInputX(), bbGetInputY(),bbGetInputZ() );
-       bbGetInputRenderer()->AddActor( textActor );
+       if ( bbGetInputRenderer()!=NULL )
+       {
+               bbGetInputRenderer()->AddActor( textActor );
+       }
+       
+       if ( bbGetInputTransform()!=NULL )
+       {
+               textActor->SetUserTransform( bbGetInputTransform() );
+       }
+       
        bbSetOutputOut(textActor);
        
 }
@@ -63,6 +72,7 @@ void Text3D::bbUserSetDefaultValues()
        colour.push_back(0);
        bbSetInputColour(colour);
        bbSetInputRenderer(NULL);
+       bbSetInputTransform(NULL);
 }
 //===== 
 // 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)
index 0afce281ae919d5abaa7cc5f3b2066e4d3666ad3..0dbe84f7fc400d6767418732e56701a40b50627d 100644 (file)
@@ -9,6 +9,8 @@
 
 #include "vtkProp3D.h"
 #include "vtkRenderer.h"
+#include "vtkLinearTransform.h"
+
 
 namespace bbvtk
 {
@@ -27,6 +29,8 @@ class bbvtk_EXPORT Text3D
        BBTK_DECLARE_INPUT(Z,int);
        BBTK_DECLARE_INPUT(Colour,std::vector<double>);
        BBTK_DECLARE_INPUT(Renderer,vtkRenderer*);
+       BBTK_DECLARE_INPUT(Transform,vtkLinearTransform*);
+       
   BBTK_DECLARE_OUTPUT(Out,vtkProp3D*);
   BBTK_PROCESS(Process);
   void Process();
@@ -47,6 +51,7 @@ BBTK_CATEGORY("");
        BBTK_INPUT(Text3D,Z,"position Z",int,"");
        BBTK_INPUT(Text3D,Colour,"Colour vector RGB",std::vector<double>,"");
        BBTK_INPUT(Text3D,Renderer,"vtk Renderer",vtkRenderer*,"");
+       BBTK_INPUT(Text3D,Transform,"",vtkLinearTransform*,"");
 
        BBTK_OUTPUT(Text3D,Out,"vtk Actor",vtkProp3D*,"");