repo.or.cz
/
opensg.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
fixed: compile issue
[opensg.git]
/
Tools
/
osgBench
/
make_cubes.py
blob
6a345fbb69843956dc5d845aaef0c890cd4ce98a
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
()