Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef VISU_GaussPointsPL_HeaderFile
00029 #define VISU_GaussPointsPL_HeaderFile
00030
00031 #include "VISUPipeline.hxx"
00032 #include "VISU_MergedPL.hxx"
00033 #include "VISU_ColoredPL.hxx"
00034
00035 #include <vector>
00036
00037 class VISU_OpenGLPointSpriteMapper;
00038 class VISU_PointSpriteMapperHolder;
00039
00040 class vtkGeometryFilter;
00041 class vtkGlyph3D;
00042 class vtkSphereSource;
00043 class vtkDataArray;
00044 class vtkImageData;
00045 class vtkPointSet;
00046 class vtkPassThroughFilter;
00047 class vtkDataSet;
00048
00049 class vtkWarpVector;
00050 class SALOME_Transform;
00051
00052 class VISU_AppendFilter;
00053 class VISU_GaussMergeFilter;
00054
00055
00057
00061 class VISU_PIPELINE_EXPORT VISU_GaussPointsPL : public VISU_MergedPL,
00062 public VISU_ColoredPL
00063 {
00064 public:
00065
00066 vtkTypeMacro(VISU_GaussPointsPL, VISU_ColoredPL);
00067
00068 static
00069 VISU_GaussPointsPL*
00070 New();
00071
00072 virtual
00073 unsigned long int
00074 GetMTime();
00075
00076
00077 void
00078 SetGaussPtsIDMapper(const VISU::PGaussPtsIDMapper& theGaussPtsIDMapper);
00079
00080 const VISU::PGaussPtsIDMapper&
00081 GetGaussPtsIDMapper();
00082
00083 VISU_PointSpriteMapperHolder*
00084 GetPointSpriteMapperHolder();
00085
00087 VISU_OpenGLPointSpriteMapper*
00088 GetPointSpriteMapper();
00089
00090 vtkDataSet*
00091 GetParentMesh();
00092
00094 vtkPolyData*
00095 GetPickableDataSet();
00096
00097
00099 virtual
00100 void
00101 Init();
00102
00104 virtual
00105 void
00106 Update();
00107
00109 virtual
00110 unsigned long int
00111 GetMemorySize();
00112
00113
00115 void
00116 UpdateGlyph();
00117
00118 virtual
00119 VISU::TGaussPointID
00120 GetObjID(vtkIdType theID);
00121
00123
00128 void
00129 SetBicolor(bool theBicolor);
00130
00132 bool
00133 GetBicolor();
00134
00136
00141 void
00142 SetIsColored(bool theIsColored);
00143
00144 bool
00145 GetIsColored();
00146
00148 void
00149 SetPrimitiveType(int thePrimitiveType);
00150
00152 int
00153 GetPrimitiveType();
00154
00156 vtkFloatingPointType
00157 GetMaximumSupportedSize();
00158
00160 void
00161 SetClamp(vtkFloatingPointType theClamp);
00162
00164 vtkFloatingPointType
00165 GetClamp();
00166
00168 void
00169 SetSize(vtkFloatingPointType theSize);
00170
00172 vtkFloatingPointType
00173 GetSize();
00174
00176 void
00177 SetMinSize(vtkFloatingPointType theMinSize);
00178
00180 vtkFloatingPointType
00181 GetMinSize();
00182
00184 void
00185 SetMaxSize(vtkFloatingPointType theMaxSize);
00186
00188 vtkFloatingPointType
00189 GetMaxSize();
00190
00192 void
00193 SetMagnification(vtkFloatingPointType theMagnification);
00194
00196 vtkFloatingPointType
00197 GetMagnification();
00198
00200 void
00201 SetMagnificationIncrement(vtkFloatingPointType theIncrement);
00202
00204 vtkFloatingPointType
00205 GetMagnificationIncrement() { return myMagnificationIncrement; }
00206
00208 void
00209 SetAlphaThreshold(vtkFloatingPointType theAlphaThreshold);
00210
00212 vtkFloatingPointType
00213 GetAlphaThreshold();
00214
00216 void
00217 SetOpacity(vtkFloatingPointType theOpacity);
00218
00220 vtkFloatingPointType
00221 GetOpacity();
00222
00224 void
00225 SetResolution(int theResolution);
00226
00228 int
00229 GetResolution();
00230
00232 void
00233 ChangeMagnification( bool up );
00234
00236 vtkFloatingPointType
00237 GetMaxPointSize();
00238
00240 vtkFloatingPointType
00241 GetPointSize(vtkIdType theID);
00242
00244 vtkFloatingPointType
00245 GetPointSize(vtkIdType theID, vtkDataArray* theScalarArray);
00246
00248 void
00249 SetAverageCellSize(vtkFloatingPointType AverageCellSize);
00250
00252 vtkFloatingPointType
00253 GetAverageCellSize();
00254
00256 void
00257 SetImageData(vtkImageData* theImageData);
00258
00260
00264 static
00265 vtkSmartPointer<vtkImageData>
00266 MakeTexture( const char* theMainTexture,
00267 const char* theAlphaTexture );
00268
00269 public:
00270
00271 virtual
00272 void
00273 SetIsDeformed( bool theIsDeformed );
00274
00275 virtual
00276 bool
00277 GetIsDeformed();
00278
00279 virtual
00280 void
00281 SetScale( vtkFloatingPointType theScale );
00282
00283 virtual
00284 vtkFloatingPointType
00285 GetScale();
00286
00287 virtual
00288 void
00289 SetMapScale( vtkFloatingPointType theMapScale = 1.0 );
00290
00291 public:
00292
00293 virtual
00294 void
00295 SetSourceGeometry();
00296
00297 virtual
00298 int
00299 AddGeometry(vtkDataSet* theGeometry, const VISU::TName& theGeomName);
00300
00301 virtual
00302 vtkDataSet*
00303 GetGeometry(int theGeomNumber, VISU::TName& theGeomName);
00304
00305 virtual
00306 int
00307 GetNumberOfGeometry();
00308
00309 virtual
00310 bool
00311 IsExternalGeometryUsed();
00312
00313 virtual
00314 void
00315 ClearGeometry();
00316
00317 virtual
00318 void
00319 GetSourceRange(vtkFloatingPointType theRange[2]);
00320
00321 virtual
00322 vtkPointSet*
00323 GetMergedInput();
00324
00325 protected:
00326
00327 VISU_GaussPointsPL();
00328
00329 virtual
00330 ~VISU_GaussPointsPL();
00331
00332 virtual
00333 void
00334 OnCreateMapperHolder();
00335
00336 virtual
00337 void
00338 Build();
00339
00340 virtual
00341 vtkDataSet*
00342 InsertCustomPL();
00343
00344 virtual
00345 void
00346 DoShallowCopy(VISU_PipeLine *thePipeLine,
00347 bool theIsCopyInput);
00348
00349 private:
00350
00351 vtkFloatingPointType myScaleFactor;
00352 vtkWarpVector *myWarpVector;
00353 std::vector<vtkPassThroughFilter*> myPassFilter;
00354 vtkSmartPointer<VISU_PointSpriteMapperHolder> myPointSpriteMapperHolder;
00355
00356 vtkGlyph3D* myGlyph;
00357 vtkSphereSource* mySphereSource;
00358
00359 vtkFloatingPointType myMagnificationIncrement;
00360
00361 int myPrimitiveType;
00362
00363 vtkSmartPointer<VISU_AppendFilter> myAppendFilter;
00364 vtkSmartPointer<VISU_GaussMergeFilter> myMergeFilter;
00365
00366 private:
00367 VISU_GaussPointsPL(const VISU_GaussPointsPL&);
00368 void operator=(const VISU_GaussPointsPL&);
00369 };
00370
00371 #endif