Commit 0a8bc7fc authored by Taddeus Kroes's avatar Taddeus Kroes

Folled around a bit with camera functions.

parent 3522e165
......@@ -16,8 +16,8 @@ def main():
ren = vtk.vtkRenderer()
win = vtk.vtkRenderWindow()
win.AddRenderer(ren)
iren = vtk.vtkRenderWindowInteractor()
iren.SetRenderWindow(win)
#iren = vtk.vtkRenderWindowInteractor()
#iren.SetRenderWindow(win)
# Read OBJ file
cubemapper = read_obj('cube.obj')
......@@ -27,9 +27,23 @@ def main():
cubeactor.SetMapper(cubemapper)
ren.AddActor(cubeactor)
iren.Initialize()
#iren.Initialize()
win.Render()
iren.Start()
#iren.Start()
try:
cam = ren.GetActiveCamera()
while True:
win.Render()
# Rotate
cam.Roll(.01)
#cam.Elevation(.01)
#cam.Azimuth(.01)
except KeyboardInterrupt:
return
if __name__ == '__main__':
......
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