0033661: Data Exchange, Step Import - Tessellated GDTs are not imported
[occt.git] / src / Graphic3d / Graphic3d_CStructure.cxx
... / ...
CommitLineData
1// Copyright (c) 1995-1999 Matra Datavision
2// Copyright (c) 1999-2014 OPEN CASCADE SAS
3//
4// This file is part of Open CASCADE Technology software library.
5//
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
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.
11//
12// Alternatively, this file may be used under the terms of Open CASCADE
13// commercial license or contractual agreement.
14
15#include <Graphic3d_CStructure.hxx>
16
17#include <Graphic3d_StructureManager.hxx>
18#include <Graphic3d_GraphicDriver.hxx>
19#include <Standard_Dump.hxx>
20
21IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_CStructure,Standard_Transient)
22
23//=============================================================================
24//function : Graphic3d_CStructure
25//purpose :
26//=============================================================================
27Graphic3d_CStructure::Graphic3d_CStructure (const Handle(Graphic3d_StructureManager)& theManager)
28: myGraphicDriver (theManager->GraphicDriver()),
29 myId (-1),
30 myZLayer (Graphic3d_ZLayerId_Default),
31 myPriority (Graphic3d_DisplayPriority_Normal),
32 myPreviousPriority(Graphic3d_DisplayPriority_Normal),
33 myIsCulled (Standard_True),
34 myBndBoxClipCheck(Standard_True),
35 myHasGroupTrsf (Standard_False),
36 //
37 IsInfinite (0),
38 stick (0),
39 highlight (0),
40 visible (1),
41 HLRValidation (0),
42 IsForHighlight (Standard_False),
43 IsMutable (Standard_False),
44 Is2dText (Standard_False)
45{
46 myId = myGraphicDriver->NewIdentification();
47}
48
49//=======================================================================
50//function : DumpJson
51//purpose :
52//=======================================================================
53void 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
63 OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myId)
64 OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myZLayer)
65 OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myPriority)
66 OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myPreviousPriority)
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}