Version: 6.3.1

src/VISU_I/VISU_GaussPoints_i.hh

Go to the documentation of this file.
00001 // Copyright (C) 2007-2011  CEA/DEN, EDF R&D, OPEN CASCADE
00002 //
00003 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
00004 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
00005 //
00006 // This library is free software; you can redistribute it and/or
00007 // modify it under the terms of the GNU Lesser General Public
00008 // License as published by the Free Software Foundation; either
00009 // version 2.1 of the License.
00010 //
00011 // This library is distributed in the hope that it will be useful,
00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014 // Lesser General Public License for more details.
00015 //
00016 // You should have received a copy of the GNU Lesser General Public
00017 // License along with this library; if not, write to the Free Software
00018 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00019 //
00020 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00021 //
00022 
00023 //  VISU OBJECT : interactive object for VISU entities implementation
00024 //  File   : VISU_PrsObject_i.hxx
00025 //  Author : Alexey PETROV
00026 //  Module : VISU
00027 //
00028 #ifndef VISU_GaussPoints_i_HeaderFile
00029 #define VISU_GaussPoints_i_HeaderFile
00030 
00031 #include "VISU_ColoredPrs3d_i.hh"
00032 #include "VISU_GaussPtsActorFactory.h"
00033 
00034 class VISU_LookupTable;
00035 class VISU_ScalarBarActor;
00036 
00037 class VISU_GaussPointsPL;
00038 
00039 #include <QColor>
00040 
00041 namespace VISU
00042 {
00044   class VISU_I_EXPORT GaussPoints_i : public virtual POA_VISU::GaussPoints,
00045                           public virtual TGaussPtsActorFactory,
00046                           public virtual ColoredPrs3d_i
00047   {
00048     static int myNbPresent;
00049     GaussPoints_i(const GaussPoints_i&);
00050 
00051   public:
00052     //----------------------------------------------------------------------------
00053     typedef ColoredPrs3d_i TSuperClass;
00054     typedef VISU::GaussPoints TInterface;
00055 
00056     explicit
00057     GaussPoints_i(EPublishInStudyMode thePublishInStudyModep);
00058 
00059     virtual
00060     ~GaussPoints_i();
00061 
00062     virtual 
00063     VISU::VISUType 
00064     GetType() 
00065     {
00066       return VISU::TGAUSSPOINTS;
00067     }
00068 
00069     //----------------------------------------------------------------------------
00071     virtual
00072     CORBA::Float
00073     GetMemorySize();
00074 
00075     //----------------------------------------------------------------------------
00076     CORBA::Long
00077     GetFaceLimit();
00078 
00079     void
00080     SetFaceLimit( CORBA::Long theFaceLimit );
00081 
00082     CORBA::Boolean 
00083     GetIsDeformed();
00084 
00085     void
00086     SetIsDeformed( CORBA::Boolean theIsDeformed );
00087 
00088     CORBA::Double
00089     GetScaleFactor();
00090 
00091     void
00092     SetScaleFactor( CORBA::Double theScaleFactor );
00093 
00095     SALOMEDS::Color
00096     GetColor();
00097 
00098     QColor
00099     GetQColor();
00100 
00102     void
00103     SetColor( const SALOMEDS::Color& theColor );
00104 
00105     void
00106     SetQColor( const QColor& theColor );
00107 
00109 
00110     bool 
00111     GetIsColored();
00112 
00114     void
00115     SetIsColored( bool theIsColored );
00116 
00118     bool
00119     SetMainTexture( const QString& theMainTexture );
00120 
00122     QString
00123     GetQMainTexture();
00124     
00125     char*
00126     GetMainTexture();
00127 
00129     bool
00130     SetAlphaTexture( const QString& theAlphaTexture );
00131 
00133     QString
00134     GetQAlphaTexture();
00135 
00136     char*
00137     GetAlphaTexture();
00138 
00140     void
00141     SetQTextures( const QString& theMainTexture,
00142             const QString& theAlphaTexture );
00143 
00144     void
00145     SetTextures( const char* theMainTexture, 
00146            const char* theAlphaTexture );
00147 
00149     void
00150     SetAlphaThreshold(CORBA::Double theAlphaThreshold);
00151 
00153     CORBA::Double
00154     GetAlphaThreshold();
00155 
00157     void
00158     SetResolution(CORBA::Long theResolution);
00159 
00161     CORBA::Long
00162     GetResolution();
00163 
00164     void
00165     SetPrimitiveType(VISU::GaussPoints::PrimitiveType thePrimitiveType);
00166 
00167     VISU::GaussPoints::PrimitiveType
00168     GetPrimitiveType();
00169 
00171     vtkFloatingPointType 
00172     GetMaximumSupportedSize();
00173 
00175     void
00176     SetClamp(CORBA::Double theClamp);
00177 
00179     CORBA::Double
00180     GetClamp();
00181 
00183     void
00184     SetGeomSize(CORBA::Double theGeomSize);
00185 
00187     CORBA::Double 
00188     GetGeomSize();
00189 
00191     void
00192     SetMinSize(CORBA::Double theMinSize);
00193 
00195     CORBA::Double 
00196     GetMinSize();
00197 
00199     void
00200     SetMaxSize(CORBA::Double theMaxSize);
00201 
00203     CORBA::Double 
00204     GetMaxSize();
00205 
00207     void
00208     SetMagnification(CORBA::Double theMagnification);
00209 
00211     CORBA::Double
00212     GetMagnification();
00213 
00215     void
00216     SetMagnificationIncrement(CORBA::Double theIncrement);
00217 
00219     CORBA::Double
00220     GetMagnificationIncrement();
00221 
00223     void
00224     SetIsActiveLocalScalarBar(CORBA::Boolean theIsActiveLocalScalarBar);
00225 
00227     CORBA::Boolean
00228     GetIsActiveLocalScalarBar();
00229 
00231     void
00232     SetIsDispGlobalScalarBar(CORBA::Boolean theIsDispGlobalScalarBar);
00233 
00235     CORBA::Boolean
00236     GetIsDispGlobalScalarBar();
00237 
00239     void
00240     SetBiColor(CORBA::Boolean theIsBiColor);
00241 
00243     CORBA::Boolean
00244     GetBiColor();
00245 
00247     void
00248     SetSpacing(CORBA::Double theSpacing);
00249 
00251     CORBA::Double
00252     GetSpacing();
00253 
00255     bool
00256     IsGlobalRangeDefined() const;
00257 
00258     virtual
00259     CORBA::Double 
00260     GetSourceMin();
00261 
00262     virtual
00263     CORBA::Double 
00264     GetSourceMax();
00265 
00266     virtual 
00267     void
00268     SetSourceRange();
00269 
00270     VISU_GaussPointsPL* 
00271     GetSpecificPL() const
00272     { 
00273       return myGaussPointsPL; 
00274     }
00275     
00276     virtual CORBA::Boolean IsBarVisible() { return myShowBar; }
00277        
00278     virtual void SetBarVisible(CORBA::Boolean theVisible);
00279 
00280     //----------------------------------------------------------------------------
00282     virtual
00283     void
00284     SetSourceGeometry();
00285 
00287     virtual 
00288     void
00289     AddMeshOnGroup(const char* theGroupName);
00290     
00292     virtual
00293     void
00294     RemoveAllGeom();
00295 
00296     virtual
00297     vtkFloatingPointType
00298     GetComponentMin(vtkIdType theCompID);
00299 
00300     virtual
00301     vtkFloatingPointType
00302     GetComponentMax(vtkIdType theCompID);
00303     
00304   protected:
00306     virtual
00307     void
00308     DoSetInput(bool theIsInitilizePipe, bool theReInit);
00309 
00311     virtual
00312     void
00313     CreatePipeLine(VISU_PipeLine* thePipeLine);
00314 
00316     virtual 
00317     bool 
00318     CheckIsPossible();
00319 
00320     virtual 
00321     const char* 
00322     GetIconName();
00323 
00324     virtual 
00325     VISU_PipeLine* 
00326     GetActorPipeLine();
00327     
00328     bool
00329     OnCreateActor(VISU_GaussPtsAct* theActor);
00330 
00331     VISU_GaussPtsAct1* 
00332     OnCreateActor1();
00333 
00334     VISU_GaussPtsAct2* 
00335     OnCreateActor2();
00336 
00337     void
00338     UpdateScalarBar(VISU_ScalarBarActor *theScalarBar,
00339               VISU_LookupTable* theLookupTable);
00340 
00341   protected:
00342     VISU_GaussPointsPL *myGaussPointsPL;
00343     
00344     bool myIsDispGlobalScalarBar;
00345     bool myIsActiveLocalScalarBar;
00346     QColor myColor;
00347     vtkFloatingPointType mySpacing;
00348     int myFaceLimit;
00349 
00350     QString myMainTexture;
00351     QString myAlphaTexture;
00352 
00353   public:
00354     static 
00355     size_t
00356     IsPossible(Result_i* theResult, 
00357             const std::string& theMeshName, 
00358             VISU::Entity theEntity,
00359             const std::string& theFieldName, 
00360             CORBA::Long theTimeStampNumber,
00361             bool theIsMemoryCheck);
00362     virtual
00363     Storable* 
00364     Create(const std::string& theMeshName, 
00365         VISU::Entity theEntity,
00366         const std::string& theFieldName, 
00367         CORBA::Long theTimeStampNumber);
00368 
00369     virtual 
00370     void
00371     SameAs(const Prs3d_i* theOrigin);
00372 
00373     static const std::string myComment;
00374 
00375     virtual
00376     const char* 
00377     GetComment() const;
00378 
00379     virtual
00380     QString
00381     GenerateName();
00382 
00383     virtual
00384     void
00385     ToStream(std::ostringstream& theStr);
00386 
00387     virtual 
00388     Storable* 
00389     Restore(SALOMEDS::SObject_ptr theSObject,
00390          const Storable::TRestoringMap& theMap);
00391 
00392     //----------------------------------------------------------------------------
00393     virtual 
00394     VISU_Actor* 
00395     CreateActor();
00396 
00397     virtual 
00398     VISU_GaussPtsAct2* 
00399     CloneActor(VISU_GaussPtsAct1* theActor);
00400 
00401     virtual
00402     void
00403     UpdateActor(VISU_ActorBase* theActor);
00404 
00405     virtual 
00406     void
00407     UpdateFromActor(VISU_GaussPtsAct* theActor);
00408     
00409     private:
00410       bool myShowBar;
00411   };
00412 }
00413 
00414 #endif
Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS