b311480e |
1 | // Created by: NW,JPB,CAL |
2 | // Copyright (c) 1991-1999 Matra Datavision |
973c2be1 |
3 | // Copyright (c) 1999-2014 OPEN CASCADE SAS |
b311480e |
4 | // |
973c2be1 |
5 | // This file is part of Open CASCADE Technology software library. |
b311480e |
6 | // |
d5f74e42 |
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 |
973c2be1 |
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. |
b311480e |
12 | // |
973c2be1 |
13 | // Alternatively, this file may be used under the terms of Open CASCADE |
14 | // commercial license or contractual agreement. |
b311480e |
15 | |
42cf5bc1 |
16 | #include <Graphic3d_AspectFillArea3d.hxx> |
7fd59977 |
17 | |
b6472664 |
18 | IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_AspectFillArea3d, Standard_Transient) |
19 | |
20 | // ======================================================================= |
21 | // function : Graphic3d_AspectFillArea3d |
22 | // purpose : |
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), |
30 | myEdgeWidth (1.0f), |
640d5fe2 |
31 | myHatchStyle (Handle(Graphic3d_HatchStyle)()), |
b6472664 |
32 | myToDistinguishMaterials (false), |
33 | myToDrawEdges (false), |
34 | myToSuppressBackFaces (true), |
35 | myToMapTexture (false) |
63bcc448 |
36 | { |
b6472664 |
37 | // |
38 | } |
39 | |
40 | // ======================================================================= |
41 | // function : Graphic3d_AspectFillArea3d |
42 | // purpose : |
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), |
640d5fe2 |
59 | myHatchStyle (Handle(Graphic3d_HatchStyle)()), |
b6472664 |
60 | myToDistinguishMaterials (false), |
61 | myToDrawEdges (false), |
62 | myToSuppressBackFaces (true), |
63 | myToMapTexture (false) |
30f0ad28 |
64 | { |
b6472664 |
65 | if (theEdgeLineWidth <= 0.0) |
66 | { |
67 | Aspect_AspectFillAreaDefinitionError::Raise ("Bad value for EdgeLineWidth"); |
68 | } |
30f0ad28 |
69 | } |