[vtkusers] update the scene

Anders Sandholm anders.sandholm at gmail.com
Wed Aug 8 04:38:21 EDT 2007


Hi

I have ran into a problem,

I set up the vtk window like:

	renwin = vtkRenderWindow::New();
	ui.vtkWindow->SetRenderWindow(renwin);
	renwin->Delete();
	renwin = NULL;

	ren1 = vtkRenderer::New();

	aCamera = vtkCamera::New();
	aCamera->SetViewUp (0, 0, 1);
	aCamera->SetPosition (0, 1, 0);
	aCamera->SetFocalPoint (0, 0, 0);
	ren1->SetActiveCamera(aCamera);
	ren1->ResetCamera();
	aCamera->Dolly(0.0);
	ren1->SetBackground(.2,.2,.2);

	ui.vtkWindow->GetRenderWindow()->AddRenderer(ren1);

where ui is my GUI window containing a QVTKWidget

now what I want to do is add actors, so i do like

ren1->AddActor(myActor);

but now I ran into problem, I cant find a function to update/render my
actor. So my questions are
1; am i doing this right, can I do it like this?
2; how do I update the scene after I have added an actor?

regards
Anders



More information about the vtkusers mailing list