VTK-m  2.0
GlyphExtractorVector.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_Vector_h
11 #define vtk_m_rendering_raytracing_Glyph_Extractor_Vector_h
12 
13 #include <vtkm/cont/DataSet.h>
14 
15 namespace vtkm
16 {
17 namespace rendering
18 {
19 namespace raytracing
20 {
21 
23 {
24 public:
26 
27  //
28  // Extract all nodes using a constant size
29  //
31  const vtkm::cont::Field& field,
32  const vtkm::Float32 size);
33 
34  //
35  // Set size based on scalar field values. Each is interpolated from min to max
36  //
38  const vtkm::cont::Field& field,
39  const vtkm::Float32 minSize,
40  const vtkm::Float32 maxSize);
41 
42  //
43  // Extract all vertex shapes with constant size
44  //
45  void ExtractCells(const vtkm::cont::UnknownCellSet& cells,
46  const vtkm::cont::Field& field,
47  vtkm::Float32 size);
48 
49  //
50  // Extract all vertex elements with size based on scalar values
51  //
52  void ExtractCells(const vtkm::cont::UnknownCellSet& cells,
53  const vtkm::cont::Field& field,
54  const vtkm::Float32 minSize,
55  const vtkm::Float32 maxSize);
56 
57 
61 
63 
64 protected:
65  void SetUniformSize(const vtkm::Float32 size, const vtkm::cont::Field& field);
66  void SetVaryingSize(const vtkm::Float32 minSize,
67  const vtkm::Float32 maxSize,
68  const vtkm::cont::Field& field);
69 
72 
73  void ExtractMagnitudeField(const vtkm::cont::Field& field);
74 
78 
79 }; // class GlyphExtractorVector
80 }
81 }
82 } //namespace vtkm::rendering::raytracing
83 #endif //vtk_m_rendering_raytracing_Glyph_Extractor_Vector_h
vtkm::cont::ArrayHandle< vtkm::Id >
vtkm::rendering::raytracing::GlyphExtractorVector::PointIds
vtkm::cont::ArrayHandle< vtkm::Id > PointIds
Definition: GlyphExtractorVector.h:75
vtkm
Groups connected points that have the same field value.
Definition: Atomic.h:19
vtkm::rendering::raytracing::GlyphExtractorVector::MagnitudeField
vtkm::cont::Field MagnitudeField
Definition: GlyphExtractorVector.h:77
vtkm::rendering::raytracing::GlyphExtractorVector::GetMagnitudeField
vtkm::cont::Field GetMagnitudeField()
vtkm::rendering::raytracing::GlyphExtractorVector::ExtractCoordinates
void ExtractCoordinates(const vtkm::cont::CoordinateSystem &coords, const vtkm::cont::Field &field, const vtkm::Float32 size)
vtkm::rendering::raytracing::GlyphExtractorVector::SetPointIdsFromCells
void SetPointIdsFromCells(const vtkm::cont::UnknownCellSet &cells)
vtkm::cont::UnknownCellSet
A CellSet of an unknown type.
Definition: UnknownCellSet.h:48
vtkm::rendering::raytracing::GlyphExtractorVector
Definition: GlyphExtractorVector.h:22
vtkm::Id
vtkm::Int32 Id
Represents an ID (index into arrays).
Definition: Types.h:191
vtkm::rendering::raytracing::GlyphExtractorVector::SetPointIdsFromCoords
void SetPointIdsFromCoords(const vtkm::cont::CoordinateSystem &coords)
vtkm::rendering::raytracing::GlyphExtractorVector::GetNumberOfGlyphs
vtkm::Id GetNumberOfGlyphs() const
vtkm::cont::CoordinateSystem
Definition: CoordinateSystem.h:25
vtkm::rendering::raytracing::GlyphExtractorVector::ExtractCells
void ExtractCells(const vtkm::cont::UnknownCellSet &cells, const vtkm::cont::Field &field, vtkm::Float32 size)
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::GlyphExtractorVector::ExtractMagnitudeField
void ExtractMagnitudeField(const vtkm::cont::Field &field)
vtkm::rendering::raytracing::GlyphExtractorVector::SetUniformSize
void SetUniformSize(const vtkm::Float32 size, const vtkm::cont::Field &field)
vtkm::rendering::raytracing::GlyphExtractorVector::GetPointIds
vtkm::cont::ArrayHandle< vtkm::Id > GetPointIds()
vtkm::rendering::raytracing::GlyphExtractorVector::GetSizes
vtkm::cont::ArrayHandle< vtkm::Vec< vtkm::Float32, 3 > > GetSizes()
vtkm::rendering::raytracing::GlyphExtractorVector::SetVaryingSize
void SetVaryingSize(const vtkm::Float32 minSize, const vtkm::Float32 maxSize, const vtkm::cont::Field &field)
vtkm::Float32
float Float32
Definition: Types.h:154
DataSet.h
vtkm::rendering::raytracing::GlyphExtractorVector::Sizes
vtkm::cont::ArrayHandle< vtkm::Vec< vtkm::Float32, 3 > > Sizes
Definition: GlyphExtractorVector.h:76
vtkm::rendering::raytracing::GlyphExtractorVector::GlyphExtractorVector
GlyphExtractorVector()