1 // Copyright (c) 2019 OPEN CASCADE SAS
3 // This file is part of Open CASCADE Technology software library.
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.
11 // Alternatively, this file may be used under the terms of Open CASCADE
12 // commercial license or contractual agreement.
14 #include <Graphic3d_Aspects.hxx>
16 IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_Aspects, Standard_Transient)
18 // =======================================================================
19 // function : Graphic3d_Aspects
21 // =======================================================================
22 Graphic3d_Aspects::Graphic3d_Aspects()
23 : myInteriorColor (Quantity_NOC_CYAN1),
24 myBackInteriorColor (Quantity_NOC_CYAN1),
25 myEdgeColor (Quantity_NOC_WHITE),
26 myInteriorStyle (Aspect_IS_SOLID),
27 myShadingModel (Graphic3d_TOSM_DEFAULT),
28 myAlphaMode (Graphic3d_AlphaMode_BlendAuto),
30 myLineType (Aspect_TOL_SOLID),
32 myMarkerType (Aspect_TOM_POINT),
34 myTextStyle (Aspect_TOST_NORMAL),
35 myTextDisplayType (Aspect_TODT_NORMAL),
36 myTextFontAspect (Font_FontAspect_Regular),
38 myToSkipFirstEdge (false),
39 myToDistinguishMaterials (false),
40 myToDrawEdges (false),
41 myToDrawSilhouette (false),
42 myToSuppressBackFaces (true),
43 myToMapTexture (false),
44 myIsTextZoomable (false)
49 // =======================================================================
50 // function : SetTextureMap
52 // =======================================================================
53 void Graphic3d_Aspects::SetTextureMap (const Handle(Graphic3d_TextureMap)& theTexture)
55 if (theTexture.IsNull())
57 myTextureSet.Nullify();
61 myTextureSet = new Graphic3d_TextureSet (theTexture);