0029528: Visualization, TKOpenGl - allow defining sRGB textures
[occt.git] / tests / v3d / anim / translate
1 puts "=================================="
2 puts "Viewer animation - translate the view camera"
3 puts "=================================="
4
5 pload MODELING VISUALIZATION
6
7 vclear
8 vinit View1
9 vaxo
10 vzbufftrihedron -position right_lower
11
12 box b1 -50 -50 0 100 100 100
13 vdisplay -noupdate -dispMode 1 b1
14 vviewparams -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
19 vanimation anim -clear
20 vanimation anim/movecam -view -at1 116 355 327 -at2 -174 47 330 -eye1 225 253 413 -eye2 -65 -55 415 -duration 2
21
22 vanimation anim -play 0.0 0.0
23 if {[vreadpixel 60  360 rgb name] != "DARKGOLDENROD"} { puts "Error: Camera translation result is wrong!" }
24 vdump $imagedir/${casename}_0.png
25
26 vanimation anim -play 1.0 0.0
27 if {[vreadpixel 160 360 rgb name] != "DARKGOLDENROD"} { puts "Error: Camera translation result is wrong!" }
28 vdump $imagedir/${casename}_1.png
29
30 vanimation anim -play 2.0 0.0
31 if {[vreadpixel 260 360 rgb name] != "DARKGOLDENROD"} { puts "Error: Camera translation result is wrong!" }
32 vdump $imagedir/${casename}_2.png
33
34 puts "Put the following command to start interactive animation:"
35 puts "    vanimation anim -play"