src/OBJECT/VISU_MeshAct.h

Go to the documentation of this file.
00001 //  VISU OBJECT : interactive object for VISU entities implementation
00002 //
00003 //  Copyright (C) 2003  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 //
00024 //  File   : VISU_MeshAct.h
00025 //  Author : Laurent CORNABE with the help of Nicolas REJNERI
00026 //  Module : VISU
00027 //  $Header: /home/server/cvs/VISU/VISU_SRC/src/OBJECT/VISU_MeshAct.h,v 1.7 2006/06/01 11:36:04 jfa Exp $
00028 
00029 #ifndef VISU_MeshAct_HeaderFile
00030 #define VISU_MeshAct_HeaderFile
00031 
00032 #include "VISU_Actor.h"
00033 #include "SVTK_DeviceActor.h"
00034 
00035 namespace SVTK
00036 {
00037   namespace Representation
00038   {
00039     const Type Surfaceframe = Insideframe + 1;
00040   }
00041 }
00042 
00043 class VTKOCC_EXPORT VISU_MeshAct : public VISU_Actor 
00044 {
00045  public:
00046   vtkTypeMacro(VISU_MeshAct,VISU_Actor);
00047   static VISU_MeshAct* New();
00048 
00050   virtual
00051   void
00052   SetTransform(VTKViewer_Transform* theTransform); 
00053 
00054   virtual
00055   vtkProperty* 
00056   GetSurfaceProperty(); 
00057 
00058   virtual
00059   vtkProperty* 
00060   GetEdgeProperty(); 
00061 
00062   virtual
00063   vtkProperty* 
00064   GetNodeProperty(); 
00065 
00066   virtual
00067   void
00068   SetOpacity(vtkFloatingPointType theValue);
00069 
00070   virtual
00071   vtkFloatingPointType
00072   GetOpacity();
00073 
00074   virtual
00075   void
00076   SetLineWidth(vtkFloatingPointType theLineWidth);
00077 
00078   virtual
00079   vtkFloatingPointType
00080   GetLineWidth();
00081 
00082   virtual
00083   void
00084   SetRepresentation(int theMode);
00085 
00086   virtual
00087   void
00088   SetShrinkable(bool theIsShrinkable);
00089 
00090   virtual
00091   void
00092   SetShrinkFactor(vtkFloatingPointType theFactor = 0.8); 
00093 
00094   virtual
00095   void
00096   SetShrink(); 
00097 
00098   virtual
00099   void
00100   UnShrink(); 
00101 
00102   virtual
00103   int
00104   RenderOpaqueGeometry(vtkViewport *ren);
00105 
00106   virtual
00107   int
00108   RenderTranslucentGeometry(vtkViewport *ren);
00109 
00110  protected:
00111   VISU_MeshAct();
00112   ~VISU_MeshAct();
00113 
00114   virtual 
00115   void
00116   SetMapperInput(vtkDataSet* theDataSet);
00117 
00118   SVTK_DeviceActor *mySurfaceActor;
00119   SVTK_DeviceActor *myEdgeActor;
00120   SVTK_DeviceActor *myNodeActor;
00121 };
00122 
00123 #endif