b6472664 |
1 | // Copyright (c) 2016 OPEN CASCADE SAS |
b311480e |
2 | // |
973c2be1 |
3 | // This file is part of Open CASCADE Technology software library. |
b311480e |
4 | // |
d5f74e42 |
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 |
973c2be1 |
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. |
b311480e |
10 | // |
973c2be1 |
11 | // Alternatively, this file may be used under the terms of Open CASCADE |
12 | // commercial license or contractual agreement. |
7fd59977 |
13 | |
b6472664 |
14 | #ifndef _Graphic3d_PolygonOffset_HeaderFile |
15 | #define _Graphic3d_PolygonOffset_HeaderFile |
7fd59977 |
16 | |
b6472664 |
17 | #include <Aspect_PolygonOffsetMode.hxx> |
0904aa63 |
18 | #include <Standard_OStream.hxx> |
b1970c8a |
19 | #include <Standard_Integer.hxx> |
7fd59977 |
20 | |
b6472664 |
21 | //! Polygon offset parameters. |
22 | struct Graphic3d_PolygonOffset |
b64d84be |
23 | { |
b6472664 |
24 | Aspect_PolygonOffsetMode Mode; |
25 | Standard_ShortReal Factor; |
26 | Standard_ShortReal Units; |
7fd59977 |
27 | |
b6472664 |
28 | //! Empty constructor. |
8fd45ae7 |
29 | Graphic3d_PolygonOffset() : Mode(Aspect_POM_Fill), Factor (1.0f), Units (1.0f) {} |
bf5f0ca2 |
30 | |
31 | //! Equality comparison. |
32 | bool operator== (const Graphic3d_PolygonOffset& theOther) const |
33 | { |
34 | return Mode == theOther.Mode |
35 | && Factor == theOther.Factor |
36 | && Units == theOther.Units; |
37 | } |
0904aa63 |
38 | |
39 | //! Dumps the content of me into the stream |
bc73b006 |
40 | Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const; |
0904aa63 |
41 | |
b64d84be |
42 | }; |
7fd59977 |
43 | |
b6472664 |
44 | #endif // _Graphic3d_PolygonOffset_HeaderFile |