1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-06 18:26:22 +03:00
mkrylova 2daa5d95a5 0031704: Visualization - add an interactive object AIS_LightSource representing a light source
Added new class AIS_LightSource representing a light source presentation.

Graphic3d_TMF_CameraPers - added new mode to Graphic3d_TransformPers
defining 3D point relative to camera Eye position
2021-02-11 20:06:14 +03:00

29 lines
1.0 KiB
Plaintext

puts "================================="
puts "0031704: Visualization - add an interactive object AIS_LightSource representing a light source"
puts "================================="
pload MODELING VISUALIZATION
vclear
vinit View1
vlight -clear
vbackground -color GRAY
vrenderparams -shadingModel PHONG
vlight -add ambient -COLOR WHITE -intensity 0.1
box b 10 10 10 30 30 30
vdisplay b -dispMode 1
vaspects b -material Brass
vfit
puts "=== Check headlight option with spotlight ==="
vlight -add spotlight -dir 0 0 -1 -head 1 -intensity 1000000000 -color GREEN -display aSpotlight
set aColor1 [vreadpixel 200 200 rgb name]
if { "$aColor1" != "GREEN" } { puts "Error: expected color near the light is GREEN" }
vdump $imagedir/${casename}_spot.png
puts "=== Check headlight option with positional light ==="
vlight -remove 1
vlight -add positional -head 1 -color RED -display aPosLight
set aColor2 [vreadpixel 200 200 rgb name]
if { "$aColor2" != "RED" } { puts "Error: expected color near the light is RED" }
vdump $imagedir/${casename}_pos.png