fixed: auto_ptr -> unique_ptr
[opensg.git] / Tools / osgBench / q2.py
blob5fc40ea748cd2f7f728b9450275e89328ad286bf
1 # Simple OpenSG benchmark
2 from osgbench import *
4 # Define the Window's parameters
5 win=TestWindow()
6 win.setSize(300,300)
7 win.open()
9 # Create the scene
10 scene=Group()
12 nc=4
14 for i in range(-nc,nc):
15 for j in range(-nc,nc):
16 for k in range(-nc,nc):
17 trans=Transform()
18 scene.addChild(trans)
19 trans.setTranslation(i*2, j*2, k*2)
20 geo=makeBox(1,1,1, 1,1,1)
21 trans.addChild(geo)
23 scene.addChild(makeBox(1,1,1, 1,1,1))
25 # Define the Test(s)
26 test=Test()
27 test.setWindow(win)
28 test.setNFrames(100)
29 test.setScene(scene)
31 test.addFov(100)
32 test.makeOrbit(0,1,0)
34 test.run()
36 print "%d transformed cubes took %f seconds: %.3f fps" % ((nc*2)*(nc*2)*(nc*2), test.getTime(), test.getFPS())