5 #######################################################################
6 # Visualization - precision factor added to ZNear, ZFar in method ZFitAll() of Graphic3d_Camera is not enough
7 #######################################################################
9 vinit View1 w=409 h=409
16 for {set i 8} {$i <= 8} {incr i} {
17 set min_z [expr pow (-10, $i)]
18 set max_z [expr $min_z + 1000]
19 plane p1 0 0 $min_z 0 0 1
20 plane p2 0 0 $max_z 0 0 1
22 mkface f1 p1 -1 0 -1 0
30 for {set z [expr $max_z + 1.0]} {$z <= 1e10} {set z [expr abs ($z) * 1.2]} {
31 vviewparams -eye 0 0 $z
33 if { [checkcolor {*}$pix1 0 1 1] != 1 } {
34 puts "Error: 2D projection test failed with the following parameters:"
44 if { [checkcolor {*}$pix2 0 1 1] != 1 } {
45 puts "Error: 2D projection test failed with the following parameters:"
61 ####################################################################
62 # Test orthographic camera without frustum culling. #
63 ####################################################################
65 vrenderparams -frustumculling off
67 if { [test2d] != 1 } {
68 puts "Error: 2D projection test failed: view frustum culling is OFF"
71 ####################################################################
72 # Test orthographic camera with frustum culling. #
73 ####################################################################
75 vrenderparams -frustumculling on
77 if { [test2d] != 1 } {
78 puts "Error: 2D projection test failed: view frustum culling is ON"