VTK  9.7.1
vtkAffineImplicitBackend.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
3 // Funded by CEA, DAM, DIF, F-91297 Arpajon, France
4 #ifndef vtkAffineImplicitBackend_h
5 #define vtkAffineImplicitBackend_h
6 
7 #include "vtkCommonCoreModule.h"
8 
9 #include "vtkType.h"
10 
35 VTK_ABI_NAMESPACE_BEGIN
36 template <typename ValueType>
37 struct VTKCOMMONCORE_EXPORT vtkAffineImplicitBackend final
38 {
45  vtkAffineImplicitBackend(ValueType slope, ValueType intercept);
46 
53  ValueType operator()(vtkIdType index) const;
54 
58  ValueType Slope;
62  ValueType Intercept;
63 };
64 VTK_ABI_NAMESPACE_END
65 
66 #if defined(VTK_AFFINE_BACKEND_INSTANTIATING)
67 
68 #define VTK_INSTANTIATE_AFFINE_BACKEND(ValueType) \
69  VTK_ABI_NAMESPACE_BEGIN \
70  template struct VTKCOMMONCORE_EXPORT vtkAffineImplicitBackend<ValueType>; \
71  VTK_ABI_NAMESPACE_END
72 
73 #elif defined(VTK_USE_EXTERN_TEMPLATE)
74 
75 #ifndef VTK_AFFINE_BACKEND_TEMPLATE_EXTERN
76 #define VTK_AFFINE_BACKEND_TEMPLATE_EXTERN
77 #ifdef _MSC_VER
78 #pragma warning(push)
79 #pragma warning(disable : 4910) // extern and dllexport incompatible
80 #endif
81 VTK_ABI_NAMESPACE_BEGIN
82 vtkExternTemplateMacro(extern template struct VTKCOMMONCORE_EXPORT vtkAffineImplicitBackend);
83 VTK_ABI_NAMESPACE_END
84 #ifdef _MSC_VER
85 #pragma warning(pop)
86 #endif
87 #endif // VTK_AFFINE_IMPLICIT_BACKEND_TEMPLATE_EXTERN
88 
89 #endif
90 #endif // vtkAffineImplicitBackend_h
ValueType Intercept
The value of the affine function at index 0.
int vtkIdType
Definition: vtkType.h:363
vtkExternTemplateMacro(extern template struct VTKCOMMONCORE_EXPORT vtkAffineImplicitBackend)
ValueType Slope
The slope of the affine function on the indices.
A utility structure serving as a backend for affine (as a function of the index) implicit arrays...