[vtkusers] Vtk renders another windows apart from the qvtkwidget
32sthide
32sthide at gmail.com
Fri Aug 24 10:13:07 EDT 2012
I have a little problem that i think it's easy so get a solution, but i've
come to the point of trying everything and still not working. I'm sure it
something simple, so i'm asking help as i can't figure it out on my own.
I have a qvtkwidget on the centralwidget and it has no problem.
the problem is that every time i run the program it rends another box apart
from the interface.
here's the part of my code that matters for this issue.
// Create renderer
ren= vtkRenderer::New();
ren->AddActor(outlineActor);
ren->SetBackground(0.1,0.1,0.3);
// Drawing some X,Y,Z axes
axes= vtkCubeAxesActor2D::New();
//more stuff
ren->AddViewProp(axes);
ren->ResetCamera();
// Create a window for the renderer
renWin= vtkRenderWindow::New();
renWin->AddRenderer(ren);
// Set an user interface interactor for the render window
iren= vtkRenderWindowInteractor::New();
iren->SetRenderWindow(renWin);
style = vtkInteractorStyleTrackballCamera::New();
iren->SetInteractorStyle(style);
// Create a inicial camera view
vtkCamera *inicam= ren->GetActiveCamera();
inicam->Zoom(1);
inicam->SetViewUp(0, 0, 0);
inicam->Azimuth(45);
ren->ResetCameraClippingRange();
// Start the initialization and rendering
renWin->Render();
// Assign the rendering window to the qvtkwidget
ui->qvtkWidget->SetRenderWindow(renWin);
if someone could help me I would apreciatte.
--
View this message in context: http://vtk.1045678.n5.nabble.com/Vtk-renders-another-windows-apart-from-the-qvtkwidget-tp5715535.html
Sent from the VTK - Users mailing list archive at Nabble.com.
More information about the vtkusers
mailing list