1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-07-30 13:05:50 +03:00
occt/tests/v3d/raytrace/bug24819
isz 61b0191c54 0026490: Visualization - implement draw commands 'voverlaytext' and 'vlayerline' using AIS_InteractiveObject class
Command 'voverlaytext' was removed, its functionality was transfered to command 'vdrawtext'. Corresponding test cases were updated.
Command 'vlayerline' was implemented on AIS.
2015-08-13 10:59:10 +03:00

72 lines
1.5 KiB
Plaintext

puts "========"
puts "OCC24819: TKOpenGl - extend the ray-tracing core by visualization of lines, text and point sprites"
puts "========"
# setup 3D viewer content
vinit name=View1 w=512 h=512
vglinfo
vvbo 0
vsetdispmode 1
vsetgradientbg 180 200 255 180 180 180 2
# boxes
box b1 1 1 1
vdisplay b1
vsetlocation b1 0 0 0.001
vsetmaterial b1 Silver
vsettransparency b1 0.5
box b2 3 2 2 1 2 1
vdisplay b2
vsetmaterial b2 Pewter
vsettransparency b2 0.8
# brep text
text2brep t "text" "Arial" 8
vdisplay t
# overlay objects
vdrawtext t1 "Overlay text!" -2d -perspos -1 1 -pos 200 -440 0 -height 40
# markers
vpoint p 1 1 1
vdisplay p
vmarkerstest mTest 7 -3 0 PointsOnSide=5 MarkerType=5
# 3d text
vdrawtext text0 3D_Text -pos 1 2 2 -color 1.0 0.0 0.0 -halign left -valign bottom -angle 0 -zoom 0 -height 20 -aspect regular
vlight change 0 pos -1 1 1
vfit
# trihedron
vzbufftrihedron
# activate ray-tracing
vrenderparams -raytrace
# orthogonal projection
set aModeNum 0
foreach aFSAAMode {on off} {
foreach aReflMode {on off} {
foreach aShadMode {on off} {
vrenderparams -shadows $aShadMode -reflections $aReflMode -fsaa $aFSAAMode
vdump $imagedir/${casename}_${aModeNum}.png
incr aModeNum
}
}
}
# perspective projection
vcamera -persp
set aModeNum 0
foreach aFSAAMode {on off} {
foreach aReflMode {on off} {
foreach aShadMode {on off} {
vrenderparams -shadows $aShadMode -reflections $aReflMode -fsaa $aFSAAMode
vdump $imagedir/${casename}_${aModeNum}.png
incr aModeNum
}
}
}