VTK  9.3.20240423
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
20
21VTK_ABI_NAMESPACE_BEGIN
22class vtkGraph;
23
24class VTKFILTERSGENERAL_EXPORT vtkGraphWeightEuclideanDistanceFilter : public vtkGraphWeightFilter
25{
26public:
29 void PrintSelf(ostream& os, vtkIndent indent) override;
30
31protected:
34
39 float ComputeWeight(vtkGraph* graph, const vtkEdgeType& edge) const override;
40
44 bool CheckRequirements(vtkGraph* graph) const override;
45
46private:
48 void operator=(const vtkGraphWeightEuclideanDistanceFilter&) = delete;
49};
50
51VTK_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.
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
static vtkGraphWeightEuclideanDistanceFilter * New()
Base class for filters that weight graph edges.
Base class for graph data types.
Definition vtkGraph.h:340
a simple class to control print indentation
Definition vtkIndent.h:108