1 // Created by: NW,JPB,CAL
2 // Copyright (c) 1991-1999 Matra Datavision
3 // Copyright (c) 1999-2014 OPEN CASCADE SAS
5 // This file is part of Open CASCADE Technology software library.
7 // This library is free software; you can redistribute it and/or modify it under
8 // the terms of the GNU Lesser General Public License version 2.1 as published
9 // by the Free Software Foundation, with special exception defined in the file
10 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11 // distribution for complete text of the license and disclaimer of any warranty.
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
16 #include <Graphic3d_AspectFillArea3d.hxx>
18 IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_AspectFillArea3d, Standard_Transient)
20 // =======================================================================
21 // function : Graphic3d_AspectFillArea3d
23 // =======================================================================
24 Graphic3d_AspectFillArea3d::Graphic3d_AspectFillArea3d()
25 : myInteriorColor (Quantity_NOC_CYAN1),
26 myBackInteriorColor (Quantity_NOC_CYAN1),
27 myEdgeColor (Quantity_NOC_WHITE),
28 myInteriorStyle (Aspect_IS_EMPTY),
29 myEdgeType (Aspect_TOL_SOLID),
31 myHatchStyle (Aspect_HS_VERTICAL),
32 myToDistinguishMaterials (false),
33 myToDrawEdges (false),
34 myToSuppressBackFaces (true),
35 myToMapTexture (false)
40 // =======================================================================
41 // function : Graphic3d_AspectFillArea3d
43 // =======================================================================
44 Graphic3d_AspectFillArea3d::Graphic3d_AspectFillArea3d (const Aspect_InteriorStyle theInteriorStyle,
45 const Quantity_Color& theInteriorColor,
46 const Quantity_Color& theEdgeColor,
47 const Aspect_TypeOfLine theEdgeLineType,
48 const Standard_Real theEdgeLineWidth,
49 const Graphic3d_MaterialAspect& theFrontMaterial,
50 const Graphic3d_MaterialAspect& theBackMaterial)
51 : myFrontMaterial (theFrontMaterial),
52 myBackMaterial (theBackMaterial),
53 myInteriorColor (theInteriorColor),
54 myBackInteriorColor (theInteriorColor),
55 myEdgeColor (theEdgeColor),
56 myInteriorStyle (theInteriorStyle),
57 myEdgeType (theEdgeLineType),
58 myEdgeWidth ((float )theEdgeLineWidth),
59 myHatchStyle (Aspect_HS_VERTICAL),
60 myToDistinguishMaterials (false),
61 myToDrawEdges (false),
62 myToSuppressBackFaces (true),
63 myToMapTexture (false)
65 if (theEdgeLineWidth <= 0.0)
67 Aspect_AspectFillAreaDefinitionError::Raise ("Bad value for EdgeLineWidth");