b311480e |
1 | // Copyright (c) 1995-1999 Matra Datavision |
973c2be1 |
2 | // Copyright (c) 1999-2014 OPEN CASCADE SAS |
b311480e |
3 | // |
973c2be1 |
4 | // This file is part of Open CASCADE Technology software library. |
b311480e |
5 | // |
d5f74e42 |
6 | // This library is free software; you can redistribute it and/or modify it under |
7 | // the terms of the GNU Lesser General Public License version 2.1 as published |
973c2be1 |
8 | // by the Free Software Foundation, with special exception defined in the file |
9 | // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
10 | // distribution for complete text of the license and disclaimer of any warranty. |
b311480e |
11 | // |
973c2be1 |
12 | // Alternatively, this file may be used under the terms of Open CASCADE |
13 | // commercial license or contractual agreement. |
7fd59977 |
14 | |
15 | #include <Graphic3d_CStructure.hxx> |
16 | |
63bcc448 |
17 | #include <Graphic3d_StructureManager.hxx> |
016e5959 |
18 | #include <Graphic3d_GraphicDriver.hxx> |
bc73b006 |
19 | #include <Standard_Dump.hxx> |
63bcc448 |
20 | |
92efcf78 |
21 | IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_CStructure,Standard_Transient) |
22 | |
63bcc448 |
23 | //============================================================================= |
24 | //function : Graphic3d_CStructure |
25 | //purpose : |
26 | //============================================================================= |
27 | Graphic3d_CStructure::Graphic3d_CStructure (const Handle(Graphic3d_StructureManager)& theManager) |
e463b2f6 |
28 | : myGraphicDriver (theManager->GraphicDriver()), |
29 | myId (-1), |
4e993e4d |
30 | myZLayer (Graphic3d_ZLayerId_Default), |
e463b2f6 |
31 | myPriority (Graphic3d_DisplayPriority_Normal), |
32 | myPreviousPriority(Graphic3d_DisplayPriority_Normal), |
4e993e4d |
33 | myIsCulled (Standard_True), |
34 | myBndBoxClipCheck(Standard_True), |
35 | myHasGroupTrsf (Standard_False), |
36 | // |
63bcc448 |
37 | IsInfinite (0), |
38 | stick (0), |
39 | highlight (0), |
40 | visible (1), |
63bcc448 |
41 | HLRValidation (0), |
b7cd4ba7 |
42 | IsForHighlight (Standard_False), |
43 | IsMutable (Standard_False), |
4e993e4d |
44 | Is2dText (Standard_False) |
7fd59977 |
45 | { |
e463b2f6 |
46 | myId = myGraphicDriver->NewIdentification(); |
7fd59977 |
47 | } |
bc73b006 |
48 | |
49 | //======================================================================= |
50 | //function : DumpJson |
51 | //purpose : |
52 | //======================================================================= |
53 | void Graphic3d_CStructure::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const |
54 | { |
55 | OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream) |
56 | |
57 | for (Graphic3d_SequenceOfGroup::Iterator anIterator (myGroups); anIterator.More(); anIterator.Next()) |
58 | { |
59 | const Handle(Graphic3d_Group)& aGroup = anIterator.Value(); |
60 | OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, aGroup.get()) |
61 | } |
62 | |
e463b2f6 |
63 | OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myId) |
bc73b006 |
64 | OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myZLayer) |
e463b2f6 |
65 | OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myPriority) |
66 | OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myPreviousPriority) |
bc73b006 |
67 | |
68 | OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, IsInfinite) |
69 | OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, stick) |
70 | OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, highlight) |
71 | OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, visible) |
72 | |
73 | OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, HLRValidation) |
74 | OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, IsForHighlight) |
75 | OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, IsMutable) |
76 | OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Is2dText) |
77 | |
78 | OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myBndBox) |
79 | |
80 | OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myTrsf.get()) |
81 | OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myTrsfPers.get()) |
82 | OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myClipPlanes.get()) |
83 | OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myHighlightStyle.get()) |
84 | |
85 | OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsCulled) |
86 | OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myBndBoxClipCheck) |
87 | } |