1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-09 18:50:54 +03:00
occt/tests/v3d/raytrace/bug26617
kgv 992ed6b3c0 0029290: Visualization, TKOpenGl - allow defining Light source per ZLayer
Graphic3d_CLight is now defined as a class inheriting Standard_Transient,
so that it's fields now should be accessed through methods.
Graphic3d_CLight::IsEnabled() - new property allowing to disable light source everywhere.
Confusing alias OpenGl_Light has been removed.

Graphic3d_CLight::SetAttenuation() - the upper limit 1.0 of attenuation factors has been removed
since it contradicts to OpenGL specs and does not make sense.

Graphic3d_ZLayerSettings::Lights() - light sources list is now property of ZLayer.
When defined, it overrides light sources defined for View/Viewer.
New class Graphic3d_LightSet has been defined to define a set of light sources.

V3d_Light - removed obsolete interface for debug drawing lights sources.
V3d_Light is now an alias to Graphic3d_CLight.
V3d_TypeOfLight is now defined as a typedef to Graphic3d_TypeOfLightSource.
2017-11-30 23:09:23 +03:00

39 lines
928 B
Plaintext

puts "============"
puts "CR26617"
puts "============"
puts ""
##########################################################################################
# Visualization, Ray Tracing - adopt progressive rendering Path Tracing for rendering stereoscopic pair
##########################################################################################
# custom shapes
set aShape1 [locate_data_file occ/Top.brep]
set aShape2 [locate_data_file occ/Bottom.brep]
# setup 3D viewer content
vinit name=View1 w=512 h=512
vglinfo
vvbo 0
vsetdispmode 1
vsetgradientbg 180 200 255 180 180 180 2
restore $aShape1 s1
restore $aShape2 s2
vdisplay s1 s2
vsetmaterial s1 Silver
vsetmaterial s2 Pewter
vsetlocation s1 0.0 0.1 0.0
vlight -change 0 -dir 0.577 -0.577 -0.577
# activate ray-tracing
vrenderparams -raytrace
vtextureenv on 5
vrenderparams -reflections -gi
# activate stereo
vstereo on
vstereo -mode anaglyph
vcamera -iod 0.1
vfit