root/branches/Carsten_PtrWork2/Tools/osgBench/make_cubes.py

Revision 397, 0.6 kB (checked in by dshipton, 2 years ago)

Merge Dirks RenderTraversal? branch back into trunk.
This add's Occlusion Culling and a new node type called ScreenLOD
which is an automatic LOD node.

  • Property svn:executable set to *
Line 
1 from osgbench import *
2 t=TestWindow()
3 t.setSize(300,300)
4 t.open()
5
6 test=Test()
7 test.setWindow(t)
8 test.setHeadlight(1)
9 test.setNFrames(100)
10
11 nc=3
12
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)
23
24 scene.save("some_cubes.osb")
25
26 test=Test()
27 test.setWindow(t)
28 test.setScene(scene)
29 test.setHeadlight(1)
30 test.setNFrames(100)
31
32 test.clear()
33 test.addFov(90)
34 test.makeOrbit(0,1,0)
35
36 print "%d res" % res
37 test.run()
Note: See TracBrowser for help on using the browser.