VTK  9.3.0
vtkGraphWeightEuclideanDistanceFilter.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
15 #ifndef vtkGraphWeightEuclideanDistanceFilter_h
16 #define vtkGraphWeightEuclideanDistanceFilter_h
17 
18 #include "vtkFiltersGeneralModule.h" // For export macro
19 #include "vtkGraphWeightFilter.h"
20 
21 VTK_ABI_NAMESPACE_BEGIN
22 class vtkGraph;
23 
24 class VTKFILTERSGENERAL_EXPORT vtkGraphWeightEuclideanDistanceFilter : public vtkGraphWeightFilter
25 {
26 public:
29  void PrintSelf(ostream& os, vtkIndent indent) override;
30 
31 protected:
34 
39  float ComputeWeight(vtkGraph* graph, const vtkEdgeType& edge) const override;
40 
44  bool CheckRequirements(vtkGraph* graph) const override;
45 
46 private:
48  void operator=(const vtkGraphWeightEuclideanDistanceFilter&) = delete;
49 };
50 
51 VTK_ABI_NAMESPACE_END
52 #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.
bool CheckRequirements(vtkGraph *graph) const override
Ensure that 'graph' has Points defined.
static vtkGraphWeightEuclideanDistanceFilter * New()
float ComputeWeight(vtkGraph *graph, const vtkEdgeType &edge) const override
Compute the Euclidean distance between the Points defined for the vertices of a specified 'edge'.
~vtkGraphWeightEuclideanDistanceFilter() override=default
Base class for filters that weight graph edges.
Base class for graph data types.
Definition: vtkGraph.h:281
a simple class to control print indentation
Definition: vtkIndent.h:29