VTK-m
2.0
vtkm
rendering
raytracing
SphereExtractor.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_Sphere_Extractor_h
11
#define vtk_m_rendering_raytracing_Sphere_Extractor_h
12
13
#include <
vtkm/cont/DataSet.h
>
14
15
namespace
vtkm
16
{
17
namespace
rendering
18
{
19
namespace
raytracing
20
{
21
22
class
SphereExtractor
23
{
24
protected
:
25
vtkm::cont::ArrayHandle<vtkm::Id>
PointIds
;
26
vtkm::cont::ArrayHandle<vtkm::Float32>
Radii
;
27
28
public
:
29
//
30
// Extract all nodes using a constant radius
31
//
32
void
ExtractCoordinates
(
const
vtkm::cont::CoordinateSystem
& coords,
const
vtkm::Float32
radius);
33
34
//
35
// Set radius based on scalar field values. Each is interpolated from min to max
36
//
37
void
ExtractCoordinates
(
const
vtkm::cont::CoordinateSystem
& coords,
38
const
vtkm::cont::Field
& field,
39
const
vtkm::Float32
minRadius,
40
const
vtkm::Float32
maxRadius);
41
42
//
43
// Extract all vertex shapes with constant radius
44
//
45
void
ExtractCells
(
const
vtkm::cont::UnknownCellSet
& cells,
vtkm::Float32
radius);
46
47
//
48
// Extract all vertex elements with radius based on scalar values
49
//
50
void
ExtractCells
(
const
vtkm::cont::UnknownCellSet
& cells,
51
const
vtkm::cont::Field
& field,
52
const
vtkm::Float32
minRadius,
53
const
vtkm::Float32
maxRadius);
54
55
56
vtkm::cont::ArrayHandle<vtkm::Id>
GetPointIds
();
57
vtkm::cont::ArrayHandle<vtkm::Float32>
GetRadii
();
58
vtkm::Id
GetNumberOfSpheres
()
const
;
59
60
protected
:
61
void
SetUniformRadius
(
const
vtkm::Float32
radius);
62
void
SetVaryingRadius
(
const
vtkm::Float32
minRadius,
63
const
vtkm::Float32
maxRadius,
64
const
vtkm::cont::Field
& field);
65
66
void
SetPointIdsFromCoords
(
const
vtkm::cont::CoordinateSystem
& coords);
67
void
SetPointIdsFromCells
(
const
vtkm::cont::UnknownCellSet
& cells);
68
69
};
// class ShapeIntersector
70
}
71
}
72
}
//namespace vtkm::rendering::raytracing
73
#endif //vtk_m_rendering_raytracing_Shape_Extractor_h
vtkm::cont::ArrayHandle< vtkm::Id >
vtkm
Groups connected points that have the same field value.
Definition:
Atomic.h:19
vtkm::rendering::raytracing::SphereExtractor::ExtractCoordinates
void ExtractCoordinates(const vtkm::cont::CoordinateSystem &coords, const vtkm::Float32 radius)
vtkm::rendering::raytracing::SphereExtractor::ExtractCells
void ExtractCells(const vtkm::cont::UnknownCellSet &cells, vtkm::Float32 radius)
vtkm::cont::UnknownCellSet
A CellSet of an unknown type.
Definition:
UnknownCellSet.h:48
vtkm::rendering::raytracing::SphereExtractor::Radii
vtkm::cont::ArrayHandle< vtkm::Float32 > Radii
Definition:
SphereExtractor.h:26
vtkm::Id
vtkm::Int32 Id
Represents an ID (index into arrays).
Definition:
Types.h:191
vtkm::rendering::raytracing::SphereExtractor::GetNumberOfSpheres
vtkm::Id GetNumberOfSpheres() const
vtkm::rendering::raytracing::SphereExtractor::GetPointIds
vtkm::cont::ArrayHandle< vtkm::Id > GetPointIds()
vtkm::rendering::raytracing::SphereExtractor::SetPointIdsFromCells
void SetPointIdsFromCells(const vtkm::cont::UnknownCellSet &cells)
vtkm::cont::CoordinateSystem
Definition:
CoordinateSystem.h:25
vtkm::rendering::raytracing::SphereExtractor::SetPointIdsFromCoords
void SetPointIdsFromCoords(const vtkm::cont::CoordinateSystem &coords)
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::SphereExtractor::PointIds
vtkm::cont::ArrayHandle< vtkm::Id > PointIds
Definition:
SphereExtractor.h:25
vtkm::Float32
float Float32
Definition:
Types.h:154
vtkm::rendering::raytracing::SphereExtractor::GetRadii
vtkm::cont::ArrayHandle< vtkm::Float32 > GetRadii()
vtkm::rendering::raytracing::SphereExtractor
Definition:
SphereExtractor.h:22
DataSet.h
vtkm::rendering::raytracing::SphereExtractor::SetUniformRadius
void SetUniformRadius(const vtkm::Float32 radius)
vtkm::rendering::raytracing::SphereExtractor::SetVaryingRadius
void SetVaryingRadius(const vtkm::Float32 minRadius, const vtkm::Float32 maxRadius, const vtkm::cont::Field &field)
Generated by
1.8.17