VTK-m  2.0
MeshConnectivityContainers.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_MeshConnectivityContainer_h
11 #define vtk_m_rendering_raytracing_MeshConnectivityContainer_h
12 
13 #include <vtkm/cont/DataSet.h>
16 
17 namespace vtkm
18 {
19 namespace rendering
20 {
21 namespace raytracing
22 {
23 
25 {
26 public:
29 
31  vtkm::cont::Token& token) const = 0;
32 
33  void FindEntry(Ray<vtkm::Float32>& rays);
34 
35  void FindEntry(Ray<vtkm::Float64>& rays);
36 
37 protected:
39  // Mesh Boundary
42 
43 private:
44  template <typename T>
45  VTKM_CONT void FindEntryImpl(Ray<T>& rays);
46 };
47 
49 {
50 public:
54  // Control Environment Handles
55  // FaceConn
58  //Cell Set
62 
66 
67 public:
68  VTKM_CONT
70  const vtkm::cont::CoordinateSystem& coords,
71  const IdHandle& faceConn,
72  const IdHandle& faceOffsets,
73  const Id4Handle& triangles);
74 
76 
78  vtkm::cont::Token& token) const override;
79 };
80 
82 {
83 protected:
90 
91 public:
92  VTKM_CONT
94  const vtkm::cont::CoordinateSystem& coords,
95  const Id4Handle& triangles);
96 
98  vtkm::cont::Token& token) const override;
99 
100 }; //structure mesh conn
101 
103 {
104 public:
110  // Control Environment Handles
114 
118 
122 
123 public:
124  VTKM_CONT
126  const vtkm::cont::CoordinateSystem& coords,
127  const IdHandle& faceConn,
128  const Id4Handle& externalFaces);
129 
131  vtkm::cont::Token& token) const override;
132 
133 }; //UnstructuredSingleContainer
134 }
135 }
136 } //namespace vtkm::rendering::raytracing
137 #endif
vtkm::rendering::raytracing::MeshConnectivityContainerStructured
Definition: MeshConnectivityContainers.h:81
vtkm::rendering::raytracing::MeshConnectivityContainerUnstructured::FaceConnectivity
IdHandle FaceConnectivity
Definition: MeshConnectivityContainers.h:56
vtkm::rendering::raytracing::MeshConnectivityContainer::MeshConnectivityContainer
MeshConnectivityContainer()
vtkm::cont::ArrayHandle< vtkm::Id4 >
vtkm::rendering::raytracing::MeshConnectivityContainerStructured::Id4Handle
vtkm::cont::ArrayHandle< vtkm::Id4 > Id4Handle
Definition: MeshConnectivityContainers.h:84
vtkm::rendering::raytracing::MeshConnectivityContainer::FindEntry
void FindEntry(Ray< vtkm::Float32 > &rays)
vtkm
Groups connected points that have the same field value.
Definition: Atomic.h:19
vtkm::rendering::raytracing::MeshConnectivityContainerStructured::CoordinateBounds
vtkm::Bounds CoordinateBounds
Definition: MeshConnectivityContainers.h:87
vtkm::rendering::raytracing::MeshConnectivityContainerUnstructured::Coords
vtkm::cont::CoordinateSystem Coords
Definition: MeshConnectivityContainers.h:65
vtkm::rendering::raytracing::MeshConnectivityContainerStructured::PointDims
vtkm::Id3 PointDims
Definition: MeshConnectivityContainers.h:86
vtkm::cont::CellSetStructured< 3 >
vtkm::rendering::raytracing::MeshConnectivityContainerSingleType::Cellset
vtkm::cont::CellSetSingleType Cellset
Definition: MeshConnectivityContainers.h:117
MeshConnectivity.h
vtkm::rendering::raytracing::MeshConnectivityContainerSingleType::Coords
vtkm::cont::CoordinateSystem Coords
Definition: MeshConnectivityContainers.h:116
vtkm::rendering::raytracing::MeshConnectivityContainerStructured::Coords
vtkm::cont::CoordinateSystem Coords
Definition: MeshConnectivityContainers.h:88
vtkm::rendering::raytracing::MeshConnectivityContainerSingleType::MeshConnectivityContainerSingleType
VTKM_CONT MeshConnectivityContainerSingleType(const vtkm::cont::CellSetSingleType<> &cellset, const vtkm::cont::CoordinateSystem &coords, const IdHandle &faceConn, const Id4Handle &externalFaces)
vtkm::cont::CellSetSingleType
Definition: CastAndCall.h:34
vtkm::rendering::raytracing::MeshConnectivityContainer::FindEntryImpl
VTKM_CONT void FindEntryImpl(Ray< T > &rays)
vtkm::cont::CoordinateSystem
Definition: CoordinateSystem.h:25
vtkm::rendering::raytracing::MeshConnectivityContainerSingleType::PrepareForExecution
MeshConnectivity PrepareForExecution(vtkm::cont::DeviceAdapterId deviceId, vtkm::cont::Token &token) const override
vtkm::rendering::raytracing::MeshConnectivityContainerSingleType::Id4Handle
vtkm::cont::ArrayHandle< vtkm::Id4 > Id4Handle
Definition: MeshConnectivityContainers.h:106
vtkm::cont::Token
A token to hold the scope of an ArrayHandle or other object.
Definition: Token.h:35
vtkm::rendering::raytracing::MeshConnectivityContainerUnstructured::IdHandle
vtkm::cont::ArrayHandle< vtkm::Id > IdHandle
Definition: MeshConnectivityContainers.h:51
vtkm::rendering::raytracing::Ray
Definition: Ray.h:37
vtkm::rendering::raytracing::MeshConnectivityContainerUnstructured::UCharHandle
vtkm::cont::ArrayHandle< vtkm::UInt8 > UCharHandle
Definition: MeshConnectivityContainers.h:53
vtkm::rendering::raytracing::MeshConnectivityContainerSingleType::NumIndices
vtkm::Int32 NumIndices
Definition: MeshConnectivityContainers.h:120
vtkm::rendering::raytracing::MeshConnectivity
General version of mesh connectivity that can be used for all supported mesh types.
Definition: MeshConnectivity.h:251
vtkm::rendering::raytracing::MeshConnectivityContainerUnstructured::FaceOffsets
IdHandle FaceOffsets
Definition: MeshConnectivityContainers.h:57
vtkm::rendering::raytracing::MeshConnectivityContainerStructured::PrepareForExecution
MeshConnectivity PrepareForExecution(vtkm::cont::DeviceAdapterId deviceId, vtkm::cont::Token &token) const override
vtkm::rendering::raytracing::TriangleIntersector
Definition: TriangleIntersector.h:25
vtkm::rendering::raytracing::MeshConnectivityContainerUnstructured::CoordinateBounds
vtkm::Bounds CoordinateBounds
Definition: MeshConnectivityContainers.h:63
vtkm::rendering::raytracing::MeshConnectivityContainerSingleType::CoordinateBounds
vtkm::Bounds CoordinateBounds
Definition: MeshConnectivityContainers.h:115
vtkm::rendering::raytracing::MeshConnectivityContainerStructured::CellDims
vtkm::Id3 CellDims
Definition: MeshConnectivityContainers.h:85
vtkm::cont::ArrayHandleCounting< vtkm::Id >
vtkm::rendering::raytracing::MeshConnectivityContainerSingleType::FaceConnectivity
IdHandle FaceConnectivity
Definition: MeshConnectivityContainers.h:111
vtkm::rendering::raytracing::MeshConnectivityContainerUnstructured::~MeshConnectivityContainerUnstructured
virtual ~MeshConnectivityContainerUnstructured()
VTKM_CONT
#define VTKM_CONT
Definition: ExportMacros.h:57
vtkm::rendering::raytracing::MeshConnectivityContainerSingleType::NumFaces
vtkm::Int32 NumFaces
Definition: MeshConnectivityContainers.h:121
vtkm::rendering::raytracing::MeshConnectivityContainer::~MeshConnectivityContainer
virtual ~MeshConnectivityContainer()
vtkm::rendering::raytracing::MeshConnectivityContainerUnstructured::CellConn
IdHandle CellConn
Definition: MeshConnectivityContainers.h:59
vtkm::cont::ArrayHandleConstant
An array handle with a constant value.
Definition: ArrayHandleConstant.h:63
vtkm::Bounds
Represent an axis-aligned 3D bounds in space.
Definition: Bounds.h:29
vtkm::rendering::raytracing::MeshConnectivityContainer::PrepareForExecution
virtual MeshConnectivity PrepareForExecution(vtkm::cont::DeviceAdapterId deviceId, vtkm::cont::Token &token) const =0
vtkm::rendering::raytracing::MeshConnectivityContainerUnstructured
Definition: MeshConnectivityContainers.h:48
vtkm::rendering::raytracing::MeshConnectivityContainerSingleType::CountingHandle
vtkm::cont::ArrayHandleCounting< vtkm::Id > CountingHandle
Definition: MeshConnectivityContainers.h:107
vtkm::rendering::raytracing::MeshConnectivityContainerSingleType::ShapeId
vtkm::Int32 ShapeId
Definition: MeshConnectivityContainers.h:119
vtkm::rendering::raytracing::MeshConnectivityContainerStructured::Cellset
vtkm::cont::CellSetStructured< 3 > Cellset
Definition: MeshConnectivityContainers.h:89
vtkm::cont::ExecutionObjectBase
Base ExecutionObjectBase for execution objects to inherit from so that you can use an arbitrary objec...
Definition: ExecutionObjectBase.h:31
vtkm::cont::DeviceAdapterId
Definition: DeviceAdapterTag.h:52
vtkm::rendering::raytracing::MeshConnectivityContainerUnstructured::Id4Handle
vtkm::cont::ArrayHandle< vtkm::Id4 > Id4Handle
Definition: MeshConnectivityContainers.h:52
vtkm::Vec< vtkm::Id, 3 >
vtkm::rendering::raytracing::MeshConnectivityContainer::Triangles
Id4Handle Triangles
Definition: MeshConnectivityContainers.h:40
vtkm::cont::CellSetExplicit
Definition: CastAndCall.h:36
vtkm::rendering::raytracing::MeshConnectivityContainerUnstructured::PrepareForExecution
MeshConnectivity PrepareForExecution(vtkm::cont::DeviceAdapterId deviceId, vtkm::cont::Token &token) const override
vtkm::Int32
int32_t Int32
Definition: Types.h:160
vtkm::rendering::raytracing::MeshConnectivityContainer::Id4Handle
typename vtkm::cont::ArrayHandle< vtkm::Id4 > Id4Handle
Definition: MeshConnectivityContainers.h:38
vtkm::rendering::raytracing::MeshConnectivityContainerSingleType::NumIndicesHandle
vtkm::cont::ArrayHandleConstant< vtkm::IdComponent > NumIndicesHandle
Definition: MeshConnectivityContainers.h:109
vtkm::rendering::raytracing::MeshConnectivityContainerUnstructured::Cellset
vtkm::cont::CellSetExplicit Cellset
Definition: MeshConnectivityContainers.h:64
TriangleIntersector.h
vtkm::rendering::raytracing::MeshConnectivityContainerSingleType
Definition: MeshConnectivityContainers.h:102
vtkm::rendering::raytracing::MeshConnectivityContainerSingleType::CellOffsets
CountingHandle CellOffsets
Definition: MeshConnectivityContainers.h:112
vtkm::rendering::raytracing::MeshConnectivityContainerUnstructured::Shapes
UCharHandle Shapes
Definition: MeshConnectivityContainers.h:61
vtkm::rendering::raytracing::MeshConnectivityContainer::Intersector
TriangleIntersector Intersector
Definition: MeshConnectivityContainers.h:41
vtkm::rendering::raytracing::MeshConnectivityContainerUnstructured::CellOffsets
IdHandle CellOffsets
Definition: MeshConnectivityContainers.h:60
vtkm::rendering::raytracing::MeshConnectivityContainer
Definition: MeshConnectivityContainers.h:24
DataSet.h
vtkm::rendering::raytracing::MeshConnectivityContainerSingleType::ShapesHandle
vtkm::cont::ArrayHandleConstant< vtkm::UInt8 > ShapesHandle
Definition: MeshConnectivityContainers.h:108
vtkm::rendering::raytracing::MeshConnectivityContainerSingleType::IdHandle
vtkm::cont::ArrayHandle< vtkm::Id > IdHandle
Definition: MeshConnectivityContainers.h:105
vtkm::rendering::raytracing::MeshConnectivityContainerUnstructured::MeshConnectivityContainerUnstructured
VTKM_CONT MeshConnectivityContainerUnstructured(const vtkm::cont::CellSetExplicit<> &cellset, const vtkm::cont::CoordinateSystem &coords, const IdHandle &faceConn, const IdHandle &faceOffsets, const Id4Handle &triangles)
vtkm::rendering::raytracing::MeshConnectivityContainerStructured::MeshConnectivityContainerStructured
VTKM_CONT MeshConnectivityContainerStructured(const vtkm::cont::CellSetStructured< 3 > &cellset, const vtkm::cont::CoordinateSystem &coords, const Id4Handle &triangles)
vtkm::rendering::raytracing::MeshConnectivityContainerSingleType::CellConnectivity
IdHandle CellConnectivity
Definition: MeshConnectivityContainers.h:113