| 1 | puts "============" |
| 2 | puts "CR26344" |
| 3 | puts "============" |
| 4 | puts "" |
| 5 | |
| 6 | ########################################################################################## |
| 7 | puts "Visualization - provide a support of zoom persistent selection" |
| 8 | ########################################################################################## |
| 9 | |
| 10 | vinit View1 w=409 h=409 |
| 11 | vtrihedron tri |
| 12 | vpan 50 50 |
| 13 | |
| 14 | box b1 50 50 50 |
| 15 | box b2 50 50 50 |
| 16 | box b3 100 100 100 |
| 17 | box b4 100 100 100 |
| 18 | box b5 100 100 100 |
| 19 | |
| 20 | # 1) Zoom persistence |
| 21 | vpoint p1 200 200 200 |
| 22 | |
| 23 | vdisplay b1 -trsfPers zoom -trsfPersPos 200 200 200 |
| 24 | vdisplay b2 -trsfPers zoom -trsfPersPos 200 200 200 |
| 25 | vsetlocation b2 -50 -50 -50 |
| 26 | |
| 27 | vmoveto 384 78 |
| 28 | if { ![checkcolor 384 78 0 1 1] } { |
| 29 | puts "Error picking zoom persistence object" |
| 30 | } |
| 31 | |
| 32 | vmoveto 356 96 |
| 33 | if { ![checkcolor 356 96 0 1 1] } { |
| 34 | puts "Error picking zoom persistent object with location" |
| 35 | } |
| 36 | |
| 37 | vselect 330 120 400 50 |
| 38 | |
| 39 | if { ![checkcolor 384 78 0.8 0.8 0.8] || ![checkcolor 356 96 0.8 0.8 0.8] } { |
| 40 | puts "Error selecting zoom persistence object(s)" |
| 41 | } |
| 42 | |
| 43 | # 2) Rotate persistence |
| 44 | |
| 45 | vdisplay b3 -trsfPers rotate -trsfPersPos -200 -200 -200 |
| 46 | vmoveto 160 200 |
| 47 | if { ![checkcolor 160 180 0 1 1] } { |
| 48 | puts "Error picking rotate persistence object" |
| 49 | } |
| 50 | vselect 130 230 190 170 |
| 51 | if { ![checkcolor 160 180 0.8 0.8 0.8] } { |
| 52 | puts "Error selecting rotate persistence object" |
| 53 | } |
| 54 | |
| 55 | # 3) Pan persistence |
| 56 | |
| 57 | vdisplay b4 -trsfPers pan |
| 58 | vmoveto 233 188 |
| 59 | if { ![checkcolor 233 188 0 1 1] } { |
| 60 | puts "Error picking pan persistence object" |
| 61 | } |
| 62 | vselect 200 230 270 140 |
| 63 | if { ![checkcolor 233 188 0.8 0.8 0.8] } { |
| 64 | puts "Error selecting pan persistence object" |
| 65 | } |
| 66 | |
| 67 | # 4) Trihedron persistence |
| 68 | |
| 69 | vdisplay b5 -trsfPers trihedron -trsfPersPos -1 -1 300 |
| 70 | vmoveto 90 300 |
| 71 | if { ![checkcolor 90 300 0 1 1] } { |
| 72 | puts "Error picking trihedron persistence object" |
| 73 | } |
| 74 | vselect 50 380 140 280 |
| 75 | if { ![checkcolor 90 300 0.8 0.8 0.8] } { |
| 76 | puts "Error selecting trihedron persistence object" |
| 77 | } |
| 78 | |
| 79 | vselect 50 380 400 50 |
| 80 | |
| 81 | set only_screen 1 |