1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-04 13:13:25 +03:00
occt/tests/v3d/materials/bug27818_1
vpa 8e5fb5eabc 0027818: Visualization - provide an interface to define highlight presentation properties
- introduces a wrapper for setting up highlight properties: Graphic3d_HighlightStyle;
- API of all methods that use highlight or selection color is changed to deal with Graphic3d_HighlightStyle;
- highlight in shading mode now supports transparency, implemented via blending;
- transparency for selection can also be set, but implementing custom entity owners with additional presentation on application level;
- methods PrsMgr_PresentationManager::Highlight, PrsMgr_PresentationManager::BoundBox that highlight object with hard-coded color are removed;
- deprecated methods of SelectMgr_EntityOwner, that use presentation manager's highlight method, were removed;
- methods of IsHilighted AIS context with selection color checks were replaced;
- added API to store dynamic and selection highlight to Prs3d_Drawer class;
- customization of dynamic and selection highlight for particular objects is now available through SelectMgr_SelectableObject::HilightAttributes();
- AIS_InteractiveContext highlight methods were updated to support individual highlight styles of interactive objects;
- introduced new command - vselprops, that allows to customize global selection and highlight properties like autoactivation, pixel tolerance and colors;
- Draw Harness commands vautoactivatesel and vselprecision were removed, use vselprops instead;
- fixed bug in command's parser;
- test case for issue #27818
2016-09-30 11:17:11 +03:00

45 lines
1.1 KiB
Plaintext

puts "============"
puts "OCC27818_1"
puts "============"
puts ""
####################################################################################
# Visualization - provide an interface to define highlight presentation properties:
# test change of highlight properties for whole interactive context
####################################################################################
pload VISUALIZATION MODELING
box b 10 20 30
pcone p 15 0 40
vinit
vclear
vdisplay b -dispMode 1 -highMode 1
vdisplay p -dispMode 1 -highMode 1
vsetcolor b RED
vsetcolor p GREEN
vviewparams -scale 17.8 -proj 0.9 -0.3 0.3
vviewparams -up -0.2 0.4 0.9 -at 1.99 2.4 20.9
vviewparams -eye 56.1 -17.7 39.4
vselprops -hiTransp 0.1 -hiColor PALEGREEN2
vmoveto 167 263
set aPixelColor [vreadpixel 167 263 name rgba]
set aTransp [lindex [split $aPixelColor { }] 1]
if { $aTransp == 1 } {
puts "Error: highlighting of a cone is not transparent!"
}
vmoveto 285 212
set aPixelColor [vreadpixel 285 212 name rgba]
set aTransp [lindex [split $aPixelColor { }] 1]
if { $aTransp == 1 } {
puts "Error: highlighting of a box is not transparent!"
}
vdump $imagedir/${casename}.png