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