VTK  9.0.3
vtkGraphWeightEuclideanDistanceFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkGraphWeightEuclideanDistanceFilter.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
24 #ifndef vtkGraphWeightEuclideanDistanceFilter_h
25 #define vtkGraphWeightEuclideanDistanceFilter_h
26 
27 #include "vtkFiltersGeneralModule.h" // For export macro
28 #include "vtkGraphWeightFilter.h"
29 
30 class vtkGraph;
31 
32 class VTKFILTERSGENERAL_EXPORT vtkGraphWeightEuclideanDistanceFilter : public vtkGraphWeightFilter
33 {
34 public:
37  void PrintSelf(ostream& os, vtkIndent indent) override;
38 
39 protected:
42 
47  float ComputeWeight(vtkGraph* const graph, const vtkEdgeType& edge) const override;
48 
52  bool CheckRequirements(vtkGraph* const graph) const override;
53 
54 private:
56  void operator=(const vtkGraphWeightEuclideanDistanceFilter&) = delete;
57 };
58 
59 #endif
Weights the edges of a graph based on the Euclidean distance between the points.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
float ComputeWeight(vtkGraph *const graph, const vtkEdgeType &edge) const override
Compute the Euclidean distance between the Points defined for the vertices of a specified 'edge'.
static vtkGraphWeightEuclideanDistanceFilter * New()
bool CheckRequirements(vtkGraph *const graph) const override
Ensure that 'graph' has Points defined.
Base class for filters that weight graph edges.
Base class for graph data types.
Definition: vtkGraph.h:290
a simple class to control print indentation
Definition: vtkIndent.h:34