mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0024393: Visualization - objects position with enchanced precision
Graphic3d_ZLayerSettings - public fields have been replaced by methods. Added new property Origin defining local coordinate system for all Layer objects. Syntax of Draw Harness command VZLayer has been redesigned. Graphic3d_CStructure now stores bounding box with double precision floats. OpenGl_BVHTreeSelector - frustum culling now works with double precision floats.
This commit is contained in:
@@ -11,11 +11,11 @@ vertex v 100 -300 0
|
||||
vclear
|
||||
vinit View1
|
||||
catch { vzlayer del 1 }
|
||||
vzlayer add 1
|
||||
vzlayer enable 1 depthclear
|
||||
set aLayerId [vzlayer add]
|
||||
vzlayer ${aLayerId} -enable depthClear
|
||||
vaxo
|
||||
vdisplay -noupdate -dispMode 1 -highMode 1 b1
|
||||
vdisplay -noupdate -dispMode 1 -highMode 1 -layer 1 b2
|
||||
vdisplay -noupdate -dispMode 1 -highMode 1 -layer ${aLayerId} b2
|
||||
vsetcolor -noupdate b1 RED
|
||||
vsetcolor -noupdate b2 GREEN
|
||||
vfit
|
||||
|
54
tests/v3d/glsl/double_precision
Normal file
54
tests/v3d/glsl/double_precision
Normal file
@@ -0,0 +1,54 @@
|
||||
puts "========"
|
||||
puts "0024393: Visualization - objects position with enchanced precision"
|
||||
puts "========"
|
||||
|
||||
pload MODELING VISUALIZATION
|
||||
vclear
|
||||
vinit View1
|
||||
vaxo
|
||||
vzbufftrihedron
|
||||
circle c 0 0 0 0.001
|
||||
mkedge e c
|
||||
wire w e
|
||||
plane s
|
||||
mkface f0 s w
|
||||
mkface f1000 s w
|
||||
ttranslate f1000 1000 0 0
|
||||
# Display object with pre-applied transformation.
|
||||
# Result presentation is already corrupted
|
||||
# AND it jumps while rotating the camera.
|
||||
vpoint v1000 1000 0 0.001
|
||||
vdisplay -dispMode 1 f1000
|
||||
vfit
|
||||
|
||||
# Display object with external transformation.
|
||||
# Result presentation jumps while rotating the camera.
|
||||
vdisplay -dispMode 1 f0
|
||||
vsetlocation f0 1000 0 0
|
||||
|
||||
# Display object with external transformation
|
||||
# in Z-layer with translated Origin.
|
||||
# Result presentation does not jump while rotating the camera.
|
||||
vzlayer top -origin 1000 0 0
|
||||
vdisplay -dispMode 1 -top f0
|
||||
|
||||
# check transformation persistence
|
||||
vtrihedron tt
|
||||
vdisplay -top -trihedron topLeft 100 100 tt
|
||||
|
||||
box zp 40 50 30
|
||||
vdisplay -top -dispMode 1 -trsfPers zoom -trsfPersPos 1000 0 0 zp
|
||||
|
||||
# check clippling planes
|
||||
vclipplane pln -equation -1 0 0 1000 -set
|
||||
|
||||
# check positional lights
|
||||
vlight add positional pos 1000 0 0.001 color RED1 headlight 0
|
||||
|
||||
vremove f1000
|
||||
vmoveto 220 220
|
||||
|
||||
vdrawtext text Text -pos 0 0 0
|
||||
vdisplay -top text -trsfPers zoomRotate -trsfPersPos 1000 0 0.001
|
||||
|
||||
vdump $::imagedir/${::casename}.png
|
@@ -26,40 +26,40 @@ vrotate 0.5 0 0
|
||||
vzbufftrihedron
|
||||
|
||||
catch { vzlayer del 1 }
|
||||
vzlayer add 1
|
||||
vzlayer enable 1 depthclear
|
||||
set aLayerId [vzlayer add]
|
||||
vzlayer $aLayerId -enable depthClear
|
||||
|
||||
vtrihedron trh
|
||||
vdisplay -noupdate trh -layer 1 -trihedron topRight 100 100
|
||||
vdisplay -noupdate trh -layer $aLayerId -trihedron topRight 100 100
|
||||
|
||||
text2brep tcc "Center" -font $aLabelFont -height 30 -pos -40 0 0
|
||||
vdisplay -noupdate tcc -2d center -layer 1 -dispMode 1
|
||||
vdisplay -noupdate tcc -2d center -layer $aLayerId -dispMode 1
|
||||
polyline lcc -50 -50 0 -50 50 0 50 50 0 50 0 0 0 -50 0 -50 -50 0
|
||||
vdisplay -noupdate lcc -2d center -layer 1
|
||||
vdisplay -noupdate lcc -2d center -layer $aLayerId
|
||||
vsetwidth -noupdate lcc 2
|
||||
|
||||
text2brep tbl "Bottom-Left" -font $aLabelFont -height 30 -pos 0 3 5
|
||||
vdisplay -noupdate tbl -2d bottomLeft -layer 1 -dispMode 1
|
||||
vdisplay -noupdate tbl -2d bottomLeft -layer $aLayerId -dispMode 1
|
||||
polyline lbl 0 0 0 0 100 0 100 100 0 100 50 0 50 0 0 0 0 0
|
||||
vdisplay -noupdate lbl -2d bottomLeft -layer 1
|
||||
vdisplay -noupdate lbl -2d bottomLeft -layer $aLayerId
|
||||
vsetwidth -noupdate lbl 2
|
||||
|
||||
text2brep ttl "Top-Left" -font $aLabelFont -height 30 -pos 0 -30 0
|
||||
vdisplay -noupdate ttl -2d topLeft -layer 1 -dispMode 1
|
||||
vdisplay -noupdate ttl -2d topLeft -layer $aLayerId -dispMode 1
|
||||
polyline ltl 0 -100 0 0 0 0 100 0 0 100 -50 0 50 -100 0 0 -100 0
|
||||
vdisplay -noupdate ltl -2d topLeft -layer 1
|
||||
vdisplay -noupdate ltl -2d topLeft -layer $aLayerId
|
||||
vsetwidth -noupdate ltl 2
|
||||
|
||||
text2brep ttr "Top-Right" -font $aLabelFont -height 30 -pos -130 -30 0
|
||||
vdisplay -noupdate ttr -2d topRight -layer 1 -dispMode 1
|
||||
vdisplay -noupdate ttr -2d topRight -layer $aLayerId -dispMode 1
|
||||
polyline ltr -100 -100 0 -100 0 0 0 0 0 0 -50 0 -50 -100 0 -100 -100 0
|
||||
vdisplay -noupdate ltr -2d topRight -layer 1
|
||||
vdisplay -noupdate ltr -2d topRight -layer $aLayerId
|
||||
vsetwidth -noupdate ltr 2
|
||||
|
||||
text2brep tbr "Bottom-Right" -font $aLabelFont -height 30 -pos -180 3 0
|
||||
vdisplay -noupdate tbr -2d bottomRight -layer 1 -dispMode 1
|
||||
vdisplay -noupdate tbr -2d bottomRight -layer $aLayerId -dispMode 1
|
||||
polyline lbr -100 0 0 -100 100 0 0 100 0 0 50 0 -50 0 0 -100 0 0
|
||||
vdisplay -noupdate lbr -2d bottomRight -layer 1
|
||||
vdisplay -noupdate lbr -2d bottomRight -layer $aLayerId
|
||||
vsetwidth -noupdate lbr 2
|
||||
|
||||
vdrawtext t2 "Label" -pos 1 0 1 -font $aLabelFont
|
||||
|
Reference in New Issue
Block a user