1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
|
puts "==========="
puts "OCC24224"
puts "==========="
puts ""
##########################################################################
# Suspicious logics in changing clipping planets at OpenGL_Structure
##########################################################################
## centre rectangle
set x1_coord 150
set y1_coord 250
## right rectangle
set x2_coord 255
set y2_coord 320
## left rectangle
set x3_coord 73
set y3_coord 150
vinit
box b1 0 0 0 10 10 10
box b2 30 0 0 10 40 10
box b3 -30 0 0 20 20 20
vsetdispmode 1
vdisplay b1 b2 b3
vfit
## test view-level clipping
vclipplane create pln1
vclipplane change pln1 equation 0 1 0 -5
vclipplane change pln1 capping on
vclipplane change pln1 capping color 0.9 0.9 0.9
vclipplane set pln1 view Driver1/Viewer1/View1
checkcolor $x1_coord $y1_coord 0.9 0.9 0.9
checkcolor $x2_coord $y2_coord 0.9 0.9 0.9
## test sharing of planes between view and object
vclipplane set pln1 object b1
## test object-level clipping
vclipplane create pln2
vclipplane change pln2 equation -0.707 0.707 0 -25
vclipplane change pln2 capping on
vclipplane change pln2 capping color 0.5 0.5 0.9
vclipplane change pln2 capping hatch on
vclipplane set pln2 object b3
checkcolor $x3_coord $y3_coord 0.5 0.5 0.9
set only_screen 1
|