0025789: Visualization - get rid of obsolete 2d layers implementation
[occt.git] / src / V3d / V3d_View_5.cxx
1 // Copyright (c) 1999-2014 OPEN CASCADE SAS
2 //
3 // This file is part of Open CASCADE Technology software library.
4 //
5 // This library is free software; you can redistribute it and/or modify it under
6 // the terms of the GNU Lesser General Public License version 2.1 as published
7 // by the Free Software Foundation, with special exception defined in the file
8 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
9 // distribution for complete text of the license and disclaimer of any warranty.
10 //
11 // Alternatively, this file may be used under the terms of Open CASCADE
12 // commercial license or contractual agreement.
13
14 /***********************************************************************
15      FONCTION :
16      ----------
17         Classe V3d_View :
18      HISTORIQUE DES MODIFICATIONS   :
19      --------------------------------
20       22-10-01 : SAV ; Created
21 ************************************************************************/
22 /*----------------------------------------------------------------------*/
23 /*
24  * Includes
25  */
26
27 #include <Aspect_GradientBackground.hxx>
28 #include <Aspect_Grid.hxx>
29 #include <Aspect_Window.hxx>
30 #include <Bnd_Box.hxx>
31 #include <gp_Ax3.hxx>
32 #include <gp_Dir.hxx>
33 #include <Graphic3d_Group.hxx>
34 #include <Graphic3d_Structure.hxx>
35 #include <Graphic3d_TextureEnv.hxx>
36 #include <Graphic3d_Vector.hxx>
37 #include <Quantity_Color.hxx>
38 #include <Standard_MultiplyDefined.hxx>
39 #include <Standard_TypeMismatch.hxx>
40 #include <V3d_BadValue.hxx>
41 #include <V3d_Light.hxx>
42 #include <V3d_UnMapped.hxx>
43 #include <V3d_View.hxx>
44 #include <V3d_Viewer.hxx>
45 #include <Visual3d_View.hxx>
46
47 //BUC61044 25/10/01 SAV ; added functionality to control gl depth testing from higher API
48 //BUC61045 25/10/01 SAV ; added functionality to control gl lighting from higher API
49 void V3d_View::EnableGLLight( const Standard_Boolean enable ) const
50 {
51   MyView->EnableGLLight( enable );
52 }
53
54 Standard_Boolean V3d_View::IsGLLightEnabled() const
55 {
56   return MyView->IsGLLightEnabled();
57 }
58
59 const Graphic3d_RenderingParams& V3d_View::RenderingParams() const
60 {
61   return static_cast<Graphic3d_CView*> (MyView->CView())->RenderParams;
62 }
63
64 Graphic3d_RenderingParams& V3d_View::ChangeRenderingParams()
65 {
66   return static_cast<Graphic3d_CView*> (MyView->CView())->RenderParams;
67 }