mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
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.
This commit is contained in:
@@ -185,12 +185,12 @@ Standard_Boolean TexturesExt_Presentation::loadShape(TopoDS_Shape& aShape,
|
||||
//================================================================
|
||||
void TexturesExt_Presentation::lightsOnOff(Standard_Boolean isOn)
|
||||
{
|
||||
static Handle(V3d_Light) aLight1 = new V3d_DirectionalLight(getViewer(), V3d_XnegYposZneg);
|
||||
static Handle(V3d_Light) aLight2 = new V3d_DirectionalLight(getViewer(), V3d_XnegYnegZpos);
|
||||
static Handle(V3d_Light) aLight3 = new V3d_DirectionalLight(getViewer(), V3d_XposYnegZpos);
|
||||
static Handle(V3d_Light) aLight4 = new V3d_DirectionalLight(getViewer(), V3d_XnegYnegZneg);
|
||||
static Handle(V3d_Light) aLight5 = new V3d_DirectionalLight(getViewer(), V3d_XnegYposZpos);
|
||||
static Handle(V3d_Light) aLight6 = new V3d_DirectionalLight(getViewer(), V3d_XposYposZpos);
|
||||
static Handle(V3d_Light) aLight1 = new V3d_DirectionalLight(V3d_XnegYposZneg);
|
||||
static Handle(V3d_Light) aLight2 = new V3d_DirectionalLight(V3d_XnegYnegZpos);
|
||||
static Handle(V3d_Light) aLight3 = new V3d_DirectionalLight(V3d_XposYnegZpos);
|
||||
static Handle(V3d_Light) aLight4 = new V3d_DirectionalLight(V3d_XnegYnegZneg);
|
||||
static Handle(V3d_Light) aLight5 = new V3d_DirectionalLight(V3d_XnegYposZpos);
|
||||
static Handle(V3d_Light) aLight6 = new V3d_DirectionalLight(V3d_XposYposZpos);
|
||||
|
||||
if (isOn)
|
||||
{
|
||||
|
Reference in New Issue
Block a user