fixed: auto_ptr -> unique_ptr
[opensg.git] / Tools / osgBench / test_htrans_nodes.py
blobf6d0130f4acaf9ef86907e62b5d33501c45b361d
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=6
14 for i in range(-nc,nc):
15 inode=Group()
16 scene.addChild(inode)
17 for j in range(-nc,nc):
18 jnode=Group()
19 inode.addChild(jnode)
20 for k in range(-nc,nc):
21 trans=Transform()
22 jnode.addChild(trans)
23 trans.setTranslation(i*2, j*2, k*2)
24 geo=makeBox(1,1,1, 1,1,1)
25 trans.addChild(geo)
27 # Define the Test(s)
28 test=Test()
29 test.setWindow(win)
30 test.setNFrames(100)
31 test.setScene(scene)
33 test.addFov(90)
34 test.makeOrbit(0,1,0)
36 test.run()
38 print "%d transformed cubes took %.2f seconds: %.2f fps" % ((nc*2)*(nc*2)*(nc*2), test.getTime(), test.getFPS())