Skip to content
Snippets Groups Projects
Commit 7f7eb201 authored by Dan Lipsa's avatar Dan Lipsa
Browse files

BUG: Fix warning 'Resetting view-up since view plane normal is parallel'

This test used the default view up and then did a vtkRenderer::ResetCamera which resulted in warning
Warning: In /home/danlipsa/src/VTK/Rendering/Core/vtkRenderer.cxx, line 1043
vtkOpenGLRenderer (0x1b45060): Resetting view-up since view plane normal is parallel
parent 104bcfaa
No related branches found
No related tags found
No related merge requests found
......@@ -220,6 +220,7 @@ int TestResliceCursorWidget3( int argc, char *argv[] )
vtkSmartPointer< vtkResliceCursorWidget > resliceCursorWidget[3];
vtkSmartPointer< vtkResliceCursorThickLineRepresentation > resliceCursorRep[3];
double viewUp[3][3] = {{0, 0, -1}, {0, 0, 1}, {0, 1, 0}};
for (int i = 0; i < 3; i++)
{
resliceCursorWidget[i] = vtkSmartPointer< vtkResliceCursorWidget >::New();
......@@ -249,6 +250,7 @@ int TestResliceCursorWidget3( int argc, char *argv[] )
ren[i]->GetActiveCamera()->SetPosition(camPos);
ren[i]->GetActiveCamera()->ParallelProjectionOn();
ren[i]->GetActiveCamera()->SetViewUp(viewUp[i]);
ren[i]->ResetCamera();
//ren[i]->ResetCameraClippingRange();
......@@ -280,10 +282,6 @@ int TestResliceCursorWidget3( int argc, char *argv[] )
renWin->SetSize( 600, 600);
//renWin->SetFullScreen(1);
ren[0]->GetActiveCamera()->SetViewUp( 0, 0, -1 );
ren[1]->GetActiveCamera()->SetViewUp( 0, 0, 1 );
ren[2]->GetActiveCamera()->SetViewUp( 0, 1, 0 );
ren[0]->SetViewport(0,0,0.5,0.5);
ren[1]->SetViewport(0.5,0,1,0.5);
ren[2]->SetViewport(0,0.5,0.5,1);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment