Files
OCCT/tests/v3d/grid/view_adaptive
T
Pasukhin Dmitry 058ec16010 Visualization - Grid shader update (#1264)
- Renamed grid terminology and command/API surface from `inf`/“infinite” to `gpu`/“GPU”, plus `viewAdaptive` for camera-relative sizing.
- Updated OpenGl grid rendering to compute adaptive bounds from the visible region and to fix axis coloring for rotated rectangular grids.
- Refreshed Draw tests, help text, and API comments to match the new behavior.
2026-05-05 09:43:14 +01:00

36 lines
1.1 KiB
Plaintext

puts "=================================================================="
puts "GPU grid -viewAdaptive 1: cell spacing tracks camera zoom"
puts "=================================================================="
# -viewAdaptive derives both the cell size and the rendered bounds from
# the visible region (camera scale + viewport unprojection). Zooming in
# should keep cells visible and roughly the same screen-space density;
# zooming out should adapt the rendered extents to enclose the new view.
pload MODELING VISUALIZATION
vclear
vinit View1 w=400 h=400
vaxo
box b 1 1 1
vdisplay b -dispMode 1
vfit
vgrid -type gpu -viewAdaptive 1
vdump $imagedir/${casename}_fit.png
# Zoom out 10x - bounds must widen so the grid still fills the view.
vzoom 0.1
vdump $imagedir/${casename}_zoom_out.png
# Zoom in 100x relative to current - cells must subdivide and remain visible.
vzoom 100
vdump $imagedir/${casename}_zoom_in.png
# Same again with a circular grid to exercise the polar bounds branch.
vzoom 0.0001
vgrid -type gpu -viewAdaptive 1 -step 0.5 24
vdump $imagedir/${casename}_circ.png
vgrid off