VTK-m  2.0
RayOperations.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 #ifndef vtk_m_rendering_raytracing_Ray_Operations_h
11 #define vtk_m_rendering_raytracing_Ray_Operations_h
12 
13 #include <vtkm/Matrix.h>
14 #include <vtkm/rendering/Camera.h>
19 #include <vtkm/rendering/vtkm_rendering_export.h>
20 
21 namespace vtkm
22 {
23 namespace rendering
24 {
25 namespace raytracing
26 {
27 namespace detail
28 {
29 
30 class RayStatusFilter : public vtkm::worklet::WorkletMapField
31 {
32 public:
33  VTKM_CONT
34  RayStatusFilter() {}
35  using ControlSignature = void(FieldIn, FieldInOut);
36  using ExecutionSignature = void(_1, _2);
37  VTKM_EXEC
38  void operator()(const vtkm::Id& hitIndex, vtkm::UInt8& rayStatus) const
39  {
40  if (hitIndex == -1)
41  rayStatus = RAY_EXITED_DOMAIN;
42  else if (rayStatus != RAY_EXITED_DOMAIN && rayStatus != RAY_TERMINATED)
43  rayStatus = RAY_ACTIVE;
44  //else printf("Bad status state %d \n",(int)rayStatus);
45  }
46 }; //class RayStatusFileter
47 
48 class RayMapCanvas : public vtkm::worklet::WorkletMapField
49 {
50 protected:
51  vtkm::Matrix<vtkm::Float32, 4, 4> InverseProjView;
53  vtkm::Float32 DoubleInvHeight;
54  vtkm::Float32 DoubleInvWidth;
55  vtkm::Vec3f_32 Origin;
56 
57 public:
58  VTKM_CONT
59  RayMapCanvas(const vtkm::Matrix<vtkm::Float32, 4, 4>& inverseProjView,
60  const vtkm::Id width,
61  const vtkm::Id height,
62  const vtkm::Vec3f_32& origin)
63  : InverseProjView(inverseProjView)
64  , Width(width)
65  , Origin(origin)
66  {
67  VTKM_ASSERT(width > 0);
68  VTKM_ASSERT(height > 0);
69  DoubleInvHeight = 2.f / static_cast<vtkm::Float32>(height);
70  DoubleInvWidth = 2.f / static_cast<vtkm::Float32>(width);
71  }
72 
73  using ControlSignature = void(FieldIn, FieldInOut, FieldIn, WholeArrayIn);
74  using ExecutionSignature = void(_1, _2, _3, _4);
75 
76  template <typename Precision, typename DepthPortalType>
77  VTKM_EXEC void operator()(const vtkm::Id& pixelId,
78  Precision& maxDistance,
79  const Vec<Precision, 3>& origin,
80  const DepthPortalType& depths) const
81  {
82  vtkm::Vec4f_32 position;
83  position[0] = static_cast<vtkm::Float32>(pixelId % Width);
84  position[1] = static_cast<vtkm::Float32>(pixelId / Width);
85  position[2] = static_cast<vtkm::Float32>(depths.Get(pixelId));
86  position[3] = 1;
87  // transform into normalized device coordinates (-1,1)
88  position[0] = position[0] * DoubleInvWidth - 1.f;
89  position[1] = position[1] * DoubleInvHeight - 1.f;
90  position[2] = 2.f * position[2] - 1.f;
91  // offset so we don't go all the way to the same point
92  position[2] -= 0.00001f;
93  position = vtkm::MatrixMultiply(InverseProjView, position);
95  p[0] = position[0] / position[3];
96  p[1] = position[1] / position[3];
97  p[2] = position[2] / position[3];
98  p = p - origin;
99 
100 
101  maxDistance = vtkm::Magnitude(p);
102  }
103 }; //class RayMapMinDistances
104 
105 } // namespace detail
107 {
108 public:
109  template <typename T>
110  static void ResetStatus(Ray<T>& rays, vtkm::UInt8 status)
111  {
112  vtkm::cont::ArrayHandleConstant<vtkm::UInt8> statusHandle(status, rays.NumRays);
113  vtkm::cont::Algorithm::Copy(statusHandle, rays.Status);
114  }
115 
116  //
117  // Some worklets like triangle intersection do not set the
118  // ray status, so this operation sets the status based on
119  // the ray hit index
120  //
121  template <typename Device, typename T>
122  static void UpdateRayStatus(Ray<T>& rays, Device)
123  {
125  detail::RayStatusFilter{}) };
126  dispatcher.SetDevice(Device());
127  dispatcher.Invoke(rays.HitIdx, rays.Status);
128  }
129 
130  template <typename T>
131  static void UpdateRayStatus(Ray<T>& rays)
132  {
134  detail::RayStatusFilter{}) };
135  dispatcher.Invoke(rays.HitIdx, rays.Status);
136  }
137 
138  VTKM_RENDERING_EXPORT static void MapCanvasToRays(Ray<vtkm::Float32>& rays,
139  const vtkm::rendering::Camera& camera,
140  const vtkm::rendering::CanvasRayTracer& canvas);
141 
142  template <typename T>
143  static vtkm::Id RaysInMesh(Ray<T>& rays)
144  {
145  vtkm::Vec<UInt8, 2> maskValues;
146  maskValues[0] = RAY_ACTIVE;
147  maskValues[1] = RAY_LOST;
148 
150 
152  ManyMask<vtkm::UInt8, 2>{ maskValues }) };
153  dispatcher.Invoke(rays.Status, masks);
155  const vtkm::Id initVal = 0;
156  vtkm::Id count = vtkm::cont::Algorithm::Reduce(castedMasks, initVal);
157 
158  return count;
159  }
160 
161  template <typename T>
162  static vtkm::Id GetStatusCount(Ray<T>& rays, vtkm::Id status)
163  {
164  vtkm::UInt8 statusUInt8;
165  if (status < 0 || status > 255)
166  {
167  throw vtkm::cont::ErrorBadValue("Rays GetStatusCound: invalid status");
168  }
169 
170  statusUInt8 = static_cast<vtkm::UInt8>(status);
172 
174  Mask<vtkm::UInt8>{ statusUInt8 }) };
175  dispatcher.Invoke(rays.Status, masks);
177  const vtkm::Id initVal = 0;
178  vtkm::Id count = vtkm::cont::Algorithm::Reduce(castedMasks, initVal);
179 
180  return count;
181  }
182 
183  template <typename T>
185  {
186  vtkm::Vec<UInt8, 3> maskValues;
187  maskValues[0] = RAY_TERMINATED;
188  maskValues[1] = RAY_EXITED_DOMAIN;
189  maskValues[2] = RAY_ABANDONED;
190 
192 
194  ManyMask<vtkm::UInt8, 3>{ maskValues }) };
195  dispatcher.Invoke(rays.Status, masks);
197  const vtkm::Id initVal = 0;
198  vtkm::Id count = vtkm::cont::Algorithm::Reduce(castedMasks, initVal);
199 
200  return count;
201  }
202 
203  template <typename T>
205  {
206  vtkm::Vec<UInt8, 1> maskValues;
207  maskValues[0] = RAY_ACTIVE;
208  vtkm::UInt8 statusUInt8 = static_cast<vtkm::UInt8>(RAY_ACTIVE);
210 
212  Mask<vtkm::UInt8>{ statusUInt8 }) };
213  dispatcher.Invoke(rays.Status, masks);
214 
215  vtkm::cont::ArrayHandle<T> emptyHandle;
216 
217  rays.Normal =
218  vtkm::cont::make_ArrayHandleCompositeVector(emptyHandle, emptyHandle, emptyHandle);
219  rays.Origin =
220  vtkm::cont::make_ArrayHandleCompositeVector(emptyHandle, emptyHandle, emptyHandle);
221  rays.Dir = vtkm::cont::make_ArrayHandleCompositeVector(emptyHandle, emptyHandle, emptyHandle);
222 
223  const vtkm::Int32 numFloatArrays = 18;
224  vtkm::cont::ArrayHandle<T>* floatArrayPointers[numFloatArrays];
225  floatArrayPointers[0] = &rays.OriginX;
226  floatArrayPointers[1] = &rays.OriginY;
227  floatArrayPointers[2] = &rays.OriginZ;
228  floatArrayPointers[3] = &rays.DirX;
229  floatArrayPointers[4] = &rays.DirY;
230  floatArrayPointers[5] = &rays.DirZ;
231  floatArrayPointers[6] = &rays.Distance;
232  floatArrayPointers[7] = &rays.MinDistance;
233  floatArrayPointers[8] = &rays.MaxDistance;
234 
235  floatArrayPointers[9] = &rays.Scalar;
236  floatArrayPointers[10] = &rays.IntersectionX;
237  floatArrayPointers[11] = &rays.IntersectionY;
238  floatArrayPointers[12] = &rays.IntersectionZ;
239  floatArrayPointers[13] = &rays.U;
240  floatArrayPointers[14] = &rays.V;
241  floatArrayPointers[15] = &rays.NormalX;
242  floatArrayPointers[16] = &rays.NormalY;
243  floatArrayPointers[17] = &rays.NormalZ;
244 
245  const int breakPoint = rays.IntersectionDataEnabled ? -1 : 9;
246  for (int i = 0; i < numFloatArrays; ++i)
247  {
248  if (i == breakPoint)
249  {
250  break;
251  }
252  vtkm::cont::ArrayHandle<T> compacted;
253  vtkm::cont::Algorithm::CopyIf(*floatArrayPointers[i], masks, compacted);
254  *floatArrayPointers[i] = compacted;
255  }
256 
257  //
258  // restore the composite vectors
259  //
260  rays.Normal =
262  rays.Origin =
265 
266  vtkm::cont::ArrayHandle<vtkm::Id> compactedHits;
267  vtkm::cont::Algorithm::CopyIf(rays.HitIdx, masks, compactedHits);
268  rays.HitIdx = compactedHits;
269 
270  vtkm::cont::ArrayHandle<vtkm::Id> compactedPixels;
271  vtkm::cont::Algorithm::CopyIf(rays.PixelIdx, masks, compactedPixels);
272  rays.PixelIdx = compactedPixels;
273 
274  vtkm::cont::ArrayHandle<vtkm::UInt8> compactedStatus;
275  vtkm::cont::Algorithm::CopyIf(rays.Status, masks, compactedStatus);
276  rays.Status = compactedStatus;
277 
278  rays.NumRays = rays.Status.ReadPortal().GetNumberOfValues();
279 
280  const size_t bufferCount = static_cast<size_t>(rays.Buffers.size());
281  for (size_t i = 0; i < bufferCount; ++i)
282  {
283  ChannelBufferOperations::Compact(rays.Buffers[i], masks, rays.NumRays);
284  }
285  return masks;
286  }
287 
288  template <typename Device, typename T>
289  static void Resize(Ray<T>& rays, const vtkm::Int32 newSize, Device)
290  {
291  if (newSize == rays.NumRays)
292  return; //nothing to do
293 
294  rays.NumRays = newSize;
295  vtkm::cont::Token token;
296 
297  if (rays.IntersectionDataEnabled)
298  {
299  rays.IntersectionX.PrepareForOutput(rays.NumRays, Device(), token);
300  rays.IntersectionY.PrepareForOutput(rays.NumRays, Device(), token);
301  rays.IntersectionZ.PrepareForOutput(rays.NumRays, Device(), token);
302  rays.U.PrepareForOutput(rays.NumRays, Device(), token);
303  rays.V.PrepareForOutput(rays.NumRays, Device(), token);
304  rays.Scalar.PrepareForOutput(rays.NumRays, Device(), token);
305 
306  rays.NormalX.PrepareForOutput(rays.NumRays, Device(), token);
307  rays.NormalY.PrepareForOutput(rays.NumRays, Device(), token);
308  rays.NormalZ.PrepareForOutput(rays.NumRays, Device(), token);
309  }
310 
311  rays.OriginX.PrepareForOutput(rays.NumRays, Device(), token);
312  rays.OriginY.PrepareForOutput(rays.NumRays, Device(), token);
313  rays.OriginZ.PrepareForOutput(rays.NumRays, Device(), token);
314 
315  rays.DirX.PrepareForOutput(rays.NumRays, Device(), token);
316  rays.DirY.PrepareForOutput(rays.NumRays, Device(), token);
317  rays.DirZ.PrepareForOutput(rays.NumRays, Device(), token);
318 
319  rays.Distance.PrepareForOutput(rays.NumRays, Device(), token);
320  rays.MinDistance.PrepareForOutput(rays.NumRays, Device(), token);
321  rays.MaxDistance.PrepareForOutput(rays.NumRays, Device(), token);
322  rays.Status.PrepareForOutput(rays.NumRays, Device(), token);
323  rays.HitIdx.PrepareForOutput(rays.NumRays, Device(), token);
324  rays.PixelIdx.PrepareForOutput(rays.NumRays, Device(), token);
325 
326  const size_t bufferCount = static_cast<size_t>(rays.Buffers.size());
327  for (size_t i = 0; i < bufferCount; ++i)
328  {
329  rays.Buffers[i].Resize(rays.NumRays, Device());
330  }
331  }
332 
333  template <typename T>
334  static void CopyDistancesToMin(Ray<T> rays, const T offset = 0.f)
335  {
338  dispatcher.Invoke(rays.Distance, rays.MinDistance, rays.Status);
339  }
340 };
341 }
342 }
343 } // namespace vktm::rendering::raytracing
344 #endif
vtkm::cont::ArrayHandle< vtkm::UInt8 >
ChannelBufferOperations.h
vtkm::rendering::raytracing::RayOperations::CopyDistancesToMin
static void CopyDistancesToMin(Ray< T > rays, const T offset=0.f)
Definition: RayOperations.h:334
VTKM_EXEC
#define VTKM_EXEC
Definition: ExportMacros.h:51
vtkm
Groups connected points that have the same field value.
Definition: Atomic.h:19
vtkm::rendering::raytracing::Ray::Status
vtkm::cont::ArrayHandle< vtkm::UInt8 > Status
Definition: Ray.h:95
vtkm::rendering::raytracing::RayOperations::Resize
static void Resize(Ray< T > &rays, const vtkm::Int32 newSize, Device)
Definition: RayOperations.h:289
VTKM_ASSERT
#define VTKM_ASSERT(condition)
Definition: Assert.h:43
vtkm::rendering::raytracing::Ray::U
vtkm::cont::ArrayHandle< Precision > U
Definition: Ray.h:81
vtkm::Magnitude
VTKM_EXEC_CONT detail::FloatingPointReturnType< T >::Type Magnitude(const T &x)
Returns the magnitude of a vector.
Definition: VectorAnalysis.h:100
vtkm::rendering::raytracing::RayOperations::CompactActiveRays
static vtkm::cont::ArrayHandle< vtkm::UInt8 > CompactActiveRays(Ray< T > &rays)
Definition: RayOperations.h:204
vtkm::rendering::raytracing::Ray::NormalZ
vtkm::cont::ArrayHandle< Precision > NormalZ
Definition: Ray.h:85
vtkm::rendering::raytracing::Ray::Scalar
vtkm::cont::ArrayHandle< Precision > Scalar
Definition: Ray.h:86
vtkm::rendering::raytracing::Ray::OriginZ
vtkm::cont::ArrayHandle< Precision > OriginZ
Definition: Ray.h:75
Matrix.h
CanvasRayTracer.h
vtkm::rendering::raytracing::Ray::IntersectionDataEnabled
bool IntersectionDataEnabled
Definition: Ray.h:40
RAY_EXITED_DOMAIN
#define RAY_EXITED_DOMAIN
Definition: Ray.h:24
vtkm::cont::Algorithm::Copy
static VTKM_CONT bool Copy(vtkm::cont::DeviceAdapterId devId, const vtkm::cont::ArrayHandle< T, CIn > &input, vtkm::cont::ArrayHandle< U, COut > &output)
Definition: Algorithm.h:410
vtkm::rendering::raytracing::Ray::Buffers
std::vector< ChannelBuffer< Precision > > Buffers
Definition: Ray.h:97
vtkm::rendering::raytracing::Ray::NormalY
vtkm::cont::ArrayHandle< Precision > NormalY
Definition: Ray.h:84
vtkm::rendering::raytracing::Ray::IntersectionX
vtkm::cont::ArrayHandle< Precision > IntersectionX
Definition: Ray.h:68
vtkm::Id
vtkm::Int32 Id
Represents an ID (index into arrays).
Definition: Types.h:191
vtkm::rendering::raytracing::Ray::V
vtkm::cont::ArrayHandle< Precision > V
Definition: Ray.h:82
vtkm::rendering::raytracing::RayOperations::RaysProcessed
static vtkm::Id RaysProcessed(Ray< T > &rays)
Definition: RayOperations.h:184
vtkm::cont::Token
A token to hold the scope of an ArrayHandle or other object.
Definition: Token.h:35
vtkm::rendering::raytracing::Ray::MinDistance
vtkm::cont::ArrayHandle< Precision > MinDistance
Definition: Ray.h:93
vtkm::rendering::raytracing::Ray
Definition: Ray.h:37
vtkm::cont::make_ArrayHandleCompositeVector
VTKM_CONT ArrayHandleCompositeVector< ArrayTs... > make_ArrayHandleCompositeVector(const ArrayTs &... arrays)
Create a composite vector array from other arrays.
Definition: ArrayHandleCompositeVector.h:430
vtkm::rendering::raytracing::RayOperations::ResetStatus
static void ResetStatus(Ray< T > &rays, vtkm::UInt8 status)
Definition: RayOperations.h:110
vtkm::worklet::DispatcherMapField
Dispatcher for worklets that inherit from WorkletMapField.
Definition: DispatcherMapField.h:25
vtkm::MatrixMultiply
VTKM_EXEC_CONT vtkm::Matrix< T, NumRow, NumCol > MatrixMultiply(const vtkm::Matrix< T, NumRow, NumInternal > &leftFactor, const vtkm::Matrix< T, NumInternal, NumCol > &rightFactor)
Standard matrix multiplication.
Definition: Matrix.h:156
vtkm::rendering::raytracing::RayOperations::RaysInMesh
static vtkm::Id RaysInMesh(Ray< T > &rays)
Definition: RayOperations.h:143
vtkm::rendering::raytracing::Ray::DirY
vtkm::cont::ArrayHandle< Precision > DirY
Definition: Ray.h:78
vtkm::rendering::raytracing::Ray::OriginX
vtkm::cont::ArrayHandle< Precision > OriginX
Definition: Ray.h:73
vtkm::rendering::raytracing::Ray::PixelIdx
vtkm::cont::ArrayHandle< vtkm::Id > PixelIdx
Definition: Ray.h:91
vtkm::rendering::raytracing::Ray::Normal
vtkm::cont::ArrayHandleCompositeVector< vtkm::cont::ArrayHandle< Precision >, vtkm::cont::ArrayHandle< Precision >, vtkm::cont::ArrayHandle< Precision > > Normal
Definition: Ray.h:54
vtkm::cont::Algorithm::CopyIf
static VTKM_CONT void CopyIf(vtkm::cont::DeviceAdapterId devId, const vtkm::cont::ArrayHandle< T, CIn > &input, const vtkm::cont::ArrayHandle< U, CStencil > &stencil, vtkm::cont::ArrayHandle< T, COut > &output)
Definition: Algorithm.h:435
vtkm::rendering::raytracing::RayOperations
Definition: RayOperations.h:106
vtkm::rendering::raytracing::RayOperations::GetStatusCount
static vtkm::Id GetStatusCount(Ray< T > &rays, vtkm::Id status)
Definition: RayOperations.h:162
VTKM_CONT
#define VTKM_CONT
Definition: ExportMacros.h:57
vtkm::rendering::raytracing::Ray::OriginY
vtkm::cont::ArrayHandle< Precision > OriginY
Definition: Ray.h:74
vtkm::rendering::raytracing::Ray::HitIdx
vtkm::cont::ArrayHandle< vtkm::Id > HitIdx
Definition: Ray.h:90
vtkm::rendering::raytracing::Ray::IntersectionZ
vtkm::cont::ArrayHandle< Precision > IntersectionZ
Definition: Ray.h:70
vtkm::cont::ArrayHandleConstant
An array handle with a constant value.
Definition: ArrayHandleConstant.h:63
vtkm::UInt8
uint8_t UInt8
Definition: Types.h:157
vtkm::rendering::raytracing::CopyAndOffsetMask
Definition: Worklets.h:60
RAY_ABANDONED
#define RAY_ABANDONED
Definition: Ray.h:26
vtkm::rendering::raytracing::Ray::Distance
vtkm::cont::ArrayHandle< Precision > Distance
Definition: Ray.h:88
RAY_ACTIVE
#define RAY_ACTIVE
Definition: Ray.h:20
vtkm::rendering::raytracing::Ray::Dir
vtkm::cont::ArrayHandleCompositeVector< vtkm::cont::ArrayHandle< Precision >, vtkm::cont::ArrayHandle< Precision >, vtkm::cont::ArrayHandle< Precision > > Dir
Definition: Ray.h:66
vtkm::rendering::raytracing::ManyMask
Definition: Worklets.h:110
vtkm::rendering::raytracing::ChannelBufferOperations::Compact
static void Compact(ChannelBuffer< Precision > &buffer, vtkm::cont::ArrayHandle< UInt8 > &masks, const vtkm::Id &newSize)
Definition: ChannelBufferOperations.h:97
vtkm::Vec< vtkm::Float32, 3 >
vtkm::Matrix< vtkm::Float32, 4, 4 >
vtkm::rendering::raytracing::Ray::IntersectionY
vtkm::cont::ArrayHandle< Precision > IntersectionY
Definition: Ray.h:69
vtkm::rendering::raytracing::Ray::NumRays
vtkm::Id NumRays
Definition: Ray.h:100
RAY_EXITED_MESH
#define RAY_EXITED_MESH
Definition: Ray.h:23
Width
vtkm::Id Width
Definition: Wireframer.h:379
vtkm::rendering::raytracing::Ray::DirX
vtkm::cont::ArrayHandle< Precision > DirX
Definition: Ray.h:77
vtkm::rendering::raytracing::RayOperations::UpdateRayStatus
static void UpdateRayStatus(Ray< T > &rays, Device)
Definition: RayOperations.h:122
vtkm::cont::ErrorBadValue
This class is thrown when a VTKm function or method encounters an invalid value that inhibits progres...
Definition: ErrorBadValue.h:25
vtkm::cont::ArrayHandleCast
Cast the values of an array to the specified type, on demand.
Definition: ArrayHandleCast.h:141
RAY_LOST
#define RAY_LOST
Definition: Ray.h:25
vtkm::rendering::raytracing::RayOperations::UpdateRayStatus
static void UpdateRayStatus(Ray< T > &rays)
Definition: RayOperations.h:131
vtkm::cont::Algorithm::Reduce
static VTKM_CONT U Reduce(vtkm::cont::DeviceAdapterId devId, const vtkm::cont::ArrayHandle< T, CIn > &input, U initialValue)
Definition: Algorithm.h:656
vtkm::cont::ArrayHandle::ReadPortal
VTKM_CONT ReadPortalType ReadPortal() const
Get an array portal that can be used in the control environment.
Definition: ArrayHandle.h:414
vtkm::cont::ArrayHandle::PrepareForOutput
VTKM_CONT WritePortalType PrepareForOutput(vtkm::Id numberOfValues, vtkm::cont::DeviceAdapterId device, vtkm::cont::Token &token) const
Prepares (allocates) this array to be used as an output from an operation in the execution environmen...
Definition: ArrayHandle.h:613
RAY_TERMINATED
#define RAY_TERMINATED
Definition: Ray.h:22
vtkm::Float32
float Float32
Definition: Types.h:154
Camera.h
vtkm::Int32
int32_t Int32
Definition: Types.h:160
vtkm::rendering::raytracing::Ray::DirZ
vtkm::cont::ArrayHandle< Precision > DirZ
Definition: Ray.h:79
vtkm::rendering::CanvasRayTracer
Definition: CanvasRayTracer.h:23
vtkm::rendering::Camera
Definition: Camera.h:28
vtkm::rendering::raytracing::Ray::Origin
vtkm::cont::ArrayHandleCompositeVector< vtkm::cont::ArrayHandle< Precision >, vtkm::cont::ArrayHandle< Precision >, vtkm::cont::ArrayHandle< Precision > > Origin
Definition: Ray.h:60
vtkm::rendering::raytracing::Mask
Definition: Worklets.h:86
vtkm::rendering::raytracing::Ray::NormalX
vtkm::cont::ArrayHandle< Precision > NormalX
Definition: Ray.h:83
Worklets.h
vtkm::rendering::raytracing::Ray::MaxDistance
vtkm::cont::ArrayHandle< Precision > MaxDistance
Definition: Ray.h:94
Ray.h
vtkm::rendering::raytracing::RayOperations::MapCanvasToRays
static VTKM_RENDERING_EXPORT void MapCanvasToRays(Ray< vtkm::Float32 > &rays, const vtkm::rendering::Camera &camera, const vtkm::rendering::CanvasRayTracer &canvas)
vtkm::worklet::WorkletMapField
Base class for worklets that do a simple mapping of field arrays.
Definition: WorkletMapField.h:38