double radio;
double spc[3];
+ int last_valid_color_index = 0;
if (bbGetInputRenderer()!=NULL)
{
sphereActor.push_back(newActor);
newActor -> SetMapper(newMapper);
newActor -> SetOrigin(0, 0, 0);
- newActor -> GetProperty() -> SetColor( bbGetInputColour()[0] , bbGetInputColour()[1] , bbGetInputColour()[2] );
+
+ unsigned int j = 3*i +2;
+ if (j < bbGetInputColour().size() )
+ {
+ newActor -> GetProperty() -> SetColor( bbGetInputColour()[3*i] , bbGetInputColour()[3*i + 1] , bbGetInputColour()[3*i + 2] );
+ last_valid_color_index = 3*i;
+ }
+ else
+ newActor -> GetProperty() -> SetColor( bbGetInputColour()[last_valid_color_index] , bbGetInputColour()[last_valid_color_index + 1] , bbGetInputColour()[last_valid_color_index + 2] );
+
newActor -> GetProperty() -> SetOpacity( bbGetInputOpacity() );
newActor -> SetPosition( px,py,pz );
BBTK_INPUT(SphereList,lstPointY,"List of Y coordinates. Requirement: same size as vector X and vector Z.",std::vector<double>,"");
BBTK_INPUT(SphereList,lstPointZ,"List of Z coordinates. Requirement: same size as vector X and vector Y.",std::vector<double>,"");
BBTK_INPUT(SphereList,lstRadio,"List of Radio values",std::vector<double>,"");
-BBTK_INPUT(SphereList,Colour,"Colour RGB values for the spheres",std::vector<double>,"");
+BBTK_INPUT(SphereList,Colour,"Colour RGB values for the spheres (3 first values of the vector for the first sphere, following values for the second sphere, etc.)",std::vector<double>,"");
BBTK_INPUT(SphereList,Opacity,"Opacity of the spheres",double,"");
BBTK_INPUT(SphereList,Transform,"vtkTransform",vtkLinearTransform*,"");