fixed: compile issue
[opensg.git] / Tools / osgBench / test_trans_nodes.py
blob6ef2b6aa037f0a505cc3a05b90d251eb6e179043
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=8
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 # Define the Test(s)
24 test=Test()
25 test.setWindow(win)
26 test.setNFrames(100)
27 test.setScene(scene)
29 test.addFov(90)
30 test.makeOrbit(0,1,0)
32 test.run()
34 print "%d transformed cubes took %f seconds: %f fps" % ((nc*2)*(nc*2)*(nc*2), test.getTime(), test.getFPS())