VTK  9.1.0
vtkGenericDataArray.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkGenericDataArray.h
5
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13
14=========================================================================*/
66#ifndef vtkGenericDataArray_h
67#define vtkGenericDataArray_h
68
69#include "vtkDataArray.h"
70
71#include "vtkCompiler.h" // for VTK_USE_EXTERN_TEMPLATE
73#include "vtkSmartPointer.h"
74#include "vtkTypeTraits.h"
75
76#include <cassert>
77
78template <class DerivedT, class ValueTypeT>
80{
82
83public:
84 typedef ValueTypeT ValueType;
86
90 enum
91 {
93 };
94
99
107 inline ValueType GetValue(vtkIdType valueIdx) const
108 {
109 return static_cast<const DerivedT*>(this)->GetValue(valueIdx);
110 }
111
120 VTK_EXPECTS(0 <= valueIdx && valueIdx < GetNumberOfValues())
121 {
122 static_cast<DerivedT*>(this)->SetValue(valueIdx, value);
123 }
124
133 void GetTypedTuple(vtkIdType tupleIdx, ValueType* tuple) const
134 VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples())
135 {
136 static_cast<const DerivedT*>(this)->GetTypedTuple(tupleIdx, tuple);
137 }
138
147 void SetTypedTuple(vtkIdType tupleIdx, const ValueType* tuple)
148 VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples())
149 {
150 static_cast<DerivedT*>(this)->SetTypedTuple(tupleIdx, tuple);
151 }
152
158 ValueType GetTypedComponent(vtkIdType tupleIdx, int compIdx) const VTK_EXPECTS(0 <= tupleIdx &&
159 tupleIdx < GetNumberOfTuples()) VTK_EXPECTS(0 <= compIdx && compIdx < GetNumberOfComponents())
160 {
161 return static_cast<const DerivedT*>(this)->GetTypedComponent(tupleIdx, compIdx);
162 }
163
169 void SetTypedComponent(vtkIdType tupleIdx, int compIdx, ValueType value)
170 VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples())
171 VTK_EXPECTS(0 <= compIdx && compIdx < GetNumberOfComponents())
172 {
173 static_cast<DerivedT*>(this)->SetTypedComponent(tupleIdx, compIdx, value);
174 }
175
177
181 void* GetVoidPointer(vtkIdType valueIdx) override;
183 void SetVoidArray(void*, vtkIdType, int) override;
184 void SetVoidArray(void*, vtkIdType, int, int) override;
185 void SetArrayFreeFunction(void (*callback)(void*)) override;
186 void* WriteVoidPointer(vtkIdType valueIdx, vtkIdType numValues) override;
189
196 void RemoveTuple(vtkIdType tupleIdx) override;
197
202
207
211 void InsertTypedTuple(vtkIdType tupleIdx, const ValueType* t);
212
217
222 void InsertTypedComponent(vtkIdType tupleIdx, int compIdx, ValueType val);
223
225
229 void GetValueRange(ValueType range[2], int comp);
232
238 void GetValueRange(ValueType range[2]) { this->GetValueRange(range, 0); }
239
248 void GetFiniteValueRange(ValueType range[2]) { this->GetFiniteValueRange(range, 0); }
255 vtkIdType Capacity() { return this->Size; }
256
260 virtual void FillTypedComponent(int compIdx, ValueType value);
261
265 virtual void FillValue(ValueType value);
266
267 int GetDataType() const override;
268 int GetDataTypeSize() const override;
269 bool HasStandardMemoryLayout() const override;
271 vtkTypeBool Resize(vtkIdType numTuples) override;
272 void SetNumberOfComponents(int num) override;
273 void SetNumberOfTuples(vtkIdType number) override;
274 void Initialize() override;
275 void Squeeze() override;
276 void SetTuple(vtkIdType dstTupleIdx, vtkIdType srcTupleIdx, vtkAbstractArray* source) override;
277 // MSVC doesn't like 'using' here (error C2487). Just forward instead:
278 // using Superclass::SetTuple;
279 void SetTuple(vtkIdType tupleIdx, const float* tuple) override
280 {
281 this->Superclass::SetTuple(tupleIdx, tuple);
282 }
283 void SetTuple(vtkIdType tupleIdx, const double* tuple) override
284 {
285 this->Superclass::SetTuple(tupleIdx, tuple);
286 }
287
288 void InsertTuples(vtkIdList* dstIds, vtkIdList* srcIds, vtkAbstractArray* source) override;
289 // MSVC doesn't like 'using' here (error C2487). Just forward instead:
290 // using Superclass::InsertTuples;
292 vtkIdType dstStart, vtkIdType n, vtkIdType srcStart, vtkAbstractArray* source) override
293 {
294 this->Superclass::InsertTuples(dstStart, n, srcStart, source);
295 }
296
297 void InsertTuple(vtkIdType dstTupleIdx, vtkIdType srcTupleIdx, vtkAbstractArray* source) override;
298 void InsertTuple(vtkIdType tupleIdx, const float* source) override;
299 void InsertTuple(vtkIdType tupleIdx, const double* source) override;
300 void InsertComponent(vtkIdType tupleIdx, int compIdx, double value) override;
302 vtkIdType InsertNextTuple(const float* tuple) override;
303 vtkIdType InsertNextTuple(const double* tuple) override;
304 void GetTuples(vtkIdList* tupleIds, vtkAbstractArray* output) override;
305 void GetTuples(vtkIdType p1, vtkIdType p2, vtkAbstractArray* output) override;
306 double* GetTuple(vtkIdType tupleIdx) override;
307 void GetTuple(vtkIdType tupleIdx, double* tuple) override;
309 double* weights) override;
310 void InterpolateTuple(vtkIdType dstTupleIdx, vtkIdType srcTupleIdx1, vtkAbstractArray* source1,
311 vtkIdType srcTupleIdx2, vtkAbstractArray* source2, double t) override;
312 void SetComponent(vtkIdType tupleIdx, int compIdx, double value) override;
313 double GetComponent(vtkIdType tupleIdx, int compIdx) override;
314 void SetVariantValue(vtkIdType valueIdx, vtkVariant value) override;
319 void LookupValue(vtkVariant value, vtkIdList* valueIds) override;
320 virtual void LookupTypedValue(ValueType value, vtkIdList* valueIds);
321 void ClearLookup() override;
322 void DataChanged() override;
323 void FillComponent(int compIdx, double value) override;
325
326protected:
329
335 inline bool AllocateTuples(vtkIdType numTuples)
336 {
337 return static_cast<DerivedT*>(this)->AllocateTuples(numTuples);
338 }
339
345 inline bool ReallocateTuples(vtkIdType numTuples)
346 {
347 return static_cast<DerivedT*>(this)->ReallocateTuples(numTuples);
348 }
349
350 // This method resizes the array if needed so that the given tuple index is
351 // valid/accessible.
353
362
371
379
385
393
399
400 std::vector<double> LegacyTuple;
401 std::vector<ValueType> LegacyValueRange;
402 std::vector<ValueType> LegacyValueRangeFull;
403
405
406private:
408 void operator=(const vtkGenericDataArray&) = delete;
409};
410
411// these predeclarations are needed before the .txx include for MinGW
412namespace vtkDataArrayPrivate
413{
414template <typename A, typename R, typename T>
415bool DoComputeScalarRange(A*, R*, T);
416template <typename A, typename R>
418template <typename A, typename R>
420} // namespace vtkDataArrayPrivate
421
422#include "vtkGenericDataArray.txx"
423
424// Adds an implementation of NewInstanceInternal() that returns an AoS
425// (unmapped) VTK array, if possible. This allows the pipeline to copy and
426// propagate the array when the array data is not modifiable. Use this in
427// combination with vtkAbstractTypeMacro or vtkAbstractTemplateTypeMacro
428// (instead of vtkTypeMacro) to avoid adding the default NewInstance
429// implementation.
430#define vtkAOSArrayNewInstanceMacro(thisClass) \
431protected: \
432 vtkObjectBase* NewInstanceInternal() const override \
433 { \
434 if (vtkDataArray* da = vtkDataArray::CreateDataArray(thisClass::VTK_DATA_TYPE)) \
435 { \
436 return da; \
437 } \
438 return thisClass::New(); \
439 } \
440 \
441public:
442
443#endif
444
445// This portion must be OUTSIDE the include blockers. This is used to tell
446// libraries other than vtkCommonCore that instantiations of
447// the GetValueRange lookups can be found externally. This prevents each library
448// from instantiating these on their own.
449// Additionally it helps hide implementation details that pull in system
450// headers.
451// We only provide these specializations for the 64-bit integer types, since
452// other types can reuse the double-precision mechanism in
453// vtkDataArray::GetRange without losing precision.
454#ifdef VTK_GDA_VALUERANGE_INSTANTIATING
455
456// Forward declare necessary stuffs:
457template <typename ValueType>
459template <typename ValueType>
461
462#ifdef VTK_USE_SCALED_SOA_ARRAYS
463template <typename ValueType>
465#endif
466
467#define VTK_INSTANTIATE_VALUERANGE_ARRAYTYPE(ArrayType, ValueType) \
468 template VTKCOMMONCORE_EXPORT bool DoComputeScalarRange( \
469 ArrayType*, ValueType*, vtkDataArrayPrivate::AllValues); \
470 template VTKCOMMONCORE_EXPORT bool DoComputeScalarRange( \
471 ArrayType*, ValueType*, vtkDataArrayPrivate::FiniteValues); \
472 template VTKCOMMONCORE_EXPORT bool DoComputeVectorRange( \
473 ArrayType*, ValueType[2], vtkDataArrayPrivate::AllValues); \
474 template VTKCOMMONCORE_EXPORT bool DoComputeVectorRange( \
475 ArrayType*, ValueType[2], vtkDataArrayPrivate::FiniteValues);
476
477#ifdef VTK_USE_SCALED_SOA_ARRAYS
478
479#define VTK_INSTANTIATE_VALUERANGE_VALUETYPE(ValueType) \
480 VTK_INSTANTIATE_VALUERANGE_ARRAYTYPE(vtkAOSDataArrayTemplate<ValueType>, ValueType) \
481 VTK_INSTANTIATE_VALUERANGE_ARRAYTYPE(vtkSOADataArrayTemplate<ValueType>, ValueType) \
482 VTK_INSTANTIATE_VALUERANGE_ARRAYTYPE(vtkScaledSOADataArrayTemplate<ValueType>, ValueType)
483
484#else // VTK_USE_SCALED_SOA_ARRAYS
485
486#define VTK_INSTANTIATE_VALUERANGE_VALUETYPE(ValueType) \
487 VTK_INSTANTIATE_VALUERANGE_ARRAYTYPE(vtkAOSDataArrayTemplate<ValueType>, ValueType) \
488 VTK_INSTANTIATE_VALUERANGE_ARRAYTYPE(vtkSOADataArrayTemplate<ValueType>, ValueType)
489
490#endif
491
492#elif defined(VTK_USE_EXTERN_TEMPLATE) // VTK_GDA_VALUERANGE_INSTANTIATING
493
494#ifndef VTK_GDA_TEMPLATE_EXTERN
495#define VTK_GDA_TEMPLATE_EXTERN
496#ifdef _MSC_VER
497#pragma warning(push)
498// The following is needed when the following is declared
499// dllexport and is used from another class in vtkCommonCore
500#pragma warning(disable : 4910) // extern and dllexport incompatible
501#endif
502
503// Forward declare necessary stuffs:
504template <typename ValueType>
506template <typename ValueType>
508
509#ifdef VTK_USE_SCALED_SOA_ARRAYS
510template <typename ValueType>
512#endif
513
514namespace vtkDataArrayPrivate
515{
516template <typename A, typename R, typename T>
517bool DoComputeScalarRange(A*, R*, T);
518template <typename A, typename R>
519bool DoComputeVectorRange(A*, R[2], AllValues);
520template <typename A, typename R>
521bool DoComputeVectorRange(A*, R[2], FiniteValues);
522} // namespace vtkDataArrayPrivate
523
524#define VTK_DECLARE_VALUERANGE_ARRAYTYPE(ArrayType, ValueType) \
525 extern template VTKCOMMONCORE_EXPORT bool DoComputeScalarRange( \
526 ArrayType*, ValueType*, vtkDataArrayPrivate::AllValues); \
527 extern template VTKCOMMONCORE_EXPORT bool DoComputeScalarRange( \
528 ArrayType*, ValueType*, vtkDataArrayPrivate::FiniteValues); \
529 extern template VTKCOMMONCORE_EXPORT bool DoComputeVectorRange( \
530 ArrayType*, ValueType[2], vtkDataArrayPrivate::AllValues); \
531 extern template VTKCOMMONCORE_EXPORT bool DoComputeVectorRange( \
532 ArrayType*, ValueType[2], vtkDataArrayPrivate::FiniteValues);
533
534#ifdef VTK_USE_SCALED_SOA_ARRAYS
535
536#define VTK_DECLARE_VALUERANGE_VALUETYPE(ValueType) \
537 VTK_DECLARE_VALUERANGE_ARRAYTYPE(vtkAOSDataArrayTemplate<ValueType>, ValueType) \
538 VTK_DECLARE_VALUERANGE_ARRAYTYPE(vtkSOADataArrayTemplate<ValueType>, ValueType) \
539 VTK_DECLARE_VALUERANGE_ARRAYTYPE(vtkScaledSOADataArrayTemplate<ValueType>, ValueType)
540
541#else // VTK_USE_SCALED_SOA_ARRAYS
542
543#define VTK_DECLARE_VALUERANGE_VALUETYPE(ValueType) \
544 VTK_DECLARE_VALUERANGE_ARRAYTYPE(vtkAOSDataArrayTemplate<ValueType>, ValueType) \
545 VTK_DECLARE_VALUERANGE_ARRAYTYPE(vtkSOADataArrayTemplate<ValueType>, ValueType)
546
547#endif
548
549namespace vtkDataArrayPrivate
550{
551// These are instantiated in vtkGenericDataArrayValueRange${i}.cxx
555VTK_DECLARE_VALUERANGE_VALUETYPE(unsigned long long)
556
557// This is instantiated in vtkGenericDataArray.cxx
559
560// These are instantiated in vtkFloatArray.cxx, vtkDoubleArray.cxx, etc
574
575// These are instantiated in vtkSOADataArrayTemplateInstantiate${i}.cxx
589
590// These are instantiated in vtkScaledSOADataArrayTemplateInstantiate${i}.cxx
591#ifdef VTK_USE_SCALED_SOA_ARRAYS
605#endif // VTK_USE_SCALED_SOA_ARRAYS
606
607} // namespace vtkDataArrayPrivate
608
609#undef VTK_DECLARE_VALUERANGE_ARRAYTYPE
610#undef VTK_DECLARE_VALUERANGE_VALUETYPE
611
612#ifdef _MSC_VER
613#pragma warning(pop)
614#endif
615#endif // VTK_SOA_DATA_ARRAY_TEMPLATE_EXTERN
616
617#endif // VTK_GDA_VALUERANGE_INSTANTIATING
618
619// VTK-HeaderTest-Exclude: vtkGenericDataArray.h
Array-Of-Structs implementation of vtkGenericDataArray.
Abstract superclass for all arrays.
int GetNumberOfComponents() const
Set/Get the dimension (n) of the components.
vtkIdType GetNumberOfTuples() const
Get the number of complete tuples (a component group) in the array.
vtkIdType GetNumberOfValues() const
Get the total number of values in the array.
Abstract superclass to iterate over elements in an vtkAbstractArray.
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:159
internal class used by vtkGenericDataArray to support LookupValue.
Base interface for all typed vtkDataArray subclasses.
vtkTypeBool Allocate(vtkIdType size, vtkIdType ext=1000) override
Allocate memory for this array.
virtual void FillValue(ValueType value)
Set all the values in array to value.
std::vector< ValueType > LegacyValueRange
void SetNumberOfComponents(int num) override
Set/Get the dimension (n) of the components.
ValueType * GetFiniteValueRange()
These methods are analogous to the GetValueRange methods, except that the only consider finite values...
void DataChanged() override
Tell the array explicitly that the data has changed.
void InsertComponent(vtkIdType tupleIdx, int compIdx, double value) override
Insert value at the location specified by tupleIdx and compIdx.
vtkIdType LookupValue(vtkVariant value) override
Return the value indices where a specific value appears.
double GetComponent(vtkIdType tupleIdx, int compIdx) override
Return the data component at the location specified by tupleIdx and compIdx.
void InsertVariantValue(vtkIdType valueIdx, vtkVariant value) override
Insert a value into the array from a variant.
bool ComputeFiniteVectorValueRange(ValueType range[2])
Returns true if the range was computed.
void SetTuple(vtkIdType tupleIdx, const double *tuple) override
Set the data tuple at tupleIdx.
std::vector< ValueType > LegacyValueRangeFull
void InsertTuple(vtkIdType tupleIdx, const float *source) override
Insert the data tuple at tupleIdx.
ValueType * GetPointer(vtkIdType valueIdx)
Default implementation raises a runtime error.
void RemoveTuple(vtkIdType tupleIdx) override
Removes a tuple at the given index.
void InsertTypedTuple(vtkIdType tupleIdx, const ValueType *t)
Insert (memory allocation performed) the tuple t at tupleIdx.
void SetNumberOfTuples(vtkIdType number) override
Set the number of tuples (a component group) in the array.
vtkTypeBool Resize(vtkIdType numTuples) override
Resize the array to the requested number of tuples and preserve data.
ValueType * WritePointer(vtkIdType valueIdx, vtkIdType numValues)
Default implementation raises a runtime error.
double * GetTuple(vtkIdType tupleIdx) override
Get the data tuple at tupleIdx.
void InsertTuple(vtkIdType dstTupleIdx, vtkIdType srcTupleIdx, vtkAbstractArray *source) override
Insert the tuple at srcTupleIdx in the source array into this array at dstTupleIdx.
vtkTemplateTypeMacro(SelfType, vtkDataArray)
void * GetVoidPointer(vtkIdType valueIdx) override
Default implementation raises a runtime error.
void FillComponent(int compIdx, double value) override
Fill a component of a data array with a specified value.
void GetValueRange(ValueType range[2], int comp)
Get the range of array values for the given component in the native data type.
void GetValueRange(ValueType range[2])
void SetVoidArray(void *, vtkIdType, int, int) override
Default implementation raises a runtime error.
vtkIdType Capacity()
Return the capacity in typeof T units of the current array.
void SetVariantValue(vtkIdType valueIdx, vtkVariant value) override
Set a value in the array from a variant.
vtkVariant GetVariantValue(vtkIdType valueIdx) override
Retrieve value from the array as a variant.
void InsertTypedComponent(vtkIdType tupleIdx, int compIdx, ValueType val)
Insert (memory allocation performed) the value at the specified tuple and component location.
void ClearLookup() override
Delete the associated fast lookup data structure on this array, if it exists.
void GetTuple(vtkIdType tupleIdx, double *tuple) override
Get the data tuple at tupleIdx by filling in a user-provided array, Make sure that your array is larg...
vtkIdType InsertNextTuple(vtkIdType srcTupleIdx, vtkAbstractArray *source) override
Insert the tuple from srcTupleIdx in the source array at the end of this array.
virtual void LookupTypedValue(ValueType value, vtkIdList *valueIds)
vtkIdType InsertNextTuple(const double *tuple) override
Insert the data tuple at the end of the array and return the tuple index at which the data was insert...
void GetTuples(vtkIdType p1, vtkIdType p2, vtkAbstractArray *output) override
Get the tuples for the range of tuple ids specified (i.e., p1->p2 inclusive).
void SetVoidArray(void *, vtkIdType, int) override
Default implementation raises a runtime error.
void InterpolateTuple(vtkIdType dstTupleIdx, vtkIdList *ptIndices, vtkAbstractArray *source, double *weights) override
Set the tuple at dstTupleIdx in this array to the interpolated tuple value, given the ptIndices in th...
void ComputeFiniteValueRange(ValueType range[2], int comp)
Compute the range for a specific component.
vtkIdType InsertNextTuple(const float *tuple) override
Insert the data tuple at the end of the array and return the tuple index at which the data was insert...
virtual vtkIdType LookupTypedValue(ValueType value)
virtual void FillTypedComponent(int compIdx, ValueType value)
Set component comp of all tuples to value.
bool HasStandardMemoryLayout() const override
Returns true if this array uses the standard memory layout defined in the VTK user guide,...
int GetDataTypeSize() const override
Return the size of the underlying data type.
ValueType * GetFiniteValueRange(int comp)
These methods are analogous to the GetValueRange methods, except that the only consider finite values...
void SetArrayFreeFunction(void(*callback)(void *)) override
Default implementation raises a runtime error.
void GetFiniteValueRange(ValueType range[2], int comp)
These methods are analogous to the GetValueRange methods, except that the only consider finite values...
void SetTuple(vtkIdType tupleIdx, const float *tuple) override
Set the data tuple at tupleIdx.
~vtkGenericDataArray() override
vtkArrayIterator * NewIterator() override
Subclasses must override this method and provide the right kind of templated vtkArrayIteratorTemplate...
void LookupValue(vtkVariant value, vtkIdList *valueIds) override
Return the value indices where a specific value appears.
void InsertValue(vtkIdType valueIdx, ValueType value)
Insert data at a specified position in the array.
bool ComputeVectorValueRange(ValueType range[2])
Returns true if the range was computed.
void InterpolateTuple(vtkIdType dstTupleIdx, vtkIdType srcTupleIdx1, vtkAbstractArray *source1, vtkIdType srcTupleIdx2, vtkAbstractArray *source2, double t) override
Insert the tuple at dstTupleIdx in this array to the tuple interpolated from the two tuple indices,...
void InsertTuple(vtkIdType tupleIdx, const double *source) override
Insert the data tuple at tupleIdx.
void InsertTuples(vtkIdType dstStart, vtkIdType n, vtkIdType srcStart, vtkAbstractArray *source) override
Copy n consecutive tuples starting at srcStart from the source array to this array,...
void GetFiniteValueRange(ValueType range[2])
These methods are analogous to the GetValueRange methods, except that the only consider finite values...
void Squeeze() override
Free any unnecessary memory.
bool ComputeFiniteScalarValueRange(ValueType *ranges)
Computes the range for each component of an array, the length of ranges must be two times the number ...
bool EnsureAccessToTuple(vtkIdType tupleIdx)
vtkGenericDataArrayLookupHelper< SelfType > Lookup
std::vector< double > LegacyTuple
ValueType * GetValueRange(int comp)
Get the range of array values for the given component in the native data type.
void InsertTuples(vtkIdList *dstIds, vtkIdList *srcIds, vtkAbstractArray *source) override
Copy the tuples indexed in srcIds from the source array to the tuple locations indexed by dstIds in t...
void * WriteVoidPointer(vtkIdType valueIdx, vtkIdType numValues) override
Default implementation raises a runtime error.
int GetDataType() const override
Return the underlying data type.
bool ComputeScalarValueRange(ValueType *ranges)
Computes the range for each component of an array, the length of ranges must be two times the number ...
void GetTuples(vtkIdList *tupleIds, vtkAbstractArray *output) override
Given a list of tuple ids, return an array of tuples.
void SetComponent(vtkIdType tupleIdx, int compIdx, double value) override
Set the data component at the location specified by tupleIdx and compIdx to value.
vtkIdType InsertNextValue(ValueType value)
Insert data at the end of the array.
void ComputeValueRange(ValueType range[2], int comp)
Compute the range for a specific component.
vtkIdType InsertNextTypedTuple(const ValueType *t)
Insert (memory allocation performed) the tuple onto the end of the array.
void SetTuple(vtkIdType dstTupleIdx, vtkIdType srcTupleIdx, vtkAbstractArray *source) override
Set the tuple at dstTupleIdx in this array to the tuple at srcTupleIdx in the source array.
ValueType * GetValueRange()
Get the range of array values for the 0th component in the native data type.
void Initialize() override
Release storage and reset array to initial state.
list of point or cell ids
Definition: vtkIdList.h:140
Struct-Of-Arrays implementation of vtkGenericDataArray.
Struct-Of-Arrays implementation of vtkGenericDataArray with a scaling factor.
A atomic type representing the union of many types.
Definition: vtkVariant.h:145
void SetValue(vtkIdType valueIdx, ValueType value)
Set the value at valueIdx to value.
void SetTypedComponent(vtkIdType tupleIdx, int compIdx, ValueType value)
Set component compIdx of the tuple at tupleIdx to value.
ValueType GetValue(vtkIdType valueIdx) const
Get the value at valueIdx.
void SetTypedTuple(vtkIdType tupleIdx, const ValueType *tuple)
Set this array's tuple at tupleIdx to the values in tuple.
void GetTypedTuple(vtkIdType tupleIdx, ValueType *tuple) const
Copy the tuple at tupleIdx into tuple.
bool ReallocateTuples(vtkIdType numTuples)
Allocate space for numTuples.
ValueType GetTypedComponent(vtkIdType tupleIdx, int compIdx) const
Get component compIdx of the tuple at tupleIdx.
bool AllocateTuples(vtkIdType numTuples)
Allocate space for numTuples.
bool DoComputeVectorRange(A *, R[2], AllValues)
bool DoComputeScalarRange(A *, R *, T)
@ value
Definition: vtkX3D.h:226
@ range
Definition: vtkX3D.h:244
@ size
Definition: vtkX3D.h:259
Template defining traits of native types used by VTK.
Definition: vtkTypeTraits.h:30
int vtkTypeBool
Definition: vtkABI.h:69
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
#define VTK_DECLARE_VALUERANGE_ARRAYTYPE(ArrayType, ValueType)
#define VTK_DECLARE_VALUERANGE_VALUETYPE(ValueType)
int vtkIdType
Definition: vtkType.h:332
#define VTK_SIZEHINT(...)
#define VTK_EXPECTS(x)
#define VTK_NEWINSTANCE