Commit 509596f6 authored by Sebastien Barre's avatar Sebastien Barre
Browse files

BUG: fix ResetCamera pb

parent d4d2173f
......@@ -98,6 +98,7 @@ ren1 AddActor actor0
ren1 AddActor actor1
ren1 AddActor actor2
ren1 ResetCamera
[ren1 GetActiveCamera] SetPosition 180 55 65
[ren1 GetActiveCamera] SetFocalPoint 3.5 32 15
renWin SetSize 300 300
......
......@@ -164,6 +164,7 @@ static void Run(vtkMultiProcessController *contr, void *arg)
if (Me == 0)
{
renderer->ResetCamera();
vtkCamera *camera = renderer->GetActiveCamera();
camera->UpdateViewport(renderer);
camera->ParallelProjectionOn();
......@@ -199,6 +200,7 @@ static void Run(vtkMultiProcessController *contr, void *arg)
if (Me == 0)
{
renderer->ResetCamera();
vtkCamera *camera = renderer->GetActiveCamera();
camera->UpdateViewport(renderer);
camera->ParallelProjectionOn();
......
......@@ -352,6 +352,7 @@ int main(int argc, char** argv)
vtkRenderWindow* renWin = vtkRenderWindow::New();
renWin->SetSize(500,400);
renWin->AddRenderer(ren);
ren->ResetCamera();
ren->GetActiveCamera()->Zoom(2.2);
ren->UnRegister(0);
......
......@@ -153,6 +153,7 @@ int LoadOpenGLExtension(int argc, char *argv[])
renwin->AddRenderer(renderer);
renderer->ResetCamera();
vtkCamera *camera = renderer->GetActiveCamera();
camera->Elevation(-45);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment