OGS
VtkPolylinesSource.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) OpenGeoSys Community (opengeosys.org)
2// SPDX-License-Identifier: BSD-3-Clause
3
4#pragma once
5
6// ** INCLUDES **
8#include <vtkPolyDataAlgorithm.h>
9
10// forward declaration
11namespace GeoLib {
12class Polyline;
13}
14
15
20class VtkPolylinesSource : public vtkPolyDataAlgorithm, public VtkAlgorithmProperties
21{
22public:
25
26 vtkTypeMacro(VtkPolylinesSource,vtkPolyDataAlgorithm);
27
29 void setPolylines(const std::vector<GeoLib::Polyline*>* polylines) { _polylines = polylines; }
30
32 void PrintSelf(ostream& os, vtkIndent indent) override;
33
34 void SetUserProperty(QString name, QVariant value) override;
35
36protected:
39
41 int RequestData(vtkInformation* request,
42 vtkInformationVector** inputVector,
43 vtkInformationVector* outputVector) override;
44
45 int RequestInformation(vtkInformation* request,
46 vtkInformationVector** inputVector,
47 vtkInformationVector* outputVector) override;
48
50 const std::vector<GeoLib::Polyline*>* _polylines{nullptr};
51
52private:
53};
Class Polyline consists mainly of a reference to a point vector and a vector that stores the indices ...
Definition Polyline.h:29
VtkAlgorithmProperties(QObject *parent=nullptr)
Constructor (sets default values)
int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
void setPolylines(const std::vector< GeoLib::Polyline * > *polylines)
Sets the polyline vector.
~VtkPolylinesSource() override
static VtkPolylinesSource * New()
Create new objects with New() because of VTKs object reference counting.
int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
Computes the polygonal data object.
vtkTypeMacro(VtkPolylinesSource, vtkPolyDataAlgorithm)
const std::vector< GeoLib::Polyline * > * _polylines
The polylines to visualize.
void SetUserProperty(QString name, QVariant value) override
Sets a user property. This should be implemented by subclasses.
void PrintSelf(ostream &os, vtkIndent indent) override
Prints its data on a stream.