Version: 6.3.1

src/OBJECT/VISU_ScalarMapAct.h

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_ScalarMapAct.h
00025 //  Author : Laurent CORNABE with help of Nicolas REJNERI
00026 //  Module : VISU
00027 //  $Header: /home/server/cvs/VISU/VISU_SRC/src/OBJECT/VISU_ScalarMapAct.h,v 1.8.2.3.6.3.4.1 2011-06-02 06:00:17 vsr Exp $
00028 //
00029 #ifndef VISU_ScalarMapAct_HeaderFile
00030 #define VISU_ScalarMapAct_HeaderFile
00031 
00032 #include "VISU_OBJECT.h"
00033 #include "VISU_DataSetActor.h"
00034 
00035 namespace VTK
00036 {
00037   const MarkerType MT_POINT_SPRITE = MT_USER + 1;
00038 }
00039 
00040 class VISU_ScalarBarActor;
00041 class VISU_PointsDeviceActor;
00042 
00043 //----------------------------------------------------------------------------
00044 class VISU_OBJECT_EXPORT VISU_ScalarMapAct : public VISU_DataSetActor 
00045 {
00046  public:
00047   vtkTypeMacro(VISU_ScalarMapAct,VISU_DataSetActor);
00048 
00049   static
00050   VISU_ScalarMapAct* 
00051   New();
00052 
00053   ~VISU_ScalarMapAct();
00054 
00056   virtual
00057   void
00058   DeepCopy(VISU_Actor *theActor);
00059 
00060   virtual
00061   void
00062   ShallowCopyPL(VISU_PipeLine* thePipeLine);
00063 
00065   virtual
00066   void
00067   SetTransform(VTKViewer_Transform* theTransform); 
00068 
00069   virtual
00070   vtkProperty* 
00071   GetEdgeProperty(); 
00072 
00073   virtual
00074   void
00075   SetShrinkable(bool theIsShrinkable);
00076 
00077   virtual
00078   void
00079   SetShrinkFactor(vtkFloatingPointType theFactor = 0.8); 
00080 
00081   virtual
00082   void
00083   SetShrink(); 
00084 
00085   virtual
00086   void
00087   UnShrink(); 
00088 
00089   virtual
00090     EQuadratic2DRepresentation GetQuadratic2DRepresentation() const;
00091   
00092   virtual void 
00093     SetQuadratic2DRepresentation( EQuadratic2DRepresentation theMode );
00094 
00095   
00096   virtual
00097   void
00098   SetFeatureEdgesAllowed(bool theIsFeatureEdgesAllowed);
00099 
00100   virtual
00101   void
00102   SetFeatureEdgesEnabled(bool theIsFeatureEdgesEnabled);
00103 
00104   virtual
00105   void
00106   SetFeatureEdgesAngle(vtkFloatingPointType theAngle = 30.0); 
00107 
00108   virtual
00109   void
00110   SetFeatureEdgesFlags(bool theIsFeatureEdges,
00111                        bool theIsBoundaryEdges,
00112                        bool theIsManifoldEdges,
00113                        bool theIsNonManifoldEdges);
00114 
00115   virtual
00116   void
00117   SetFeatureEdgesColoring(bool theIsColoring);
00118 
00119   virtual
00120   void
00121   SetOpacity(vtkFloatingPointType theValue);
00122 
00123   virtual
00124   vtkFloatingPointType
00125   GetOpacity();
00126 
00127   virtual
00128   void
00129   SetLineWidth(vtkFloatingPointType theLineWidth);
00130 
00131   virtual
00132   vtkFloatingPointType
00133   GetLineWidth();
00134 
00135   virtual
00136   void
00137   AddToRender(vtkRenderer* theRenderer); 
00138 
00139   virtual
00140   int
00141   RenderOpaqueGeometry(vtkViewport *ren);
00142 
00143   virtual
00144   int
00145 #if (VTK_XVERSION < 0x050100)
00146   RenderTranslucentGeometry(vtkViewport *ren);
00147 #else
00148   RenderTranslucentPolygonalGeometry(vtkViewport *ren);
00149 
00150   virtual
00151   int
00152   HasTranslucentPolygonalGeometry();
00153 #endif
00154 
00155   virtual
00156   void
00157   RemoveFromRender(vtkRenderer* theRenderer);
00158 
00159   virtual
00160   void
00161   SetVisibility(int theMode);
00162 
00163   virtual
00164   int
00165   GetBarVisibility();
00166 
00167   virtual
00168   vtkFloatingPointType 
00169   Get0DElemSize();
00170 
00171   virtual
00172   VISU_ScalarBarActor* 
00173   GetScalarBar();
00174 
00175   virtual
00176   void
00177   SetBarVisibility(bool theMode);
00178 
00179   virtual
00180   void
00181   SetRepresentation(int theMode);
00182 
00183   virtual
00184   void
00185   SetShading(bool theOn = true);
00186 
00187   virtual
00188   bool
00189   IsShading();
00190 
00192   virtual
00193   unsigned long int
00194   GetMemorySize();
00195 
00196   virtual
00197   void
00198   SetMarkerStd( VTK::MarkerType, VTK::MarkerScale );
00199 
00200   virtual
00201   void
00202   SetMarkerTexture( int, VTK::MarkerTexture );
00203 
00204   virtual
00205   void
00206   Set0DElemSize(vtkFloatingPointType theValue);
00207 
00208 
00209  protected:
00210   VISU_ScalarMapAct();
00211 
00212   virtual 
00213   void
00214   SetMapperInput(vtkDataSet* theDataSet);
00215 
00216   bool myBarVisibility;
00217   VISU_ScalarBarActor* myScalarBar;
00218 
00219   VISU_PointsDeviceActor* myPointSpriteActor;
00220   SVTK_DeviceActor*    myPointsActor;
00221   SVTK_DeviceActor*    mySurfaceActor;
00222   SVTK_DeviceActor*    myEdgeActor;
00223 
00224   bool myIsPointSpriteMode;
00225 };
00226 //----------------------------------------------------------------------------
00227 
00228 
00229 #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