std::string wantedClass = "vtkOpenGLActor";
if(className == wantedClass)
{
- ((vtkActor*)vtkprop3D)->GetProperty()->SetOpacity( bbGetInputOpacity() );
+ vtkActor *vtkactor=((vtkActor*)vtkprop3D);
+ vtkactor->GetProperty()->SetOpacity( bbGetInputOpacity() );
+ vtkactor->GetProperty()->SetLineWidth( bbGetInputLineWidth() );
+ double r = bbGetInputColor()[0];
+ double g = bbGetInputColor()[1];
+ double b = bbGetInputColor()[2];
+ vtkactor->GetProperty()->SetColor( r,g,b );
}
if ( bbGetInputTransform()!=NULL )
// SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
// Here we initialize the input 'In' to 0
- bbSetInputActive(false);
- backActive=bbGetInputActive();
- bbSetInputIn(NULL);
- bbSetInputOpacity(1);
- bbSetInputRenderer(NULL);
+
+ std::vector<double> color;
+ color.push_back(1);
+ color.push_back(0);
+ color.push_back(0);
+ bbSetInputActive( false );
+ backActive=bbGetInputActive();
+ bbSetInputIn( NULL );
+ bbSetInputOpacity( 1 );
+ bbSetInputLineWidth( 0.5 );
+ bbSetInputRenderer( NULL );
+ bbSetInputColor( color );
}
//=====
BBTK_DECLARE_INPUT(Active,bool);
BBTK_DECLARE_INPUT(In,vtkProp3D*);
BBTK_DECLARE_INPUT(Opacity,double);
+ BBTK_DECLARE_INPUT(Color,std::vector<double>);
+ BBTK_DECLARE_INPUT(LineWidth,double);
BBTK_DECLARE_INPUT(Transform,vtkTransform*);
BBTK_DECLARE_INPUT(Renderer,vtkRenderer*);
// BBTK_DECLARE_OUTPUT(Out,double);
BBTK_INPUT(Actor,Active,"Active true/false (default false)",bool,"");
BBTK_INPUT(Actor,In,"First input",vtkProp3D*,"");
BBTK_INPUT(Actor,Opacity,"Opacity 0..1 (default 1)",double,"");
+ BBTK_INPUT(Actor,Color,"(default [1 0 0]red ) RGB color vector [0..1, 0..1, 0..1] )", std::vector<double>,"");
+ BBTK_INPUT(Actor,LineWidth,"(default 0.5 ) With ligne )",double,"");
BBTK_INPUT(Actor,Renderer,"Renderer",vtkRenderer*,"");
// BBTK_OUTPUT(Actor,Out,"First output",double,"");