OGS
VtkSurfacesSource.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/Surface.h"
11
16class VtkSurfacesSource : public vtkPolyDataAlgorithm, public VtkAlgorithmProperties
17{
18public:
21
22 vtkTypeMacro(VtkSurfacesSource,vtkPolyDataAlgorithm);
23
25 void setSurfaces(const std::vector<GeoLib::Surface*>* surfaces) { _surfaces = surfaces; }
26
28 void PrintSelf(ostream& os, vtkIndent indent) override;
29
33 //ogsUserPropertyMacro(ColorBySurface,bool);
34
35 void SetUserProperty(QString name, QVariant value) override;
36
37protected:
39 ~VtkSurfacesSource() override = default;
40
42 int RequestData(vtkInformation* request,
43 vtkInformationVector** inputVector,
44 vtkInformationVector* outputVector) override;
45
46 int RequestInformation(vtkInformation* request,
47 vtkInformationVector** inputVector,
48 vtkInformationVector* outputVector) override;
49
51 const std::vector<GeoLib::Surface*>* _surfaces{nullptr};
52
53private:
54};
VtkAlgorithmProperties(QObject *parent=nullptr)
Constructor (sets default values)
int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
void PrintSelf(ostream &os, vtkIndent indent) override
Prints its data on a stream.
vtkTypeMacro(VtkSurfacesSource, vtkPolyDataAlgorithm)
int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
Computes the polygonal data object.
void setSurfaces(const std::vector< GeoLib::Surface * > *surfaces)
Sets the surfaces vector.
const std::vector< GeoLib::Surface * > * _surfaces
The surfaces to visualize.
~VtkSurfacesSource() override=default
static VtkSurfacesSource * New()
Create new objects with New() because of VTKs object reference counting.
void SetUserProperty(QString name, QVariant value) override
Generates random colors for each surface.