OGS
VtkPointsSource.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#include "GeoLib/Point.h"
11
16class VtkPointsSource : public vtkPolyDataAlgorithm, public VtkAlgorithmProperties
17{
18public:
21
22 vtkTypeMacro(VtkPointsSource,vtkPolyDataAlgorithm);
23
25 void setPoints(const std::vector<GeoLib::Point*>* points) { _points = points; }
26
28 void PrintSelf(ostream& os, vtkIndent indent) override;
29
30 void SetUserProperty(QString name, QVariant value) override;
31
32protected:
34 ~VtkPointsSource() override = default;
35
37 int RequestData(vtkInformation* request,
38 vtkInformationVector** inputVector,
39 vtkInformationVector* outputVector) override;
40
41 int RequestInformation(vtkInformation* request,
42 vtkInformationVector** inputVector,
43 vtkInformationVector* outputVector) override;
44
46 const std::vector<GeoLib::Point*>* _points{nullptr};
47
48private:
49};
VtkAlgorithmProperties(QObject *parent=nullptr)
Constructor (sets default values)
int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
Computes the polygonal data object.
void setPoints(const std::vector< GeoLib::Point * > *points)
Sets the points as a vector.
void SetUserProperty(QString name, QVariant value) override
Sets a user property. This should be implemented by subclasses.
vtkTypeMacro(VtkPointsSource, vtkPolyDataAlgorithm)
~VtkPointsSource() override=default
const std::vector< GeoLib::Point * > * _points
The points to visualize.
void PrintSelf(ostream &os, vtkIndent indent) override
Prints its data on a stream.
static VtkPointsSource * New()
Create new objects with New() because of VTKs object reference counting.
int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override