VTK-m  2.0
worklet/PointTransform.h
Go to the documentation of this file.
1 //============================================================================
2 // Copyright (c) Kitware, Inc.
3 // All rights reserved.
4 // See LICENSE.txt for details.
5 //
6 // This software is distributed WITHOUT ANY WARRANTY; without even
7 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
8 // PURPOSE. See the above copyright notice for more information.
9 //============================================================================
10 
11 #ifndef vtk_m_worklet_PointTransform_h
12 #define vtk_m_worklet_PointTransform_h
13 
14 #include <vtkm/Math.h>
15 #include <vtkm/Matrix.h>
16 #include <vtkm/Transform3D.h>
18 
19 namespace vtkm
20 {
21 namespace worklet
22 {
23 
25 {
26 public:
28  using ExecutionSignature = _2(_1);
29 
30  VTKM_CONT
32  : matrix(m)
33  {
34  }
35 
36  //Functor
37  VTKM_EXEC
39  {
40  return vtkm::Transform3DPoint(matrix, vec);
41  }
42 
43 private:
45 };
46 }
47 } // namespace vtkm::worklet
48 
49 #endif // vtk_m_worklet_PointTransform_h
VTKM_EXEC
#define VTKM_EXEC
Definition: ExportMacros.h:51
vtkm
Groups connected points that have the same field value.
Definition: Atomic.h:19
vtkm::worklet::PointTransform::ExecutionSignature
_2(_1) ExecutionSignature
Definition: worklet/PointTransform.h:28
WorkletMapField.h
vtkm::worklet::WorkletMapField::FieldOut
A control signature tag for output fields.
Definition: WorkletMapField.h:60
vtkm::Transform3DPoint
VTKM_EXEC_CONT vtkm::Vec< T, 3 > Transform3DPoint(const vtkm::Matrix< T, 4, 4 > &matrix, const vtkm::Vec< T, 3 > &point)
Transform a 3D point by a transformation matrix.
Definition: Transform3D.h:34
vtkm::worklet::PointTransform::matrix
const vtkm::Matrix< vtkm::FloatDefault, 4, 4 > matrix
Definition: worklet/PointTransform.h:44
Matrix.h
Math.h
vtkm::worklet::WorkletMapField::FieldIn
A control signature tag for input fields.
Definition: WorkletMapField.h:49
vtkm::worklet::PointTransform::ControlSignature
void(FieldIn, FieldOut) ControlSignature
Definition: worklet/PointTransform.h:27
VTKM_CONT
#define VTKM_CONT
Definition: ExportMacros.h:57
vtkm::worklet::PointTransform::operator()
VTKM_EXEC vtkm::Vec< vtkm::FloatDefault, 3 > operator()(const vtkm::Vec< vtkm::FloatDefault, 3 > &vec) const
Definition: worklet/PointTransform.h:38
Transform3D.h
vtkm::worklet::PointTransform
Definition: worklet/PointTransform.h:24
vtkm::Vec< vtkm::FloatDefault, 3 >
vtkm::Matrix< vtkm::FloatDefault, 4, 4 >
vtkm::worklet::PointTransform::PointTransform
VTKM_CONT PointTransform(const vtkm::Matrix< vtkm::FloatDefault, 4, 4 > &m)
Definition: worklet/PointTransform.h:31
vtkm::worklet::WorkletMapField
Base class for worklets that do a simple mapping of field arrays.
Definition: WorkletMapField.h:38