47 #ifndef __vtkFastSplatter_h
48 #define __vtkFastSplatter_h
64 vtkSetVector6Macro(ModelBounds,
double);
65 vtkGetVectorMacro(ModelBounds,
double,6);
70 vtkSetVector3Macro( OutputDimensions,
int );
71 vtkGetVector3Macro( OutputDimensions,
int );
75 enum { NoneLimit, ClampLimit,
ScaleLimit, FreezeScaleLimit };
84 vtkSetMacro(LimitMode,
int);
85 vtkGetMacro(LimitMode,
int);
94 vtkSetMacro(MinValue,
double);
95 vtkGetMacro(MinValue,
double);
96 vtkSetMacro(MaxValue,
double);
97 vtkGetMacro(MaxValue,
double);
103 vtkGetMacro(NumberOfPointsSplatted,
int);
115 double ModelBounds[6];
116 int OutputDimensions[3];
161 T minValue, T maxValue)
163 for (
vtkIdType i = 0; i < arraySize; i++)
165 if (array[i] < minValue) array[i] = minValue;
166 if (array[i] > maxValue) array[i] = maxValue;
174 T minValue, T maxValue,
175 double *dataMinValue,
double *dataMaxValue)
182 for (
int c = 0; c < numComponents; c++)
188 for (t = 1; t < numTuples; t++, a += numComponents)
190 if (min > *a) min = *a;
191 if (max < *a) max = *a;
197 for (t = 0, a = array+c; t < numTuples; t++, a += numComponents)
206 for (t = 0, a = array+c; t < numTuples; t++, a += numComponents)
208 *a = ((maxValue-minValue)*(*a))/(max-min);
215 for (t = 0, a = array+c; t < numTuples; t++, a += numComponents)
234 T minValue, T maxValue,
235 double min,
double max)
240 for (
int c = 0; c < numComponents; c++)
245 for (t = 0, a = array+c; t < numTuples; t++, a += numComponents)
247 *a -=
static_cast<T
>(min);
254 for (t = 0, a = array+c; t < numTuples; t++, a += numComponents)
256 *a =
static_cast<T
>(((maxValue-minValue)*(*a))/(max-min));
263 for (t = 0, a = array+c; t < numTuples; t++, a += numComponents)
273 #endif //__vtkFastSplatter_h