]> Creatis software - creaMaracasVisu.git/blobdiff - bbtk/src/bbmaracasvisuDrawAxisTree3D.cxx
no message
[creaMaracasVisu.git] / bbtk / src / bbmaracasvisuDrawAxisTree3D.cxx
index a283fe858eee0b0646e9bcae16ae1afbc97b41fd..79e256866eec7bbcffb0488464e5df65a426310a 100644 (file)
@@ -44,6 +44,7 @@ void DrawAxisTree3D::DrawOneAxis(int iGeneral,int numPoints, int iAxis)
                        allPoints->InsertNextPoint( bbGetInputlstPointX()[i]*spc[0],  
                                                                                bbGetInputlstPointY()[i]*spc[1], 
                                                                                bbGetInputlstPointZ()[i]*spc[2] );
+                       printf("DrawAxisTree3D::DrawOneAxis point  %d -> %f, %f, %f \n", i,  bbGetInputlstPointX()[i], bbGetInputlstPointY()[i], bbGetInputlstPointZ()[i] );
                        allTopology->InsertCellPoint( i-iGeneral );
                } // rof
                polydata->SetPoints( allPoints );
@@ -55,18 +56,22 @@ void DrawAxisTree3D::DrawOneAxis(int iGeneral,int numPoints, int iAxis)
        // color
        double r,g,b;
 
-       if ( (iAxis*3+1) < bbGetInputColour().size() ){
+       if ( (iAxis*3+1) < (int)(bbGetInputColour().size()) )
+       {
                        r = bbGetInputColour()[0+iAxis*3];
                        g = bbGetInputColour()[1+iAxis*3]; 
                        b = bbGetInputColour()[2+iAxis*3];
-               } else {
-                       r = bbGetInputColour()[0];
-                       g = bbGetInputColour()[1]; 
-                       b = bbGetInputColour()[2];
-               }
+       } else {
+//                     r = bbGetInputColour()[0];
+//                     g = bbGetInputColour()[1]; 
+//                     b = bbGetInputColour()[2];
+                       r = (rand() % 100) / 100.0;
+                       g = (rand() % 100) / 100.0;
+                       b = (rand() % 100) / 100.0;
+       }
 
-       vtkactor->GetProperty()->SetColor( 1,0,0 );
-       vtkactor->GetProperty()->SetLineWidth( 3 );
+       vtkactor->GetProperty()->SetColor( r,g,b );
+       vtkactor->GetProperty()->SetLineWidth( 0.5 );
 
        if ( bbGetInputTransform()!=NULL )
        {
@@ -107,6 +112,11 @@ void DrawAxisTree3D::Process()
                numPoints = bbGetInputlstIndexs()[iAxis];
                DrawOneAxis(iGeneral,numPoints,iAxis);
                iGeneral = iGeneral+numPoints;
+               
+               if ((iAxis % 1)==0)
+               {
+                       printf("EED  DrawAxisTree3D::Process  %d/%d\n", iAxis,sizeLstAxis );
+               }
        }