1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-05 18:16:23 +03:00

0027972: Visualization - remove unused and not implemented property V3d_View::EnableGLLight()

This commit is contained in:
kgv 2016-10-17 17:39:30 +03:00 committed by apn
parent df18769ea6
commit ebc369da1d
10 changed files with 18 additions and 117 deletions

View File

@ -1123,7 +1123,6 @@ void Graphic3d_CView::CopySettings (const Handle(Graphic3d_CView)& theOther)
SetShadingModel (theOther->ShadingModel()); SetShadingModel (theOther->ShadingModel());
SetBackfacingModel (theOther->BackfacingModel()); SetBackfacingModel (theOther->BackfacingModel());
SetCamera (new Graphic3d_Camera (theOther->Camera())); SetCamera (new Graphic3d_Camera (theOther->Camera()));
SetGLLightEnabled (theOther->IsGLLightEnabled());
SetLights (theOther->Lights()); SetLights (theOther->Lights());
SetClipPlanes (theOther->ClipPlanes()); SetClipPlanes (theOther->ClipPlanes());
} }

View File

@ -420,12 +420,6 @@ public:
//! Sets camera used by the view. //! Sets camera used by the view.
virtual void SetCamera (const Handle(Graphic3d_Camera)& theCamera) = 0; virtual void SetCamera (const Handle(Graphic3d_Camera)& theCamera) = 0;
//! Returns true if GL lighting is enabled.
virtual Standard_Boolean IsGLLightEnabled() const = 0;
//! Sets GL lighting enabled or disable state.
virtual void SetGLLightEnabled (const Standard_Boolean theIsEnabled) = 0;
//! Returns list of lights of the view. //! Returns list of lights of the view.
virtual const Graphic3d_ListOfCLight& Lights() const = 0; virtual const Graphic3d_ListOfCLight& Lights() const = 0;

View File

@ -58,7 +58,6 @@ OpenGl_View::OpenGl_View (const Handle(Graphic3d_StructureManager)& theMgr,
myBackfacing (Graphic3d_TOBM_AUTOMATIC), myBackfacing (Graphic3d_TOBM_AUTOMATIC),
myBgColor (Quantity_NOC_BLACK), myBgColor (Quantity_NOC_BLACK),
myCamera (new Graphic3d_Camera()), myCamera (new Graphic3d_Camera()),
myUseGLLight (Standard_True),
myToShowGradTrihedron (false), myToShowGradTrihedron (false),
myStateCounter (theCounter), myStateCounter (theCounter),
myLastLightSourceState (0, 0), myLastLightSourceState (0, 0),

View File

@ -271,12 +271,6 @@ public:
//! Sets camera used by the view. //! Sets camera used by the view.
virtual void SetCamera (const Handle(Graphic3d_Camera)& theCamera) Standard_OVERRIDE { myCamera = theCamera; } virtual void SetCamera (const Handle(Graphic3d_Camera)& theCamera) Standard_OVERRIDE { myCamera = theCamera; }
//! Returns true if GL lighting is enabled.
virtual Standard_Boolean IsGLLightEnabled() const Standard_OVERRIDE { return myUseGLLight; }
//! Sets GL lighting enabled or disable state.
virtual void SetGLLightEnabled (const Standard_Boolean theIsEnabled) Standard_OVERRIDE { myUseGLLight = theIsEnabled; }
//! Returns list of lights of the view. //! Returns list of lights of the view.
virtual const Graphic3d_ListOfCLight& Lights() const Standard_OVERRIDE { return myLights; } virtual const Graphic3d_ListOfCLight& Lights() const Standard_OVERRIDE { return myLights; }
@ -460,7 +454,6 @@ protected:
Handle(Graphic3d_SequenceOfHClipPlane) myClipPlanes; Handle(Graphic3d_SequenceOfHClipPlane) myClipPlanes;
Handle(Graphic3d_Camera) myCamera; Handle(Graphic3d_Camera) myCamera;
Handle(OpenGl_FrameBuffer) myFBO; Handle(OpenGl_FrameBuffer) myFBO;
Standard_Boolean myUseGLLight;
Standard_Boolean myToShowGradTrihedron; Standard_Boolean myToShowGradTrihedron;
TCollection_AsciiString myBackgroundImagePath; TCollection_AsciiString myBackgroundImagePath;
Handle(Graphic3d_TextureEnv) myTextureEnvData; Handle(Graphic3d_TextureEnv) myTextureEnvData;

View File

@ -135,7 +135,6 @@ OpenGl_Workspace::OpenGl_Workspace (OpenGl_View* theView, const Handle(OpenGl_Wi
myGlContext (!theWindow.IsNull() ? theWindow->GetGlContext() : NULL), myGlContext (!theWindow.IsNull() ? theWindow->GetGlContext() : NULL),
myUseZBuffer (Standard_True), myUseZBuffer (Standard_True),
myUseDepthWrite (Standard_True), myUseDepthWrite (Standard_True),
myUseGLLight (Standard_True),
// //
myAspectLineSet (&myDefaultAspectLine), myAspectLineSet (&myDefaultAspectLine),
myAspectFaceSet (&myDefaultAspectFace), myAspectFaceSet (&myDefaultAspectFace),
@ -963,15 +962,6 @@ Standard_Integer OpenGl_Workspace::Height() const
return !myView->GlWindow().IsNull() ? myView->GlWindow()->Height() : 0; return !myView->GlWindow().IsNull() ? myView->GlWindow()->Height() : 0;
} }
// =======================================================================
// function : UseGLLight
// purpose :
// =======================================================================
Standard_Boolean OpenGl_Workspace::UseGLLight() const
{
return myView->IsGLLightEnabled();
}
// ======================================================================= // =======================================================================
// function : IsCullingEnabled // function : IsCullingEnabled
// purpose : // purpose :

View File

@ -155,9 +155,6 @@ public:
//! @return true if depth writing is enabled. //! @return true if depth writing is enabled.
Standard_Boolean& UseDepthWrite() { return myUseDepthWrite; } Standard_Boolean& UseDepthWrite() { return myUseDepthWrite; }
//! @return true if usage of GL light is enabled.
Standard_EXPORT Standard_Boolean UseGLLight() const;
//! @return true if clipping algorithm enabled //! @return true if clipping algorithm enabled
Standard_EXPORT Standard_Boolean IsCullingEnabled() const; Standard_EXPORT Standard_Boolean IsCullingEnabled() const;
@ -355,7 +352,6 @@ protected: //! @name protected fields
Handle(OpenGl_Context) myGlContext; Handle(OpenGl_Context) myGlContext;
Standard_Boolean myUseZBuffer; Standard_Boolean myUseZBuffer;
Standard_Boolean myUseDepthWrite; Standard_Boolean myUseDepthWrite;
Standard_Boolean myUseGLLight;
Handle(OpenGl_CappingAlgoFilter) myDefaultCappingAlgoFilter; Handle(OpenGl_CappingAlgoFilter) myDefaultCappingAlgoFilter;
OpenGl_AspectFace myNoneCulling; OpenGl_AspectFace myNoneCulling;
OpenGl_AspectFace myFrontCulling; OpenGl_AspectFace myFrontCulling;

View File

@ -44,7 +44,6 @@ V3d_View.hxx
V3d_View_2.cxx V3d_View_2.cxx
V3d_View_3.cxx V3d_View_3.cxx
V3d_View_4.cxx V3d_View_4.cxx
V3d_View_5.cxx
V3d_Viewer.cxx V3d_Viewer.cxx
V3d_Viewer.hxx V3d_Viewer.hxx
V3d_Viewer_3.cxx V3d_Viewer_3.cxx

View File

@ -3334,3 +3334,21 @@ void V3d_View::DiagnosticInformation (TColStd_IndexedDataMapOfStringString& theD
{ {
myView->DiagnosticInformation (theDict, theFlags); myView->DiagnosticInformation (theDict, theFlags);
} }
//=============================================================================
//function : RenderingParams
//purpose :
//=============================================================================
const Graphic3d_RenderingParams& V3d_View::RenderingParams() const
{
return myView->RenderingParams();
}
//=============================================================================
//function : ChangeRenderingParams
//purpose :
//=============================================================================
Graphic3d_RenderingParams& V3d_View::ChangeRenderingParams()
{
return myView->ChangeRenderingParams();
}

View File

@ -853,13 +853,6 @@ public:
//! Returns current state of the back faces display //! Returns current state of the back faces display
Standard_EXPORT V3d_TypeOfBackfacingModel BackFacingModel() const; Standard_EXPORT V3d_TypeOfBackfacingModel BackFacingModel() const;
//! turns on/off opengl lighting, currently used in triedron displaying
Standard_EXPORT void EnableGLLight (const Standard_Boolean theIsEnabled = Standard_True) const;
//! returns the current state of the gl lighting
//! currently used in triedron displaying
Standard_EXPORT Standard_Boolean IsGLLightEnabled() const;
//! Adds clip plane to the view. The composition of clip planes truncates the //! Adds clip plane to the view. The composition of clip planes truncates the
//! rendering space to convex volume. Number of supported clip planes can be consulted //! rendering space to convex volume. Number of supported clip planes can be consulted
//! by PlaneLimit method of associated Graphic3d_GraphicDriver. //! by PlaneLimit method of associated Graphic3d_GraphicDriver.

View File

@ -1,80 +0,0 @@
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
/***********************************************************************
FONCTION :
----------
Classe V3d_View :
HISTORIQUE DES MODIFICATIONS :
--------------------------------
22-10-01 : SAV ; Created
************************************************************************/
/*----------------------------------------------------------------------*/
/*
* Includes
*/
#include <Aspect_GradientBackground.hxx>
#include <Aspect_Grid.hxx>
#include <Aspect_Window.hxx>
#include <Bnd_Box.hxx>
#include <gp_Ax3.hxx>
#include <gp_Dir.hxx>
#include <Graphic3d_Group.hxx>
#include <Graphic3d_Structure.hxx>
#include <Graphic3d_TextureEnv.hxx>
#include <Graphic3d_Vector.hxx>
#include <Quantity_Color.hxx>
#include <Standard_MultiplyDefined.hxx>
#include <Standard_TypeMismatch.hxx>
#include <V3d_BadValue.hxx>
#include <V3d_Light.hxx>
#include <V3d_UnMapped.hxx>
#include <V3d_View.hxx>
#include <V3d_Viewer.hxx>
//=============================================================================
//function : EnableGLLight
//purpose :
//=============================================================================
void V3d_View::EnableGLLight (const Standard_Boolean theIsEnabled) const
{
myView->SetGLLightEnabled (theIsEnabled);
}
//=============================================================================
//function : IsGLLightEnabled
//purpose :
//=============================================================================
Standard_Boolean V3d_View::IsGLLightEnabled() const
{
return myView->IsGLLightEnabled();
}
//=============================================================================
//function : RenderingParams
//purpose :
//=============================================================================
const Graphic3d_RenderingParams& V3d_View::RenderingParams() const
{
return myView->RenderingParams();
}
//=============================================================================
//function : ChangeRenderingParams
//purpose :
//=============================================================================
Graphic3d_RenderingParams& V3d_View::ChangeRenderingParams()
{
return myView->ChangeRenderingParams();
}