src/OBJECT/VISU_GaussPtsSettings.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   : 
00025 //  Author : 
00026 //  Module : VISU
00027 //  $Header: /home/server/cvs/VISU/VISU_SRC/src/OBJECT/VISU_GaussPtsSettings.h,v 1.4 2006/06/01 11:36:04 jfa Exp $
00028 
00029 #ifndef VISU_GaussPtsSettings_HeaderFile
00030 #define VISU_GaussPtsSettings_HeaderFile
00031 
00032 #include <vtkObject.h>
00033 #include <vtkCommand.h>
00034 
00035 #include "VTKViewer.h"
00036 
00037 class vtkImageData;
00038 
00039 
00040 //============================================================================
00041 namespace VISU
00042 {
00043   const vtkIdType UpdateFromSettingsEvent        = vtkCommand::UserEvent + 100; 
00044   const vtkIdType UpdateInsideSettingsEvent      = vtkCommand::UserEvent + 101; 
00045   const vtkIdType UpdateOutsideSettingsEvent     = vtkCommand::UserEvent + 102; 
00046   const vtkIdType UpdatePickingSettingsEvent     = vtkCommand::UserEvent + 103; 
00047 }
00048 
00049 
00051 class VISU_GaussPtsSettings : public vtkObject
00052 {
00053  public:
00054   vtkTypeMacro( VISU_GaussPtsSettings, vtkObject );
00055 
00056   VISU_GaussPtsSettings();
00057   virtual ~VISU_GaussPtsSettings();
00058 
00059   static
00060   VISU_GaussPtsSettings*
00061   New();
00062 
00063   vtkSetMacro( Initial, bool );
00064   vtkGetMacro( Initial, bool );
00065 
00066   vtkSetMacro( PrimitiveType, int );
00067   vtkGetMacro( PrimitiveType, int );
00068 
00069   vtkSetMacro( Clamp, vtkFloatingPointType );
00070   vtkGetMacro( Clamp, vtkFloatingPointType );
00071 
00072   vtkSetMacro( Texture, vtkImageData* );
00073   vtkGetMacro( Texture, vtkImageData* );
00074 
00075   vtkSetMacro( AlphaThreshold, vtkFloatingPointType );
00076   vtkGetMacro( AlphaThreshold, vtkFloatingPointType );
00077 
00078   vtkSetMacro( Resolution, int );
00079   vtkGetMacro( Resolution, int );
00080 
00081   vtkSetMacro( Magnification, vtkFloatingPointType );
00082   vtkGetMacro( Magnification, vtkFloatingPointType );
00083 
00084   vtkSetMacro( Increment, vtkFloatingPointType );
00085   vtkGetMacro( Increment, vtkFloatingPointType );
00086 
00087  protected:
00088   bool                Initial;
00089 
00090   int                 PrimitiveType;
00091   vtkFloatingPointType Clamp;
00092   vtkImageData*       Texture;
00093   vtkFloatingPointType AlphaThreshold;
00094   int                 Resolution;
00095   vtkFloatingPointType Magnification;
00096   vtkFloatingPointType Increment;
00097 };
00098 
00099 
00101 
00106 class VISU_InsideCursorSettings : public VISU_GaussPtsSettings
00107 {
00108  public:
00109   vtkTypeMacro( VISU_InsideCursorSettings, vtkObject );
00110 
00111   VISU_InsideCursorSettings();
00112   virtual ~VISU_InsideCursorSettings();
00113 
00114   static
00115   VISU_InsideCursorSettings*
00116   New();
00117 
00118   vtkSetMacro( MinSize, vtkFloatingPointType );
00119   vtkGetMacro( MinSize, vtkFloatingPointType );
00120 
00121   vtkSetMacro( MaxSize, vtkFloatingPointType );
00122   vtkGetMacro( MaxSize, vtkFloatingPointType );
00123 
00124  protected:
00125   vtkFloatingPointType MinSize;
00126   vtkFloatingPointType MaxSize;
00127 };
00128 
00129 
00130 //============================================================================
00132 
00137 class VISU_OutsideCursorSettings : public VISU_GaussPtsSettings
00138 {
00139  public:
00140   vtkTypeMacro( VISU_OutsideCursorSettings, vtkObject );
00141 
00142   VISU_OutsideCursorSettings();
00143   virtual ~VISU_OutsideCursorSettings();
00144 
00145   static
00146   VISU_OutsideCursorSettings*
00147   New();
00148 
00149   vtkSetMacro( Size, vtkFloatingPointType );
00150   vtkGetMacro( Size, vtkFloatingPointType );
00151 
00152   vtkSetMacro( Uniform, bool );
00153   vtkGetMacro( Uniform, bool );
00154 
00155   vtkSetVector3Macro( Color, vtkFloatingPointType );
00156   vtkGetVector3Macro( Color, vtkFloatingPointType );
00157 
00158  protected:
00159   vtkFloatingPointType Size;
00160   bool                Uniform;
00161   vtkFloatingPointType Color[3];
00162 };
00163 
00164 
00166 
00173 class VISU_PickingSettings : public vtkObject
00174 {
00175  public:
00176   enum { BelowPoint = 0, TopLeftCorner };
00177 
00178  public:
00179   vtkTypeMacro( VISU_PickingSettings, vtkObject );
00180 
00181   VISU_PickingSettings();
00182   virtual ~VISU_PickingSettings();
00183 
00184   static
00185   VISU_PickingSettings*
00186   New();
00187 
00188   vtkSetMacro( Initial, bool );
00189   vtkGetMacro( Initial, bool );
00190 
00191   vtkSetMacro( PyramidHeight, vtkFloatingPointType );
00192   vtkGetMacro( PyramidHeight, vtkFloatingPointType );
00193 
00194   vtkSetMacro( CursorSize, vtkFloatingPointType );
00195   vtkGetMacro( CursorSize, vtkFloatingPointType );
00196 
00197   vtkSetVector3Macro( Color, vtkFloatingPointType );
00198   vtkGetVector3Macro( Color, vtkFloatingPointType );
00199 
00200   vtkSetMacro( PointTolerance, vtkFloatingPointType );
00201   vtkGetMacro( PointTolerance, vtkFloatingPointType );
00202 
00203   vtkSetMacro( InfoWindowTransparency, vtkFloatingPointType );
00204   vtkGetMacro( InfoWindowTransparency, vtkFloatingPointType );
00205 
00206   vtkSetMacro( InfoWindowPosition, int );
00207   vtkGetMacro( InfoWindowPosition, int );
00208 
00209   vtkSetMacro( ZoomFactor, vtkFloatingPointType );
00210   vtkGetMacro( ZoomFactor, vtkFloatingPointType );
00211 
00212   vtkSetMacro( StepNumber, int );
00213   vtkGetMacro( StepNumber, int );
00214 
00215   vtkSetMacro( DisplayParentMesh, bool );
00216   vtkGetMacro( DisplayParentMesh, bool );
00217 
00218 private:
00219   bool                Initial;
00220 
00221   vtkFloatingPointType PyramidHeight;
00222   vtkFloatingPointType CursorSize;
00223   vtkFloatingPointType PointTolerance;
00224   vtkFloatingPointType Color[3];
00225   vtkFloatingPointType InfoWindowTransparency;
00226   int                 InfoWindowPosition;
00227   vtkFloatingPointType ZoomFactor;
00228   int                 StepNumber;
00229   bool                DisplayParentMesh;
00230 };
00231 
00232 
00233 #endif