27 #ifndef GEOM_DISPLAYER_H
28 #define GEOM_DISPLAYER_H
33 #include <SALOME_InteractiveObject.hxx>
42 class SALOME_OCCViewType;
44 #include <TopoDS_Shape.hxx>
45 #include <Quantity_Color.hxx>
46 #include <LightApp_Displayer.h>
47 #include <LightApp_Study.h>
48 #include <Aspect_TypeOfMarker.hxx>
49 #include <TCollection_AsciiString.hxx>
50 #include <TColStd_MapOfInteger.hxx>
55 #include <SALOMEconfig.h>
56 #include CORBA_CLIENT_HEADER(GEOM_Gen)
58 #define GEOM_ALLOBJECTS -1
59 #define GEOM_PREVIEW -2
60 #define GEOM_ALLSHAPES -3
61 #define GEOM_ALLGEOM -4
65 class LightApp_SelectionMgr;
66 class SalomeApp_Study;
67 class SalomeApp_Application;
80 virtual bool canBeDisplayed(
const QString& ,
const QString& )
const;
84 const bool updateViewer =
true,
85 SALOME_View* theViewFrame = 0 );
89 void Display ( GEOM::GEOM_BaseObject_ptr theObj,
90 const bool updateViewer =
true );
93 const bool updateViewer =
true,
94 const bool checkActiveViewer =
true );
97 const bool theUpdateViewer,
98 SALOME_View* theViewFrame );
101 const bool forced =
false,
102 const bool updateViewer =
true,
103 SALOME_View* theViewFrame = 0 );
105 void Erase ( GEOM::GEOM_BaseObject_ptr theObj,
106 const bool forced =
false,
107 const bool updateViewer =
true,
108 SALOME_View* theViewFrame = 0);
111 const bool eraseOnlyChildren =
false);
115 void Display (
const SALOME_ListIO& theIOList,
116 const bool updateViewer =
true );
118 void Erase (
const SALOME_ListIO& theIOList,
119 const bool forced =
false,
120 const bool updateViewer =
true );
122 void Redisplay (
const SALOME_ListIO& theIOList,
123 const bool updateViewer =
true,
124 const bool checkActiveViewer =
true );
126 void Redisplay (
const SALOME_ListIO& theIOList,
127 const bool theUpdateViewer,
128 SALOME_View* theViewFrame );
131 void UpdateVisibility( SALOME_View*,
const SALOME_Prs*,
bool );
134 SALOME_Prs* BuildPrs ( GEOM::GEOM_Object_ptr );
135 SALOME_Prs* BuildPrs (
const TopoDS_Shape& );
139 void SetColor (
const int );
141 int GetColor ()
const;
142 bool HasColor ()
const;
144 double SetTransparency (
const double );
145 double UnsetTransparency();
146 double GetTransparency ()
const;
147 bool HasTransparency ()
const;
150 void SetTexture (
const std::string& );
151 bool HasTexture ()
const;
152 std::string GetTexture ()
const;
155 void SetWidth (
const double );
157 double GetWidth ()
const;
158 bool HasWidth ()
const;
161 void SetIsosWidth (
const int );
162 int GetIsosWidth ()
const;
163 bool HasIsosWidth ()
const;
166 int SetNbIsos(
const int );
168 int GetNbIsos()
const;
169 bool HasNbIsos()
const;
173 int SetIsosColor (
const int );
174 int UnsetIsosColor();
175 int GetIsosColor ()
const;
176 bool HasIsosColor ()
const;
179 int SetDisplayMode(
const int );
180 int GetDisplayMode()
const;
181 int UnsetDisplayMode();
182 bool HasDisplayMode()
const;
185 void SetName(
const char* theName );
189 virtual void Update( SALOME_OCCPrs* );
190 virtual void Update( SALOME_VTKPrs* );
191 virtual void Update( SALOME_PV3DPrs* );
192 virtual void BeforeDisplay( SALOME_View*,
const SALOME_OCCPrs* );
193 virtual void AfterDisplay ( SALOME_View*,
const SALOME_OCCPrs* );
194 virtual void BeforeErase ( SALOME_View*,
const SALOME_OCCPrs* );
195 virtual void AfterErase ( SALOME_View*,
const SALOME_OCCPrs* );
198 void SetToActivate(
const bool );
199 bool ToActivate()
const;
204 void LocalSelection(
const SALOME_ListIO& theIOList,
const std::list<int> );
205 void LocalSelection(
const SALOME_ListIO& theIOList,
const int );
206 void GlobalSelection(
const int =
GEOM_ALLOBJECTS,
const bool =
false );
207 void GlobalSelection(
const TColStd_MapOfInteger&,
const bool =
false,
const QList<int>* = 0 );
209 SalomeApp_Study* getStudy()
const;
211 static SALOMEDS::Color getUniqueColor(
const QList<SALOMEDS::Color>& );
215 static SALOMEDS::Color getColor(GEOM::GEOM_Object_var aGeomObject,
bool& hasColor);
221 static bool isCompoundOfVertices(
const TopoDS_Shape& theShape );
225 virtual SALOME_Prs* buildSubshapePresentation(
const TopoDS_Shape& aShape,
230 void UpdateColorScale();
231 bool SetUpdateColorScale(
bool);
236 virtual SALOME_Prs* buildPresentation(
const QString&, SALOME_View* = 0 );
242 void setShape(
const TopoDS_Shape& theShape );
246 const int theFieldDimension,
247 const QList<QVariant>& theFieldStepData,
248 const TCollection_AsciiString& theFieldStepName,
249 const double theFieldStepRangeMin,
250 const double theFieldStepRangeMax );
253 void internalReset();
255 void clearTemporary( LightApp_SelectionMgr* theSelMgr );
260 Quantity_Color qColorFromResources(
const QString&,
const QColor& );
261 QColor colorFromResources(
const QString&,
const QColor& );
263 void updateActorProperties(
GEOM_Actor*,
bool );
267 PropMap getObjectProperties(
const QString&, SALOME_View* = 0 );
268 PropMap getDefaultPropertyMap();
271 void readFieldStepInfo( GEOM::GEOM_FieldStep_var theGeomFieldStep );
272 QList<QVariant> groupFieldData(
const QList<QVariant>& theFieldStepData,
273 const int theFieldNbComponents,
274 const bool theIsString,
275 double& theFieldStepRangeMin,
276 double& theFieldStepRangeMax );
Handle(TColStd_HSequenceOfTransient) AdvancedEngine_IOperations
Create a T-shape object with specified caracteristics for the main and the incident pipes (radius,...
Definition: AdvancedEngine_IOperations.cxx:1907
std::list< GEOM::GEOM_Object_ptr > ObjectList
Definition: GEOM_Displayer.h:63
#define GEOM_ALLOBJECTS
Definition: GEOM_Displayer.h:58
#define GEOMGUI_EXPORT
Definition: GEOM_GEOMGUI.hxx:36
static GEOM::shape_type getMinMaxShapeType(const TopoDS_Shape &shape, bool ismin)
Definition: GEOM_Object_i.cc:118
....
Definition: GEOM_AISShape.hxx:44
This class allows to display an OpenCASCADE CAD model in a VTK viewer.
Definition: GEOM_Actor.h:60
Definition: GEOM_Displayer.h:72
double myFieldStepRangeMax
Definition: GEOM_Displayer.h:286
int myType
Definition: GEOM_Displayer.h:290
int myNbIsos
Definition: GEOM_Displayer.h:299
double myFieldStepRangeMin
Definition: GEOM_Displayer.h:285
int myIsosColor
Definition: GEOM_Displayer.h:300
SALOME_View * myViewFrame
Definition: GEOM_Displayer.h:291
double myTransparency
Definition: GEOM_Displayer.h:306
void updateShapeAnnotations(const Handle(SALOME_InteractiveObject)&, SALOME_OCCPrs *, const gp_Ax3 &)
int myDisplayMode
Definition: GEOM_Displayer.h:302
SalomeApp_Application * myApp
Definition: GEOM_Displayer.h:310
int myColor
Definition: GEOM_Displayer.h:296
double myScaleOfMarker
Definition: GEOM_Displayer.h:305
bool myUpdateColorScale
Definition: GEOM_Displayer.h:292
std::string myNameInObjBrowser
Definition: GEOM_Displayer.h:287
GEOM::field_data_type myFieldDataType
Definition: GEOM_Displayer.h:281
double myWidth
Definition: GEOM_Displayer.h:297
TCollection_AsciiString myFieldStepName
Definition: GEOM_Displayer.h:284
bool myHasDisplayMode
Definition: GEOM_Displayer.h:303
std::string myName
Definition: GEOM_Displayer.h:288
QList< QVariant > myFieldStepData
Definition: GEOM_Displayer.h:283
Aspect_TypeOfMarker myTypeOfMarker
Definition: GEOM_Displayer.h:304
int myFieldDimension
Definition: GEOM_Displayer.h:282
TopoDS_Shape myShape
Definition: GEOM_Displayer.h:280
int myIsosWidth
Definition: GEOM_Displayer.h:298
std::string myTexture
Definition: GEOM_Displayer.h:289
Handle(SALOME_InteractiveObject) myIO
bool myToActivate
Definition: GEOM_Displayer.h:301
bool myIsRedisplayed
Definition: GEOM_Displayer.h:307
Quantity_Color myShadingColor
Definition: GEOM_Displayer.h:295
Definition: libGEOM_Swig.h:35
@ Color
Definition: GEOM_Constants.h:40
field_data_type
Type of field data.
Definition: GEOM_Gen.idl:191