mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-09-08 14:17:06 +03:00
0032121: Draw Harness, ViewerTest - implement -reset option for vlight command
vlight command has been revised to provide more friendly syntax. Command now accepts light index or name as first argument. Added arguments -enable/-disable for managing enabled state. Added argument -reset to reset light parameters to default values. V3d_Viewer::SetDefaultLights() now sets names "headlight" and "ambient" to created lights. Graphic3d_TypeOfLightSource enumeration values have been renamed to avoid shortcuts. Draw::Atof(), applied corrections to avoid explicit new/delete calls.
This commit is contained in:
@@ -32,12 +32,12 @@ set THE_LIGHTS {
|
||||
{ -4 -1 0 MAGENTA }
|
||||
{ 4 -1 0 MAGENTA3 }
|
||||
}
|
||||
vlight clear
|
||||
vlight -clear
|
||||
for { set aLightIter 1 } { $aLightIter <= 10 } { incr aLightIter } {
|
||||
set aLight [lindex $THE_LIGHTS [expr $aLightIter - 1]]
|
||||
set aColor [lindex $aLight 3]
|
||||
set aPos [list [lindex $aLight 0] [lindex $aLight 1] [lindex $aLight 2]]
|
||||
vlight add positional pos {*}$aPos color $aColor headLight 0
|
||||
vlight pntlight${aLightIter} -type POSITIONAL -pos {*}$aPos -color $aColor -headLight 0
|
||||
vpoint v${aLightIter} {*}$aPos
|
||||
vdrawtext t${aLightIter} "light${aLightIter} $aColor" -pos {*}$aPos -color $aColor
|
||||
vdump $::imagedir/${::casename}_${aLightIter}.png
|
||||
|
Reference in New Issue
Block a user