Commit 5882b726 authored by Sebastien Barre's avatar Sebastien Barre
Browse files

BUG: add ResetCamera since GetActiveCamera does not reset it anymore

parent d46ec47c
......@@ -48,6 +48,7 @@ ren.AddActor(sphereActor)
ren.SetBackground(1, 1, 1)
renWin.SetSize(250, 125)
ren.ResetCamera()
ren.GetActiveCamera().Zoom(1.5)
iren.Initialize()
......
......@@ -48,6 +48,7 @@ ren.AddActor(sphereActor)
ren.SetBackground(1, 1, 1)
renWin.SetSize(250, 125)
ren.ResetCamera()
ren.GetActiveCamera().Zoom(1.5)
iren.Initialize()
......
......@@ -74,6 +74,7 @@ ren.SetBackground(1, 1, 1)
renWin.SetSize(300, 300)
# Get the camera and zoom in closer to the image.
ren.ResetCamera()
cam1 = ren.GetActiveCamera()
cam1.Zoom(1.4)
......
......@@ -39,6 +39,7 @@ ren.AddActor(axesActor)
ren.AddActor(textActor)
# Zoom in closer.
ren.ResetCamera()
ren.GetActiveCamera().Zoom(1.6)
# Reset the clipping range of the camera; set the camera of the
......
......@@ -52,6 +52,7 @@ ren1 AddActor sphereActor
ren1 SetBackground 1 1 1
renWin SetSize 250 125
ren1 ResetCamera
[ren1 GetActiveCamera] Zoom 1.5
renWin Render
......
......@@ -53,6 +53,7 @@ ren1 AddActor sphereActor
ren1 SetBackground 1 1 1
renWin SetSize 250 125
ren1 ResetCamera
[ren1 GetActiveCamera] Zoom 1.5
renWin Render
......
......@@ -41,6 +41,7 @@ ren1 AddActor axesActor
ren1 AddActor textActor
# Zoom in closer.
ren1 ResetCamera
[ren1 GetActiveCamera] Zoom 1.6
# Reset the clipping range of the camera; set the camera of the follower;
......
......@@ -96,6 +96,7 @@ int main()
renderer->AddActor(wireActor);
renderer->SetBackground(1,1,1);
renderer->ResetCamera();
renderer->GetActiveCamera()->Elevation(60.0);
renderer->GetActiveCamera()->Azimuth(30.0);
renderer->GetActiveCamera()->Zoom(1.0);
......
......@@ -103,6 +103,7 @@ int main()
renderer->AddActor(sgridActor);
renderer->SetBackground(1,1,1);
renderer->ResetCamera();
renderer->GetActiveCamera()->Elevation(60.0);
renderer->GetActiveCamera()->Azimuth(30.0);
renderer->GetActiveCamera()->Zoom(1.25);
......
......@@ -374,6 +374,7 @@ ren.AddActor(aPolyLineActor)
ren.AddActor(aVertexActor)
ren.AddActor(aPolyVertexActor)
ren.ResetCamera()
ren.GetActiveCamera().Azimuth(30)
ren.GetActiveCamera().Elevation(20)
ren.GetActiveCamera().Dolly(2.8)
......
......@@ -204,6 +204,7 @@ case12(Scalars, caseLabel, 0, 1)
Grid.Modified()
# Position the camera.
ren.ResetCamera()
ren.GetActiveCamera().Dolly(1.2)
ren.GetActiveCamera().Azimuth(30)
ren.GetActiveCamera().Elevation(20)
......
......@@ -368,6 +368,7 @@ ren1 AddActor aPolyLineActor
ren1 AddActor aVertexActor
ren1 AddActor aPolyVertexActor
ren1 ResetCamera
[ren1 GetActiveCamera] Azimuth 30
[ren1 GetActiveCamera] Elevation 20
[ren1 GetActiveCamera] Dolly 2.8
......
......@@ -194,6 +194,7 @@ case12 Scalars 0 1
Grid Modified
# Position the camera.
ren1 ResetCamera
[ren1 GetActiveCamera] Dolly 1.2
[ren1 GetActiveCamera] Azimuth 30
[ren1 GetActiveCamera] Elevation 20
......
......@@ -51,6 +51,7 @@ renWin SetSize 300 300
#
iren AddObserver UserEvent {wm deiconify .vtkInteract}
ren1 ResetCamera
[ren1 GetActiveCamera] Zoom 1.4
iren Initialize
......
......@@ -33,6 +33,7 @@ ren.SetBackground(0.1, 0.2, 0.4)
renWin.SetSize(500, 500)
# Zoom in closer
ren.ResetCamera()
cam1 = ren.GetActiveCamera()
cam1.Zoom(1.4)
......
......@@ -34,6 +34,7 @@ ren1 SetBackground 0.1 0.2 0.4
renWin SetSize 500 500
# Zoom in closer
ren1 ResetCamera
set cam1 [ren1 GetActiveCamera]
$cam1 Zoom 1.4
......
......@@ -66,6 +66,7 @@ ren.AddActor(contActor)
ren.AddActor(outlineActor)
# Zoom in a little bit.
ren.ResetCamera()
ren.GetActiveCamera().Zoom(1.5)
# Initialize and start the event loop.
......
......@@ -62,7 +62,7 @@ bboxMapper.SetInput(pd)
bboxActor = vtk.vtkActor2D()
bboxActor.SetMapper(bboxMapper)
bboxActor.GetProperty().SetColor(1, 0, 0)
ren.AddProp(bboxActor)
ren.AddViewProp(bboxActor)
### Functions for callbacks
X = 0
......
......@@ -65,6 +65,7 @@ ren1 AddActor outlineActor
# Zoom in a little bit. Associate the Tk interactor popup with a user
# keypress-u (the UserEvent).
ren1 ResetCamera
[ren1 GetActiveCamera] Zoom 1.5
iren AddObserver UserEvent {wm deiconify .vtkInteract}
iren Initialize;
......
......@@ -77,6 +77,7 @@ ren.AddActor(edgeActor)
ren.SetBackground(1, 1, 1)
renWin.SetSize(150, 150)
ren.ResetCamera()
ren.GetActiveCamera().Zoom(1.5)
# Interact with the data.
......
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