VTK-m  2.0
VolumeRendererStructured.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_VolumeRendererStructured_h
11 #define vtk_m_rendering_raytracing_VolumeRendererStructured_h
12 
13 #include <vtkm/cont/DataSet.h>
14 
16 #include <vtkm/rendering/vtkm_rendering_export.h>
17 
18 namespace vtkm
19 {
20 namespace rendering
21 {
22 namespace raytracing
23 {
24 
25 class VTKM_RENDERING_EXPORT VolumeRendererStructured
26 {
27 public:
29  using CartesianArrayHandle =
31 
32  VTKM_CONT
34 
35  VTKM_CONT
36  void EnableCompositeBackground();
37 
38  VTKM_CONT
39  void DisableCompositeBackground();
40 
41  VTKM_CONT
42  void SetColorMap(const vtkm::cont::ArrayHandle<vtkm::Vec4f_32>& colorMap);
43 
44  VTKM_CONT
45  void SetData(const vtkm::cont::CoordinateSystem& coords,
46  const vtkm::cont::Field& scalarField,
47  const vtkm::cont::CellSetStructured<3>& cellset,
48  const vtkm::Range& scalarRange);
49 
50 
51  VTKM_CONT
53  //VTKM_CONT
55 
56 
57  VTKM_CONT
58  void SetSampleDistance(const vtkm::Float32& distance);
59 
60 protected:
61  template <typename Precision, typename Device>
62  VTKM_CONT void RenderOnDevice(vtkm::rendering::raytracing::Ray<Precision>& rays, Device);
63  template <typename Precision>
64  struct RenderFunctor;
65 
66  bool IsSceneDirty;
75 };
76 }
77 }
78 } //namespace vtkm::rendering::raytracing
79 #endif
vtkm::rendering::raytracing::VolumeRendererStructured
Definition: VolumeRendererStructured.h:25
vtkm::cont::ArrayHandle< vtkm::FloatDefault >
vtkm::rendering::raytracing::VolumeRendererStructured::Cellset
vtkm::cont::CellSetStructured< 3 > Cellset
Definition: VolumeRendererStructured.h:70
vtkm
Groups connected points that have the same field value.
Definition: Atomic.h:19
vtkm::rendering::raytracing::VolumeRendererStructured::ScalarRange
vtkm::Range ScalarRange
Definition: VolumeRendererStructured.h:74
vtkm::cont::CellSetStructured< 3 >
vtkm::cont::ArrayHandleCartesianProduct
ArrayHandleCartesianProduct is a specialization of ArrayHandle.
Definition: ArrayHandleCartesianProduct.h:326
vtkm::rendering::raytracing::VolumeRendererStructured::IsUniformDataSet
bool IsUniformDataSet
Definition: VolumeRendererStructured.h:67
vtkm::rendering::raytracing::VolumeRendererStructured::SampleDistance
vtkm::Float32 SampleDistance
Definition: VolumeRendererStructured.h:73
vtkm::cont::CoordinateSystem
Definition: CoordinateSystem.h:25
vtkm::rendering::raytracing::Ray
Definition: Ray.h:37
vtkm::rendering::raytracing::VolumeRendererStructured::RenderFunctor
Definition: VolumeRendererStructured.h:64
vtkm::cont::Field
A Field encapsulates an array on some piece of the mesh, such as the points, a cell set,...
Definition: cont/Field.h:31
vtkm::rendering::raytracing::VolumeRendererStructured::ScalarField
const vtkm::cont::Field * ScalarField
Definition: VolumeRendererStructured.h:71
VTKM_CONT
#define VTKM_CONT
Definition: ExportMacros.h:57
vtkm::Bounds
Represent an axis-aligned 3D bounds in space.
Definition: Bounds.h:29
vtkm::rendering::raytracing::VolumeRendererStructured::SpatialExtent
vtkm::Bounds SpatialExtent
Definition: VolumeRendererStructured.h:68
vtkm::Float32
float Float32
Definition: Types.h:154
vtkm::rendering::raytracing::VolumeRendererStructured::Coordinates
vtkm::cont::CoordinateSystem Coordinates
Definition: VolumeRendererStructured.h:69
vtkm::rendering::raytracing::VolumeRendererStructured::IsSceneDirty
bool IsSceneDirty
Definition: VolumeRendererStructured.h:64
DataSet.h
Ray.h
vtkm::rendering::raytracing::VolumeRendererStructured::ColorMap
vtkm::cont::ArrayHandle< vtkm::Vec4f_32 > ColorMap
Definition: VolumeRendererStructured.h:72
vtkm::Range
Represent a continuous scalar range of values.
Definition: Range.h:31