0030682: Configuration, qmake - all warnings are suppressed on macOS target
[occt.git] / src / Prs3d / Prs3d_Presentation.cxx
CommitLineData
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.
b311480e 14
2831708b 15#include <Prs3d_Presentation.hxx>
7fd59977 16
42cf5bc1 17#include <Geom_Transformation.hxx>
7fd59977 18#include <gp_Ax1.hxx>
42cf5bc1 19#include <gp_Dir.hxx>
20#include <gp_Pnt.hxx>
7fd59977 21#include <gp_Trsf.hxx>
22#include <gp_Vec.hxx>
42cf5bc1 23#include <Graphic3d_DataStructureManager.hxx>
24#include <Graphic3d_Group.hxx>
25#include <Graphic3d_NameOfMaterial.hxx>
26#include <Graphic3d_Structure.hxx>
27#include <Graphic3d_StructureManager.hxx>
42cf5bc1 28#include <Prs3d_Root.hxx>
7fd59977 29#include <Standard_Real.hxx>
42cf5bc1 30#include <Standard_Type.hxx>
42cf5bc1 31
92efcf78 32IMPLEMENT_STANDARD_RTTIEXT(Prs3d_Presentation,Graphic3d_Structure)
33
7fd59977 34//=======================================================================
35//function : Prs3d_Presentation
679ecdee 36//purpose :
7fd59977 37//=======================================================================
679ecdee 38Prs3d_Presentation::Prs3d_Presentation (const Handle(Graphic3d_StructureManager)& theViewer,
39 const Standard_Boolean theToInit)
40: Graphic3d_Structure (theViewer)
7fd59977 41{
679ecdee 42 if (!theToInit)
43 {
44 return;
7fd59977 45 }
679ecdee 46}
47
48//=======================================================================
49//function : Prs3d_Presentation
50//purpose :
51//=======================================================================
52Prs3d_Presentation::Prs3d_Presentation (const Handle(Graphic3d_StructureManager)& theViewer,
53 const Handle(Prs3d_Presentation)& thePrs)
54: Graphic3d_Structure (theViewer, thePrs)
55{
2831708b 56 //
7fd59977 57}
58
7fd59977 59
7fd59977 60//=======================================================================
61//function : Connect
62//purpose :
63//=======================================================================
64void Prs3d_Presentation::Connect
65 ( const Handle(Prs3d_Presentation)& aPresentation)
66{
67 Graphic3d_Structure::Connect(aPresentation, Graphic3d_TOC_DESCENDANT);
68}
69
70
71//=======================================================================
72//function : Remove
73//purpose :
74//=======================================================================
75void Prs3d_Presentation::Remove (const Handle(Prs3d_Presentation)& aPresentation)
76{
77 Disconnect(aPresentation);
78}
79
80//=======================================================================
81//function : RemoveAll
82//purpose :
83//=======================================================================
84void Prs3d_Presentation::RemoveAll ()
85{
86 DisconnectAll(Graphic3d_TOC_DESCENDANT);
87}
88
89
90//=======================================================================
91//function : CurrentGroup
92//purpose :
93//=======================================================================
94Handle(Graphic3d_Group) Prs3d_Presentation::CurrentGroup () const
95{
b64d84be 96 if (Groups().IsEmpty())
97 {
98 return const_cast<Prs3d_Presentation* >(this)->NewGroup();
7fd59977 99 }
b64d84be 100 return Groups().Last();
7fd59977 101}
102
7fd59977 103//=======================================================================
104//function : Compute
105//purpose :
106//=======================================================================
107
108Handle(Graphic3d_Structure) Prs3d_Presentation::
109 Compute(const Handle(Graphic3d_DataStructureManager)& /*aProjector*/)
110{
111 return this;
112}
113
114//=======================================================================
115//function : Compute
116//purpose :
117//=======================================================================
118
857ffd5e 119void Prs3d_Presentation::Compute(const Handle(Graphic3d_DataStructureManager)& aDataStruct,
120 Handle(Graphic3d_Structure)& aStruct)
7fd59977 121{
122 Graphic3d_Structure::Compute(aDataStruct,aStruct );
123}
124
125//=======================================================================
126//function : Compute
1f7f5a90 127//purpose :
7fd59977 128//=======================================================================
129
1f7f5a90 130Handle(Graphic3d_Structure) Prs3d_Presentation::Compute (const Handle(Graphic3d_DataStructureManager)& theDataStruc,
131 const Handle(Geom_Transformation)& theTrsf)
7fd59977 132{
1f7f5a90 133 return Graphic3d_Structure::Compute (theDataStruc, theTrsf);
7fd59977 134}
135
136//=======================================================================
137//function : Compute
1f7f5a90 138//purpose :
7fd59977 139//=======================================================================
140
1f7f5a90 141void Prs3d_Presentation::Compute (const Handle(Graphic3d_DataStructureManager)& theDataStruc,
142 const Handle(Geom_Transformation)& theTrsf,
143 Handle(Graphic3d_Structure)& theStruc)
7fd59977 144{
1f7f5a90 145 Graphic3d_Structure::Compute (theDataStruc, theTrsf, theStruc);
7fd59977 146}