fixed: compile issue
[opensg.git] / Tools / osgBench / make_cubes.py
blob6a345fbb69843956dc5d845aaef0c890cd4ce98a
1 from osgbench import *
2 t=TestWindow()
3 t.setSize(300,300)
4 t.open()
6 test=Test()
7 test.setWindow(t)
8 test.setHeadlight(1)
9 test.setNFrames(100)
11 nc=3
13 res=2
14 scene=Group()
15 for i in range(-nc,nc):
16 for j in range(-nc,nc):
17 for k in range(-nc,nc):
18 geo=makeBox(1.4,1.4,1.4,res,res,res)
19 geo.setDlistCache(0)
20 geo.translate(i*2, j*2, k*2)
21 scene.addChild(geo)
22 addRef(scene)
24 scene.save("some_cubes.osb")
26 test=Test()
27 test.setWindow(t)
28 test.setScene(scene)
29 test.setHeadlight(1)
30 test.setNFrames(100)
32 test.clear()
33 test.addFov(90)
34 test.makeOrbit(0,1,0)
36 print "%d res" % res
37 test.run()