1 // VISU OBJECT : interactive object for VISU entities implementation
3 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
23 // File : VISU_PrsObject_i.hxx
24 // Author : Alexey PETROV
27 #ifndef VISU_GaussPoints_i_HeaderFile
28 #define VISU_GaussPoints_i_HeaderFile
30 #include "VISU_ColoredPrs3d_i.hh"
31 #include "VISU_GaussPtsActorFactory.h"
33 class VISU_LookupTable;
34 class VISU_ScalarBarActor;
36 class VISU_GaussPointsPL;
40 //! Class of the Gauss Points presentation.
41 class VISU_I_EXPORT GaussPoints_i : public virtual POA_VISU::GaussPoints,
42 public virtual TGaussPtsActorFactory,
43 public virtual ColoredPrs3d_i
45 static int myNbPresent;
46 GaussPoints_i(const GaussPoints_i&);
49 //----------------------------------------------------------------------------
50 typedef ColoredPrs3d_i TSuperClass;
51 typedef VISU::GaussPoints TInterface;
54 GaussPoints_i(EPublishInStudyMode thePublishInStudyModep);
63 return VISU::TGAUSSPOINTS;
66 //----------------------------------------------------------------------------
67 //! Gets memory size actually used by the presentation (Mb).
72 //----------------------------------------------------------------------------
77 SetFaceLimit( CORBA::Long theFaceLimit );
83 SetIsDeformed( CORBA::Boolean theIsDeformed );
89 SetScaleFactor( CORBA::Double theScaleFactor );
91 //! Get color for Geometry mode of the presentation.
98 //! Set color for Geometry mode of the presentation.
100 SetColor( const SALOMEDS::Color& theColor );
103 SetQColor( const QColor& theColor );
105 //! Get flag indicating which mode of the presentation is active.
106 /*! When Results mode is active, returns true. Geometry - false. */
110 //! Get flag indicating which mode of the presentation is active.
112 SetIsColored( bool theIsColored );
114 //! Set path to the image using for Main Point Sprite texture.
116 SetMainTexture( const QString& theMainTexture );
118 //! Get path to the image using for Main Point Sprite texture.
125 //! Set path to the image using for Alpha Point Sprite texture.
127 SetAlphaTexture( const QString& theAlphaTexture );
129 //! Get path to the image using for Alpha Point Sprite texture.
136 //! Convert Main and AlphaMask images to VTI format and set them to pipeline.
138 SetQTextures( const QString& theMainTexture,
139 const QString& theAlphaTexture );
142 SetTextures( const char* theMainTexture,
143 const char* theAlphaTexture );
145 //! Redirect the request to VISU_GaussPointsPL::SetAlphaThreshold.
147 SetAlphaThreshold(CORBA::Double theAlphaThreshold);
149 //! Redirect the request to VISU_GaussPointsPL::GetAlphaThreshold.
153 //! Redirect the request to VISU_GaussPointsPL::SetResolution.
155 SetResolution(CORBA::Long theResolution);
157 //! Redirect the request to VISU_GaussPointsPL::GetResolution.
162 SetPrimitiveType(VISU::GaussPoints::PrimitiveType thePrimitiveType);
164 VISU::GaussPoints::PrimitiveType
167 //! Redirect the request to VISU_GaussPointsPL::GetMaximumSupportedSize.
169 GetMaximumSupportedSize();
171 //! Redirect the request to VISU_GaussPointsPL::SetClamp.
173 SetClamp(CORBA::Double theClamp);
175 //! Redirect the request to VISU_GaussPointsPL::GetClamp.
179 //! Redirect the request to VISU_GaussPointsPL::SetSize.
181 SetGeomSize(CORBA::Double theGeomSize);
183 //! Redirect the request to VISU_GaussPointsPL::GetSize.
187 //! Redirect the request to VISU_GaussPointsPL::SetMinSize.
189 SetMinSize(CORBA::Double theMinSize);
191 //! Redirect the request to VISU_GaussPointsPL::GetMinSize.
195 //! Redirect the request to VISU_GaussPointsPL::SetMaxSize.
197 SetMaxSize(CORBA::Double theMaxSize);
199 //! Redirect the request to VISU_GaussPointsPL::GetMaxSize.
203 //! Redirect the request to VISU_GaussPointsPL::SetMagnification.
205 SetMagnification(CORBA::Double theMagnification);
207 //! Redirect the request to VISU_GaussPointsPL::GetMagnification.
211 //! Redirect the request to VISU_GaussPointsPL::SetMagnificationIncrement.
213 SetMagnificationIncrement(CORBA::Double theIncrement);
215 //! Redirect the request to VISU_GaussPointsPL::GetMagnificationIncrement.
217 GetMagnificationIncrement();
219 //! Set flag indicating which scalar bar is active.
221 SetIsActiveLocalScalarBar(CORBA::Boolean theIsActiveLocalScalarBar);
223 //! Get flag indicating which scalar bar is active.
225 GetIsActiveLocalScalarBar();
227 //! Set flag indicating visibility of global scalar bar.
229 SetIsDispGlobalScalarBar(CORBA::Boolean theIsDispGlobalScalarBar);
231 //! Get flag indicating visibility of global scalar bar.
233 GetIsDispGlobalScalarBar();
235 //! Redirect the request to VISU_GaussPointsPL::SetBicolor.
237 SetBiColor(CORBA::Boolean theIsBiColor);
239 //! Redirect the request to VISU_GaussPointsPL::GetBicolor.
243 //! Set value of the distance between global and local scalar bars.
245 SetSpacing(CORBA::Double theSpacing);
247 //! Get value of the distance between global and local scalar bars.
251 //! Let know is the global range is already calculated
253 IsGlobalRangeDefined() const;
268 GetSpecificPL() const
270 return myGaussPointsPL;
273 //----------------------------------------------------------------------------
274 //! Sets initial source geometry
279 //! Add geometry of mesh as group. \retval the id of added group.
282 AddMeshOnGroup(const char* theGroupName);
284 //! Removes all geometries.
290 //! Redefines VISU_ColoredPrs3d_i::DoSetInput
293 DoSetInput(bool theIsInitilizePipe, bool theReInit);
295 //! Redefines VISU_ColoredPrs3d_i::CreatePipeLine
298 CreatePipeLine(VISU_PipeLine* thePipeLine);
300 //! Redefines VISU_ColoredPrs3d_i::CheckIsPossible
314 OnCreateActor(VISU_GaussPtsAct* theActor);
323 UpdateScalarBar(VISU_ScalarBarActor *theScalarBar,
324 VISU_LookupTable* theLookupTable);
327 VISU_GaussPointsPL *myGaussPointsPL;
329 bool myIsDispGlobalScalarBar;
330 bool myIsActiveLocalScalarBar;
332 vtkFloatingPointType mySpacing;
335 QString myMainTexture;
336 QString myAlphaTexture;
341 IsPossible(Result_i* theResult,
342 const std::string& theMeshName,
343 VISU::Entity theEntity,
344 const std::string& theFieldName,
345 CORBA::Long theTimeStampNumber,
346 bool theIsMemoryCheck);
349 Create(const std::string& theMeshName,
350 VISU::Entity theEntity,
351 const std::string& theFieldName,
352 CORBA::Long theTimeStampNumber);
356 SameAs(const Prs3d_i* theOrigin);
358 static const std::string myComment;
370 ToStream(std::ostringstream& theStr);
374 Restore(SALOMEDS::SObject_ptr theSObject,
375 const Storable::TRestoringMap& theMap);
377 //----------------------------------------------------------------------------
384 CloneActor(VISU_GaussPtsAct1* theActor);
388 UpdateActor(VISU_Actor* theActor);
392 UpdateFromActor(VISU_GaussPtsAct* theActor);