52c38ce1 |
1 | puts "============" |
2 | puts "0030561: Visualization, PrsMgr_PresentableObject - Keep the local transformation for child in AddChild()" |
3 | puts "============" |
4 | puts "" |
5 | |
6 | pload MODELING VISUALIZATION |
7 | vclear |
8 | vinit View1 |
9 | |
10 | psphere m 3 |
11 | vdisplay -dispMode 1 m |
12 | vlocation m -setLocation 20 10 20 |
13 | box b1 1 1 1 |
14 | box b2 1 1 1 |
15 | vdisplay b1 -dispMode 1 |
16 | vdisplay b2 -dispMode 1 |
17 | vlocation b1 -setLocation -10 0 0 |
18 | vlocation b2 -setLocation -10 0 0 |
19 | |
20 | set r {1 2 3 4 5} |
21 | foreach i $r { psphere c$i 1 } |
22 | foreach i $r { vdisplay -dispMode 1 c$i } |
23 | foreach i $r { vlocation c$i -setLocation [expr 20+10*$i] 10 20 } |
24 | foreach i $r { vchild m -ignoreParentTrsf -add c$i } |
25 | vchild m -add b1 |
26 | |
27 | # change main shape's local transformation, the children should be correspondingly moved |
28 | vlocation m -setLocation 100 20 20 |
29 | |
30 | # change one of sub-shape's local transformation, other shapes MUST NOT move |
31 | vlocation c4 -setLocation 40 10 0 |
32 | |
33 | vfit |
34 | |
35 | checkview -screenshot -3d -path ${imagedir}/${test_image}.png |