0031999: Tests - request Core Profile on macOS for Ray-Tracing tests
[occt.git] / tests / v3d / anim / translate
CommitLineData
1beb58d7 1puts "=================================="
2puts "Viewer animation - translate the view camera"
3puts "=================================="
4
5pload MODELING VISUALIZATION
6
7vclear
8vinit View1
9vaxo
10vzbufftrihedron -position right_lower
11
12box b1 -50 -50 0 100 100 100
13vdisplay -noupdate -dispMode 1 b1
14vviewparams -scale 1.156 -up -0.3588 0.3458 0.867 -at 116 355 327 -eye 225 253 413
15
16# Animation simulates the following panning:
17# vpan 200 0
18# vviewparams -scale 1.156 -up -0.3588 0.3458 0.867 -at -174 47 330 -eye -65 -55 415
19vanimation anim -clear
20vanimation anim/movecam -view -at1 116 355 327 -at2 -174 47 330 -eye1 225 253 413 -eye2 -65 -55 415 -duration 2
21
22vanimation anim -play 0.0 0.0
ba00aab7 23if {[vreadpixel 60 360 rgb name] != "DARKGOLDENROD"} { puts "Error: Camera translation result is wrong!" }
1beb58d7 24vdump $imagedir/${casename}_0.png
25
26vanimation anim -play 1.0 0.0
ba00aab7 27if {[vreadpixel 160 360 rgb name] != "DARKGOLDENROD"} { puts "Error: Camera translation result is wrong!" }
1beb58d7 28vdump $imagedir/${casename}_1.png
29
30vanimation anim -play 2.0 0.0
ba00aab7 31if {[vreadpixel 260 360 rgb name] != "DARKGOLDENROD"} { puts "Error: Camera translation result is wrong!" }
1beb58d7 32vdump $imagedir/${casename}_2.png
33
34puts "Put the following command to start interactive animation:"
35puts " vanimation anim -play"