0031687: Draw Harness, ViewerTest - extend command vrenderparams with option updating...
[occt.git] / src / HLRBRep / HLRBRep_InternalAlgo.hxx
CommitLineData
42cf5bc1 1// Created on: 1997-04-17
2// Created by: Christophe MARION
3// Copyright (c) 1997-1999 Matra Datavision
4// Copyright (c) 1999-2014 OPEN CASCADE SAS
5//
6// This file is part of Open CASCADE Technology software library.
7//
8// This library is free software; you can redistribute it and/or modify it under
9// the terms of the GNU Lesser General Public License version 2.1 as published
10// by the Free Software Foundation, with special exception defined in the file
11// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12// distribution for complete text of the license and disclaimer of any warranty.
13//
14// Alternatively, this file may be used under the terms of Open CASCADE
15// commercial license or contractual agreement.
16
17#ifndef _HLRBRep_InternalAlgo_HeaderFile
18#define _HLRBRep_InternalAlgo_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_Type.hxx>
22
23#include <HLRAlgo_Projector.hxx>
24#include <HLRBRep_SeqOfShapeBounds.hxx>
25#include <BRepTopAdaptor_MapOfShapeTool.hxx>
26#include <Standard_Boolean.hxx>
25e59720 27#include <Standard_Transient.hxx>
42cf5bc1 28#include <Standard_Integer.hxx>
29class HLRBRep_Data;
30class Standard_OutOfRange;
31class HLRAlgo_Projector;
32class HLRTopoBRep_OutLiner;
42cf5bc1 33class HLRBRep_ShapeBounds;
34
35
36class HLRBRep_InternalAlgo;
25e59720 37DEFINE_STANDARD_HANDLE(HLRBRep_InternalAlgo, Standard_Transient)
42cf5bc1 38
39
25e59720 40class HLRBRep_InternalAlgo : public Standard_Transient
42cf5bc1 41{
42
43public:
44
45
46 Standard_EXPORT HLRBRep_InternalAlgo();
47
48 Standard_EXPORT HLRBRep_InternalAlgo(const Handle(HLRBRep_InternalAlgo)& A);
49
50 //! set the projector.
51 Standard_EXPORT void Projector (const HLRAlgo_Projector& P);
52
53 //! set the projector.
54 Standard_EXPORT HLRAlgo_Projector& Projector();
55
56 //! update the DataStructure.
57 Standard_EXPORT void Update();
58
59 //! add the shape <S>.
25e59720 60 Standard_EXPORT void Load (const Handle(HLRTopoBRep_OutLiner)& S, const Handle(Standard_Transient)& SData, const Standard_Integer nbIso = 0);
42cf5bc1 61
62 //! add the shape <S>.
63 Standard_EXPORT void Load (const Handle(HLRTopoBRep_OutLiner)& S, const Standard_Integer nbIso = 0);
64
65 //! return the index of the Shape <S> and return 0 if
66 //! the Shape <S> is not found.
67 Standard_EXPORT Standard_Integer Index (const Handle(HLRTopoBRep_OutLiner)& S) const;
68
69 //! remove the Shape of Index <I>.
70 Standard_EXPORT void Remove (const Standard_Integer I);
71
72 //! Change the Shape Data of the Shape of index <I>.
25e59720 73 Standard_EXPORT void ShapeData (const Standard_Integer I, const Handle(Standard_Transient)& SData);
42cf5bc1 74
75 Standard_EXPORT HLRBRep_SeqOfShapeBounds& SeqOfShapeBounds();
76
77 Standard_EXPORT Standard_Integer NbShapes() const;
78
79 Standard_EXPORT HLRBRep_ShapeBounds& ShapeBounds (const Standard_Integer I);
80
81 //! init the status of the selected edges depending of
82 //! the back faces of a closed shell.
83 Standard_EXPORT void InitEdgeStatus();
84
85 //! select all the DataStructure.
86 Standard_EXPORT void Select();
87
88 //! select only the Shape of index <I>.
89 Standard_EXPORT void Select (const Standard_Integer I);
90
91 //! select only the edges of the Shape <S>.
92 Standard_EXPORT void SelectEdge (const Standard_Integer I);
93
94 //! select only the faces of the Shape <S>.
95 Standard_EXPORT void SelectFace (const Standard_Integer I);
96
97 //! set to visible all the edges.
98 Standard_EXPORT void ShowAll();
99
100 //! set to visible all the edges of the Shape <S>.
101 Standard_EXPORT void ShowAll (const Standard_Integer I);
102
103 //! set to hide all the edges.
104 Standard_EXPORT void HideAll();
105
106 //! set to hide all the edges of the Shape <S>.
107 Standard_EXPORT void HideAll (const Standard_Integer I);
108
109 //! own hiding of all the shapes of the DataStructure
110 //! without hiding by each other.
111 Standard_EXPORT void PartialHide();
112
113 //! hide all the DataStructure.
114 Standard_EXPORT void Hide();
115
116 //! hide the Shape <S> by itself.
117 Standard_EXPORT void Hide (const Standard_Integer I);
118
119 //! hide the Shape <S1> by the shape <S2>.
120 Standard_EXPORT void Hide (const Standard_Integer I, const Standard_Integer J);
121
122 Standard_EXPORT void Debug (const Standard_Boolean deb);
123
124 Standard_EXPORT Standard_Boolean Debug() const;
125
126 Standard_EXPORT Handle(HLRBRep_Data) DataStructure() const;
127
128
129
130
25e59720 131 DEFINE_STANDARD_RTTIEXT(HLRBRep_InternalAlgo,Standard_Transient)
42cf5bc1 132
133protected:
134
135
136
137
138private:
139
140
141 //! first if <SideFace> own hiding of the side faces.
142 //! After hiding of the selected parts of the
143 //! DataStructure.
144 Standard_EXPORT void HideSelected (const Standard_Integer I, const Standard_Boolean SideFace);
145
146 Handle(HLRBRep_Data) myDS;
147 HLRAlgo_Projector myProj;
148 HLRBRep_SeqOfShapeBounds myShapes;
149 BRepTopAdaptor_MapOfShapeTool myMapOfShapeTool;
150 Standard_Boolean myDebug;
151
152
153};
154
155
156
157
158
159
160
161#endif // _HLRBRep_InternalAlgo_HeaderFile