[vtkusers] Inconvenient color balance with vtkInteractorStyleRubberBandZoom

Denis Shamonin dshamoni at science.uva.nl
Wed Nov 5 08:23:13 EST 2003


Hi Amy,

Here is example of inconvenient color balance with "Rubber Band" in case 
setting background to (0.5, 0.5, 0.5)
Also сlose values to this RBG value will do the same.

I think OnMouseMove() should be a little different.
Probably a feature, I do not know... :-\
Anyway here is it :
==============================================================
vtkInteractorStyleRubberBandZoom *style = 
vtkInteractorStyleRubberBandZoom::New();

vtkConeSource *cone = vtkConeSource::New();
cone->SetHeight( 3.0 );
cone->SetRadius( 1.0 );
cone->SetResolution( 10 );

vtkPolyDataMapper *coneMapper = vtkPolyDataMapper::New();
coneMapper->SetInput( cone->GetOutput() );

vtkActor *coneActor = vtkActor::New();
coneActor->SetMapper( coneMapper );

ren->AddActor( coneActor );
ren->SetBackground( 0.5, 0.5, 0.5 );

vtkRenderWindow *renWin = vtkRenderWindow::New();
renWin->AddRenderer( ren );
renWin->SetSize( 300, 300 );

vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New();
iren->SetRenderWindow(renWin);

iren->SetInteractorStyle(style);
==============================================================
-- 
Denis Shamonin
Section Computational Science
University of Amsterdam
Kruislaan 403, 1098 SJ Amsterdam
the Netherlands
http://carol.wins.uva.nl/~dshamoni/




More information about the vtkusers mailing list