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_PipeLine_HeaderFile
00029 #define VISU_PipeLine_HeaderFile
00030
00031 #include "VISUPipeline.hxx"
00032 #include "VISU_IDMapper.hxx"
00033
00034 #include <vtkObject.h>
00035 #include <vtkSmartPointer.h>
00036
00037 class vtkCell;
00038 class vtkPlane;
00039 class vtkMapper;
00040 class vtkDataSet;
00041 class vtkPointSet;
00042 class vtkImplicitFunction;
00043 class vtkTimeStamp;
00044
00045 class VISU_MapperHolder;
00046
00047
00048 class VISU_PIPELINE_EXPORT VISU_PipeLine : public vtkObject
00049 {
00050 friend class VISU_MapperHolder;
00051
00052 public:
00053 vtkTypeMacro(VISU_PipeLine, vtkObject);
00054
00056 virtual
00057 unsigned long int
00058 GetMemorySize();
00059
00060 virtual
00061 unsigned long int
00062 GetMTime();
00063
00064
00065 virtual
00066 void
00067 ShallowCopy(VISU_PipeLine *thePipeLine,
00068 bool theIsCopyInput);
00069
00070 virtual
00071 void
00072 SameAs(VISU_PipeLine *thePipeLine);
00073
00074
00075 void
00076 SetMapperHolder(VISU_MapperHolder* theHolder);
00077
00078 VISU_MapperHolder*
00079 GetMapperHolder();
00080
00081 const VISU::PIDMapper&
00082 GetIDMapper();
00083
00084 virtual
00085 vtkDataSet*
00086 GetInput();
00087
00088 virtual
00089 vtkMapper*
00090 GetMapper();
00091
00092 virtual
00093 vtkDataSet*
00094 GetOutput();
00095
00096
00097 virtual
00098 void
00099 Init();
00100
00101 virtual
00102 void
00103 Update();
00104
00105
00106 virtual
00107 vtkIdType
00108 GetNodeObjID(vtkIdType theID);
00109
00110 virtual
00111 vtkIdType
00112 GetNodeVTKID(vtkIdType theID);
00113
00114 virtual
00115 vtkFloatingPointType*
00116 GetNodeCoord(vtkIdType theObjID);
00117
00118 virtual
00119 vtkIdType
00120 GetElemObjID(vtkIdType theID);
00121
00122 virtual
00123 vtkIdType
00124 GetElemVTKID(vtkIdType theID);
00125
00126 virtual
00127 vtkCell*
00128 GetElemCell(vtkIdType theObjID);
00129
00130
00131 bool
00132 IsPlanarInput();
00133
00134 bool
00135 IsShrinkable();
00136
00137 bool
00138 IsFeatureEdgesAllowed();
00139
00140
00141 void
00142 SetImplicitFunction(vtkImplicitFunction *theFunction);
00143
00144 vtkImplicitFunction*
00145 GetImplicitFunction();
00146
00147 void
00148 SetExtractInside(bool theMode);
00149
00150 void
00151 SetExtractBoundaryCells(bool theMode);
00152
00153
00154 virtual
00155 void
00156 RemoveAllClippingPlanes();
00157
00158 vtkIdType
00159 GetNumberOfClippingPlanes();
00160
00161 virtual
00162 bool
00163 AddClippingPlane(vtkPlane* thePlane);
00164
00165 virtual
00166 vtkPlane*
00167 GetClippingPlane(vtkIdType theID);
00168
00169 virtual void RemoveClippingPlane(vtkIdType theID);
00170
00171 virtual
00172 void
00173 SetPlaneParam(vtkFloatingPointType theDir[3],
00174 vtkFloatingPointType theDist,
00175 vtkPlane* thePlane);
00176
00177 virtual
00178 void
00179 GetPlaneParam(vtkFloatingPointType theDir[3],
00180 vtkFloatingPointType& theDist,
00181 vtkPlane* thePlane);
00182
00183 void
00184 GetVisibleBounds(vtkFloatingPointType theBounds[6]);
00185
00186
00187 static
00188 size_t
00189 CheckAvailableMemory(double theSize);
00190
00191 static
00192 size_t
00193 GetAvailableMemory(double theSize,
00194 double theMinSize = 1024*1024);
00195
00196 protected:
00197
00198 VISU_PipeLine();
00199
00200 virtual
00201 ~VISU_PipeLine();
00202
00203
00204 virtual
00205 void
00206 Build() = 0;
00207
00208 virtual
00209 void
00210 OnCreateMapperHolder() = 0;
00211
00212 virtual
00213 void
00214 DoShallowCopy(VISU_PipeLine *thePipeLine,
00215 bool theIsCopyInput);
00216
00217 virtual
00218 void
00219 ComputeVisibleBounds();
00220
00221
00222 vtkDataSet*
00223 GetClippedInput();
00224
00225 void
00226 SetIsShrinkable(bool theIsShrinkable);
00227
00228 void
00229 SetIsFeatureEdgesAllowed(bool theIsFeatureEdgesAllowed);
00230
00231
00232 vtkFloatingPointType myVisibleBounds[6];
00233 vtkTimeStamp myVisibleComputeTime;
00234
00235 private:
00236
00237 vtkSmartPointer<VISU_MapperHolder> myMapperHolder;
00238 bool myIsShrinkable;
00239 bool myIsFeatureEdgesAllowed;
00240 };
00241
00242 #endif