VTK-m  2.0
Classes | Public Types | Public Member Functions | Private Attributes | List of all members
vtkm::worklet::VertexClustering Struct Reference

#include <VertexClustering.h>

Classes

class  Cid2PointIdWorklet
 
class  Cid3HashWorklet
 
class  Cid3UnhashWorklet
 
struct  GridInfo
 
class  IndexingWorklet
 pass 3 More...
 
class  MapCellsWorklet
 
class  MapPointsWorklet
 

Public Types

using TypeInt64 = vtkm::List< vtkm::Int64 >
 

Public Member Functions

template<typename UnknownCellSetType , typename DynamicCoordinateHandleType >
void Run (const UnknownCellSetType &cellSet, const DynamicCoordinateHandleType &coordinates, const vtkm::Bounds &bounds, const vtkm::Id3 &nDivisions, vtkm::cont::UnknownCellSet &outCellSet, vtkm::cont::UnknownArrayHandle &outCoords)
 VertexClustering: Mesh simplification. More...
 
vtkm::cont::ArrayHandle< vtkm::IdGetPointIdMap () const
 
vtkm::cont::ArrayHandle< vtkm::IdGetCellIdMap () const
 

Private Attributes

vtkm::cont::ArrayHandle< vtkm::IdPointIdMap
 
vtkm::cont::ArrayHandle< vtkm::IdCellIdMap
 

Member Typedef Documentation

◆ TypeInt64

Member Function Documentation

◆ GetCellIdMap()

vtkm::cont::ArrayHandle<vtkm::Id> vtkm::worklet::VertexClustering::GetCellIdMap ( ) const
inline

◆ GetPointIdMap()

vtkm::cont::ArrayHandle<vtkm::Id> vtkm::worklet::VertexClustering::GetPointIdMap ( ) const
inline

◆ Run()

template<typename UnknownCellSetType , typename DynamicCoordinateHandleType >
void vtkm::worklet::VertexClustering::Run ( const UnknownCellSetType &  cellSet,
const DynamicCoordinateHandleType &  coordinates,
const vtkm::Bounds bounds,
const vtkm::Id3 nDivisions,
vtkm::cont::UnknownCellSet outCellSet,
vtkm::cont::UnknownArrayHandle outCoords 
)
inline

VertexClustering: Mesh simplification.

determine grid resolution for clustering

start algorithm

pass 1 : assign points with (cluster) ids based on the grid it falls in

map points

pass 2 : Choose a representative point from each cluster for the output:

Pass 3 : Decimated mesh generation For each original triangle, only output vertices from three different clusters

map each triangle vertex to the cluster id's of the cell vertices

preparation: Get the indexes of the clustered points to prepare for new cell array

map: convert each triangle vertices from original point id to the new cluster indexes If the triangle is degenerated, set the ids to <nPoints, nPoints, nPoints> This ensures it will be placed at the end of the array when sorted.

Create hashed array

output

Member Data Documentation

◆ CellIdMap

vtkm::cont::ArrayHandle<vtkm::Id> vtkm::worklet::VertexClustering::CellIdMap
private

◆ PointIdMap

vtkm::cont::ArrayHandle<vtkm::Id> vtkm::worklet::VertexClustering::PointIdMap
private

The documentation for this struct was generated from the following file: