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=========================================================================*/
75#ifndef vtkGenericDataArray_h
76#define vtkGenericDataArray_h
77
78#include "vtkDataArray.h"
79
80#include "vtkCompiler.h" // for VTK_USE_EXTERN_TEMPLATE
82#include "vtkSmartPointer.h"
83#include "vtkTypeTraits.h"
84
85#include <cassert>
86
87template <class DerivedT, class ValueTypeT>
89{
91
92public:
93 typedef ValueTypeT ValueType;
95
99 enum
100 {
102 };
103
108
116 inline ValueType GetValue(vtkIdType valueIdx) const
117 {
118 return static_cast<const DerivedT*>(this)->GetValue(valueIdx);
119 }
120
129 VTK_EXPECTS(0 <= valueIdx && valueIdx < GetNumberOfValues())
130 {
131 static_cast<DerivedT*>(this)->SetValue(valueIdx, value);
132 }
133
142 void GetTypedTuple(vtkIdType tupleIdx, ValueType* tuple) const
143 VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples())
144 {
145 static_cast<const DerivedT*>(this)->GetTypedTuple(tupleIdx, tuple);
146 }
147
156 void SetTypedTuple(vtkIdType tupleIdx, const ValueType* tuple)
157 VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples())
158 {
159 static_cast<DerivedT*>(this)->SetTypedTuple(tupleIdx, tuple);
160 }
161
167 ValueType GetTypedComponent(vtkIdType tupleIdx, int compIdx) const VTK_EXPECTS(0 <= tupleIdx &&
168 tupleIdx < GetNumberOfTuples()) VTK_EXPECTS(0 <= compIdx && compIdx < GetNumberOfComponents())
169 {
170 return static_cast<const DerivedT*>(this)->GetTypedComponent(tupleIdx, compIdx);
171 }
172
178 void SetTypedComponent(vtkIdType tupleIdx, int compIdx, ValueType value)
179 VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples())
180 VTK_EXPECTS(0 <= compIdx && compIdx < GetNumberOfComponents())
181 {
182 static_cast<DerivedT*>(this)->SetTypedComponent(tupleIdx, compIdx, value);
183 }
184
186
190 void* GetVoidPointer(vtkIdType valueIdx) override;
192 void SetVoidArray(void*, vtkIdType, int) override;
193 void SetVoidArray(void*, vtkIdType, int, int) override;
194 void SetArrayFreeFunction(void (*callback)(void*)) override;
195 void* WriteVoidPointer(vtkIdType valueIdx, vtkIdType numValues) override;
198
205 void RemoveTuple(vtkIdType tupleIdx) override;
206
211
216
220 void InsertTypedTuple(vtkIdType tupleIdx, const ValueType* t);
221
226
231 void InsertTypedComponent(vtkIdType tupleIdx, int compIdx, ValueType val);
232
234
238 void GetValueRange(ValueType range[2], int comp);
241
247 void GetValueRange(ValueType range[2]) { this->GetValueRange(range, 0); }
248
257 void GetFiniteValueRange(ValueType range[2]) { this->GetFiniteValueRange(range, 0); }
264 vtkIdType Capacity() { return this->Size; }
265
269 virtual void FillTypedComponent(int compIdx, ValueType value);
270
274 virtual void FillValue(ValueType value);
275
276 int GetDataType() const override;
277 int GetDataTypeSize() const override;
278 bool HasStandardMemoryLayout() const override;
280 vtkTypeBool Resize(vtkIdType numTuples) override;
281 void SetNumberOfComponents(int num) override;
282 void SetNumberOfTuples(vtkIdType number) override;
283 void Initialize() override;
284 void Squeeze() override;
285 void SetTuple(vtkIdType dstTupleIdx, vtkIdType srcTupleIdx, vtkAbstractArray* source) override;
286 // MSVC doesn't like 'using' here (error C2487). Just forward instead:
287 // using Superclass::SetTuple;
288 void SetTuple(vtkIdType tupleIdx, const float* tuple) override
289 {
290 this->Superclass::SetTuple(tupleIdx, tuple);
291 }
292 void SetTuple(vtkIdType tupleIdx, const double* tuple) override
293 {
294 this->Superclass::SetTuple(tupleIdx, tuple);
295 }
296
297 void InsertTuples(vtkIdList* dstIds, vtkIdList* srcIds, vtkAbstractArray* source) override;
298 // MSVC doesn't like 'using' here (error C2487). Just forward instead:
299 // using Superclass::InsertTuples;
301 vtkIdType dstStart, vtkIdType n, vtkIdType srcStart, vtkAbstractArray* source) override
302 {
303 this->Superclass::InsertTuples(dstStart, n, srcStart, source);
304 }
305
306 void InsertTuple(vtkIdType dstTupleIdx, vtkIdType srcTupleIdx, vtkAbstractArray* source) override;
307 void InsertTuple(vtkIdType tupleIdx, const float* source) override;
308 void InsertTuple(vtkIdType tupleIdx, const double* source) override;
309 void InsertComponent(vtkIdType tupleIdx, int compIdx, double value) override;
311 vtkIdType InsertNextTuple(const float* tuple) override;
312 vtkIdType InsertNextTuple(const double* tuple) override;
313 void GetTuples(vtkIdList* tupleIds, vtkAbstractArray* output) override;
314 void GetTuples(vtkIdType p1, vtkIdType p2, vtkAbstractArray* output) override;
315 double* GetTuple(vtkIdType tupleIdx) override;
316 void GetTuple(vtkIdType tupleIdx, double* tuple) override;
318 double* weights) override;
319 void InterpolateTuple(vtkIdType dstTupleIdx, vtkIdType srcTupleIdx1, vtkAbstractArray* source1,
320 vtkIdType srcTupleIdx2, vtkAbstractArray* source2, double t) override;
321 void SetComponent(vtkIdType tupleIdx, int compIdx, double value) override;
322 double GetComponent(vtkIdType tupleIdx, int compIdx) override;
323 void SetVariantValue(vtkIdType valueIdx, vtkVariant value) override;
328 void LookupValue(vtkVariant value, vtkIdList* valueIds) override;
329 virtual void LookupTypedValue(ValueType value, vtkIdList* valueIds);
330 void ClearLookup() override;
331 void DataChanged() override;
332 void FillComponent(int compIdx, double value) override;
334
335protected:
338
344 inline bool AllocateTuples(vtkIdType numTuples)
345 {
346 return static_cast<DerivedT*>(this)->AllocateTuples(numTuples);
347 }
348
354 inline bool ReallocateTuples(vtkIdType numTuples)
355 {
356 return static_cast<DerivedT*>(this)->ReallocateTuples(numTuples);
357 }
358
359 // This method resizes the array if needed so that the given tuple index is
360 // valid/accessible.
362
371
380
388
394
402
408
409 std::vector<double> LegacyTuple;
410 std::vector<ValueType> LegacyValueRange;
411 std::vector<ValueType> LegacyValueRangeFull;
412
414
415private:
417 void operator=(const vtkGenericDataArray&) = delete;
418};
419
420// these predeclarations are needed before the .txx include for MinGW
421namespace vtkDataArrayPrivate
422{
423template <typename A, typename R, typename T>
424bool DoComputeScalarRange(A*, R*, T);
425template <typename A, typename R>
427template <typename A, typename R>
429} // namespace vtkDataArrayPrivate
430
431#include "vtkGenericDataArray.txx"
432
433// Adds an implementation of NewInstanceInternal() that returns an AoS
434// (unmapped) VTK array, if possible. This allows the pipeline to copy and
435// propagate the array when the array data is not modifiable. Use this in
436// combination with vtkAbstractTypeMacro or vtkAbstractTemplateTypeMacro
437// (instead of vtkTypeMacro) to avoid adding the default NewInstance
438// implementation.
439#define vtkAOSArrayNewInstanceMacro(thisClass) \
440protected: \
441 vtkObjectBase* NewInstanceInternal() const override \
442 { \
443 if (vtkDataArray* da = vtkDataArray::CreateDataArray(thisClass::VTK_DATA_TYPE)) \
444 { \
445 return da; \
446 } \
447 return thisClass::New(); \
448 } \
449 \
450public:
451
452#endif
453
454// This portion must be OUTSIDE the include blockers. This is used to tell
455// libraries other than vtkCommonCore that instantiations of
456// the GetValueRange lookups can be found externally. This prevents each library
457// from instantiating these on their own.
458// Additionally it helps hide implementation details that pull in system
459// headers.
460// We only provide these specializations for the 64-bit integer types, since
461// other types can reuse the double-precision mechanism in
462// vtkDataArray::GetRange without losing precision.
463#ifdef VTK_GDA_VALUERANGE_INSTANTIATING
464
465// Forward declare necessary stuffs:
466template <typename ValueType>
468template <typename ValueType>
470
471#ifdef VTK_USE_SCALED_SOA_ARRAYS
472template <typename ValueType>
474#endif
475
476#define VTK_INSTANTIATE_VALUERANGE_ARRAYTYPE(ArrayType, ValueType) \
477 template VTKCOMMONCORE_EXPORT bool DoComputeScalarRange( \
478 ArrayType*, ValueType*, vtkDataArrayPrivate::AllValues); \
479 template VTKCOMMONCORE_EXPORT bool DoComputeScalarRange( \
480 ArrayType*, ValueType*, vtkDataArrayPrivate::FiniteValues); \
481 template VTKCOMMONCORE_EXPORT bool DoComputeVectorRange( \
482 ArrayType*, ValueType[2], vtkDataArrayPrivate::AllValues); \
483 template VTKCOMMONCORE_EXPORT bool DoComputeVectorRange( \
484 ArrayType*, ValueType[2], vtkDataArrayPrivate::FiniteValues);
485
486#ifdef VTK_USE_SCALED_SOA_ARRAYS
487
488#define VTK_INSTANTIATE_VALUERANGE_VALUETYPE(ValueType) \
489 VTK_INSTANTIATE_VALUERANGE_ARRAYTYPE(vtkAOSDataArrayTemplate<ValueType>, ValueType) \
490 VTK_INSTANTIATE_VALUERANGE_ARRAYTYPE(vtkSOADataArrayTemplate<ValueType>, ValueType) \
491 VTK_INSTANTIATE_VALUERANGE_ARRAYTYPE(vtkScaledSOADataArrayTemplate<ValueType>, ValueType)
492
493#else // VTK_USE_SCALED_SOA_ARRAYS
494
495#define VTK_INSTANTIATE_VALUERANGE_VALUETYPE(ValueType) \
496 VTK_INSTANTIATE_VALUERANGE_ARRAYTYPE(vtkAOSDataArrayTemplate<ValueType>, ValueType) \
497 VTK_INSTANTIATE_VALUERANGE_ARRAYTYPE(vtkSOADataArrayTemplate<ValueType>, ValueType)
498
499#endif
500
501#elif defined(VTK_USE_EXTERN_TEMPLATE) // VTK_GDA_VALUERANGE_INSTANTIATING
502
503#ifndef VTK_GDA_TEMPLATE_EXTERN
504#define VTK_GDA_TEMPLATE_EXTERN
505#ifdef _MSC_VER
506#pragma warning(push)
507// The following is needed when the following is declared
508// dllexport and is used from another class in vtkCommonCore
509#pragma warning(disable : 4910) // extern and dllexport incompatible
510#endif
511
512// Forward declare necessary stuffs:
513template <typename ValueType>
515template <typename ValueType>
517
518#ifdef VTK_USE_SCALED_SOA_ARRAYS
519template <typename ValueType>
521#endif
522
523namespace vtkDataArrayPrivate
524{
525template <typename A, typename R, typename T>
526bool DoComputeScalarRange(A*, R*, T);
527template <typename A, typename R>
528bool DoComputeVectorRange(A*, R[2], AllValues);
529template <typename A, typename R>
530bool DoComputeVectorRange(A*, R[2], FiniteValues);
531} // namespace vtkDataArrayPrivate
532
533#define VTK_DECLARE_VALUERANGE_ARRAYTYPE(ArrayType, ValueType) \
534 extern template VTKCOMMONCORE_EXPORT bool DoComputeScalarRange( \
535 ArrayType*, ValueType*, vtkDataArrayPrivate::AllValues); \
536 extern template VTKCOMMONCORE_EXPORT bool DoComputeScalarRange( \
537 ArrayType*, ValueType*, vtkDataArrayPrivate::FiniteValues); \
538 extern template VTKCOMMONCORE_EXPORT bool DoComputeVectorRange( \
539 ArrayType*, ValueType[2], vtkDataArrayPrivate::AllValues); \
540 extern template VTKCOMMONCORE_EXPORT bool DoComputeVectorRange( \
541 ArrayType*, ValueType[2], vtkDataArrayPrivate::FiniteValues);
542
543#ifdef VTK_USE_SCALED_SOA_ARRAYS
544
545#define VTK_DECLARE_VALUERANGE_VALUETYPE(ValueType) \
546 VTK_DECLARE_VALUERANGE_ARRAYTYPE(vtkAOSDataArrayTemplate<ValueType>, ValueType) \
547 VTK_DECLARE_VALUERANGE_ARRAYTYPE(vtkSOADataArrayTemplate<ValueType>, ValueType) \
548 VTK_DECLARE_VALUERANGE_ARRAYTYPE(vtkScaledSOADataArrayTemplate<ValueType>, ValueType)
549
550#else // VTK_USE_SCALED_SOA_ARRAYS
551
552#define VTK_DECLARE_VALUERANGE_VALUETYPE(ValueType) \
553 VTK_DECLARE_VALUERANGE_ARRAYTYPE(vtkAOSDataArrayTemplate<ValueType>, ValueType) \
554 VTK_DECLARE_VALUERANGE_ARRAYTYPE(vtkSOADataArrayTemplate<ValueType>, ValueType)
555
556#endif
557
558namespace vtkDataArrayPrivate
559{
560// These are instantiated in vtkGenericDataArrayValueRange${i}.cxx
564VTK_DECLARE_VALUERANGE_VALUETYPE(unsigned long long)
565
566// This is instantiated in vtkGenericDataArray.cxx
568
569// These are instantiated in vtkFloatArray.cxx, vtkDoubleArray.cxx, etc
583
584// These are instantiated in vtkSOADataArrayTemplateInstantiate${i}.cxx
598
599// These are instantiated in vtkScaledSOADataArrayTemplateInstantiate${i}.cxx
600#ifdef VTK_USE_SCALED_SOA_ARRAYS
614#endif // VTK_USE_SCALED_SOA_ARRAYS
615
616} // namespace vtkDataArrayPrivate
617
618#undef VTK_DECLARE_VALUERANGE_ARRAYTYPE
619#undef VTK_DECLARE_VALUERANGE_VALUETYPE
620
621#ifdef _MSC_VER
622#pragma warning(pop)
623#endif
624#endif // VTK_SOA_DATA_ARRAY_TEMPLATE_EXTERN
625
626#endif // VTK_GDA_VALUERANGE_INSTANTIATING
627
628// 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:59
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:40
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:75
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