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

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.
......
......@@ -56,6 +56,7 @@ iren.SetRenderWindow(renWin)
ren.AddActor(actor)
ren.SetBackground(1, 1, 1)
renWin.SetSize(500, 500)
ren.ResetCamera()
ren.GetActiveCamera().Elevation(-45)
ren.GetActiveCamera().Azimuth(10)
ren.GetActiveCamera().Dolly(1.35)
......
......@@ -142,6 +142,7 @@ ren.AddActor(edgeActor)
ren.SetBackground(0, 0, 0)
renWin.SetSize(450, 300)
ren.ResetCamera()
ren.GetActiveCamera().Zoom(2)
iren.Initialize()
......
......@@ -73,6 +73,7 @@ iren.SetRenderWindow(renWin)
ren.AddActor(carpet)
renWin.SetSize(500, 500)
ren.ResetCamera()
ren.GetActiveCamera().Zoom(1.5)
iren.Initialize()
......
......@@ -85,6 +85,7 @@ ren.AddActor(coneActor)
ren.AddActor(creamActor)
ren.SetBackground(1, 1, 1)
renWin.SetSize(250, 250)
ren.ResetCamera()
ren.GetActiveCamera().Roll(90)
ren.GetActiveCamera().Dolly(1.5)
ren.ResetCameraClippingRange()
......
......@@ -85,6 +85,7 @@ renWin SetSize 150 150
# render the image
#
iren AddObserver UserEvent {wm deiconify .vtkInteract}
ren1 ResetCamera
[ren1 GetActiveCamera] Zoom 1.5
iren Initialize
......
......@@ -57,6 +57,7 @@ vtkRenderWindowInteractor iren
ren1 AddActor actor
ren1 SetBackground 1 1 1
renWin SetSize 500 500
ren1 ResetCamera
[ren1 GetActiveCamera] Elevation -45
[ren1 GetActiveCamera] Azimuth 10
[ren1 GetActiveCamera] Dolly 1.35
......
......@@ -145,6 +145,7 @@ renWin SetSize 450 300
# render the image
#
iren AddObserver UserEvent {wm deiconify .vtkInteract}
ren1 ResetCamera
[ren1 GetActiveCamera] Zoom 2
iren Initialize
......
......@@ -94,6 +94,7 @@ renWin SetSize 500 500
# render the image
#
iren AddObserver UserEvent {wm deiconify .vtkInteract}
ren1 ResetCamera
[ren1 GetActiveCamera] Zoom 1.5
renWin Render
......
......@@ -90,6 +90,7 @@ ren1 AddActor coneActor
ren1 AddActor creamActor
ren1 SetBackground 1 1 1
renWin SetSize 250 250
ren1 ResetCamera
[ren1 GetActiveCamera] Roll 90
[ren1 GetActiveCamera] Dolly 1.5
ren1 ResetCameraClippingRange
......
......@@ -67,6 +67,7 @@ int main()
// We'll zoom in a little by accessing the camera and invoking a "Zoom"
// method on it.
ren1->ResetCamera();
ren1->GetActiveCamera()->Zoom(1.5);
renWin->Render();
......
......@@ -48,6 +48,7 @@ renWin.SetSize(200, 200)
# We'll zoom in a little by accessing the camera and invoking a "Zoom"
# method on it.
ren.ResetCamera()
ren.GetActiveCamera().Zoom(1.5)
# This starts the event loop.
......
......@@ -48,6 +48,7 @@ iren.Initialize()
# We'll zoom in a little by accessing the camera and invoking a "Zoom"
# method on it.
ren.ResetCamera()
ren.GetActiveCamera().Zoom(1.5)
renWin.Render()
......
......@@ -57,6 +57,7 @@ renWin.SetSize(200, 200)
# We'll zoom in a little by accessing the camera and invoking a "Zoom"
# method on it.
ren.ResetCamera()
ren.GetActiveCamera().Zoom(1.5)
iren.Initialize()
......
......@@ -36,6 +36,7 @@ ren.AddActor(planeActor)
ren.SetBackground(0.1, 0.2, 0.4)
renWin.SetSize(500, 500)
ren.ResetCamera()
cam1 = ren.GetActiveCamera()
cam1.Elevation(-30)
cam1.Roll(-20)
......
......@@ -60,6 +60,7 @@ iren Initialize
# We'll zoom in a little by accessing the camera and invoking a "Zoom"
# method on it.
ren1 ResetCamera
[ren1 GetActiveCamera] Zoom 1.5
renWin Render
......
......@@ -62,6 +62,7 @@ iren Initialize
# We'll zoom in a little by accessing the camera and invoking a "Zoom"
# method on it.
ren1 ResetCamera
[ren1 GetActiveCamera] Zoom 1.5
renWin Render
......
......@@ -72,6 +72,7 @@ iren Initialize
# We'll zoom in a little by accessing the camera and invoking a "Zoom"
# method on it.
ren1 ResetCamera
[ren1 GetActiveCamera] Zoom 1.5
renWin Render
......
......@@ -162,6 +162,7 @@ vtkActor actor
ren1 AddActor actor
ren1 SetBackground 0.1 0.1 0.15
ren1 ResetCamera
[ren1 GetActiveCamera] Zoom 1.5
[ren1 GetActiveCamera] Elevation 40
[ren1 GetActiveCamera] Azimuth -20
......
......@@ -43,6 +43,7 @@ renWin SetSize 500 500
iren AddObserver UserEvent {wm deiconify .vtkInteract}
renWin Render
ren1 ResetCamera
set cam1 [ren1 GetActiveCamera]
$cam1 Elevation -30
$cam1 Roll -20
......
......@@ -66,6 +66,7 @@ int main()
vtkRenderer *ren1= vtkRenderer::New();
ren1->AddActor( coneActor );
ren1->SetBackground( 0.1, 0.2, 0.4 );
ren1->ResetCamera();
vtkRenderWindow *renWin = vtkRenderWindow::New();
renWin->AddRenderer( ren1 );
......
......@@ -90,6 +90,7 @@ int main()
//
// Make one view 90 degrees from other.
//
ren1->ResetCamera();
ren1->GetActiveCamera()->Azimuth(90);
//
......
......@@ -85,6 +85,7 @@ public class Cone3 {
//
// Make one camera view 90 degrees from other.
//
ren1.ResetCamera();
ren1.GetActiveCamera().Azimuth(90);
//
......
......@@ -69,6 +69,7 @@ renWin.SetSize(600, 300)
#
# Make one camera view 90 degrees from other.
#
ren1.ResetCamera()
ren1.GetActiveCamera().Azimuth(90)
#
......
......@@ -71,7 +71,8 @@ renWin SetSize 600 300
#
# Make one camera view 90 degrees from other.
#
[ren1 GetActiveCamera] Azimuth 90
ren1 ResetCamera
[ren1 GetActiveCamera] Azimuth 90
#
# Now we loop over 360 degreeees and render the cone each time.
......
......@@ -102,6 +102,7 @@ public class Cone4 {
//
// Make one camera view 90 degrees from other.
//
ren1.ResetCamera();
ren1.GetActiveCamera().Azimuth(90);
//
......
......@@ -75,6 +75,7 @@ public class Cone5 {
//
// Make one camera view 90 degrees from other.
//
ren1.ResetCamera();
ren1.GetActiveCamera().Azimuth(90);
//
......
......@@ -94,6 +94,7 @@ ren.AddActor(clipActor)
ren.AddActor(cutActor)
ren.AddActor(restActor)
ren.SetBackground(1, 1, 1)
ren.ResetCamera()
ren.GetActiveCamera().Azimuth(30)
ren.GetActiveCamera().Elevation(30)
ren.GetActiveCamera().Dolly(1.5)
......
......@@ -65,6 +65,7 @@ ren.AddActor(outlineActor)
ren.AddActor(dataActor)
ren.SetBackground(1, 1, 1)
renWin.SetSize(500, 500)
ren.ResetCamera()
ren.GetActiveCamera().Zoom(1.5)
iren.Initialize()
......
......@@ -80,6 +80,7 @@ iren.SetRenderWindow(renWin)
ren.AddActor(parisonActor)
ren.AddActor(moldActor)
ren.SetBackground(1, 1, 1)
ren.ResetCamera()
ren.GetActiveCamera().Azimuth(60)
ren.GetActiveCamera().Roll(-90)
ren.GetActiveCamera().Dolly(2)
......
......@@ -42,6 +42,7 @@ iren.SetRenderWindow(renWin)
# Add the actors to the renderer, set the background and size
ren.AddActor(actor)
ren.ResetCamera()
ren.GetActiveCamera().Azimuth(20)
ren.GetActiveCamera().Elevation(30)
ren.SetBackground(0.1, 0.2, 0.4)
......
......@@ -111,6 +111,7 @@ ren.AddActor(tpd3Actor)
ren.SetBackground(1, 1, 1)
renWin.SetSize(400, 400)
ren.ResetCamera()
cam1 = ren.GetActiveCamera()
cam1.SetClippingRange(3.95297, 50)
cam1.SetFocalPoint(8.88908, 0.595038, 29.3342)
......
......@@ -72,6 +72,7 @@ renWin.SetSize(500, 500)
ren.SetBackground(0.1, 0.2, 0.4)
# Set a nice camera position.
ren.ResetCamera()
cam1 = ren.GetActiveCamera()
cam1.Zoom(1.4)
cam1.Azimuth(110)
......
......@@ -92,6 +92,7 @@ ren1 AddActor clipActor
ren1 AddActor cutActor
ren1 AddActor restActor
ren1 SetBackground 1 1 1
ren1 ResetCamera
[ren1 GetActiveCamera] Azimuth 30
[ren1 GetActiveCamera] Elevation 30
[ren1 GetActiveCamera] Dolly 1.5
......
......@@ -67,6 +67,7 @@ ren1 AddActor outlineActor
ren1 AddActor dataActor
ren1 SetBackground 1 1 1
renWin SetSize 500 500
ren1 ResetCamera
[ren1 GetActiveCamera] Zoom 1.5
iren Initialize
......
......@@ -77,6 +77,7 @@ vtkRenderWindowInteractor iren
ren1 AddActor parisonActor
ren1 AddActor moldActor
ren1 SetBackground 1 1 1
ren1 ResetCamera
[ren1 GetActiveCamera] Azimuth 60
[ren1 GetActiveCamera] Roll -90
[ren1 GetActiveCamera] Dolly 2
......
......@@ -42,6 +42,7 @@ vtkRenderWindowInteractor iren
# Add the actors to the renderer, set the background and size
#
ren1 AddActor actor
ren1 ResetCamera
[ren1 GetActiveCamera] Azimuth 20
[ren1 GetActiveCamera] Elevation 30
ren1 SetBackground 0.1 0.2 0.4
......
......@@ -111,6 +111,7 @@ ren1 AddActor tpd3Actor
ren1 SetBackground 1 1 1
renWin SetSize 400 400
ren1 ResetCamera
set cam1 [ren1 GetActiveCamera]
$cam1 SetClippingRange 3.95297 50
$cam1 SetFocalPoint 8.88908 0.595038 29.3342
......
......@@ -82,11 +82,12 @@ vtkPolyDataMapper mapper
vtkActor actor
actor SetMapper mapper
ren1 AddProp actor
ren1 AddViewProp actor
ren1 AddVolume volume
renWin SetSize 300 300
ren1 ResetCamera
[ren1 GetActiveCamera] Azimuth 20.0
[ren1 GetActiveCamera] Elevation 10.0
[ren1 GetActiveCamera] Zoom 1.5
......
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