OGS
VtkSurfacesSource.h
Go to the documentation of this file.
1
15#pragma once
16
17// ** INCLUDES **
19#include <vtkPolyDataAlgorithm.h>
20
21#include "GeoLib/Surface.h"
22
27class VtkSurfacesSource : public vtkPolyDataAlgorithm, public VtkAlgorithmProperties
28{
29public:
32
33 vtkTypeMacro(VtkSurfacesSource,vtkPolyDataAlgorithm);
34
36 void setSurfaces(const std::vector<GeoLib::Surface*>* surfaces) { _surfaces = surfaces; }
37
39 void PrintSelf(ostream& os, vtkIndent indent) override;
40
44 //ogsUserPropertyMacro(ColorBySurface,bool);
45
46 void SetUserProperty(QString name, QVariant value) override;
47
48protected:
50 ~VtkSurfacesSource() override = default;
51
53 int RequestData(vtkInformation* request,
54 vtkInformationVector** inputVector,
55 vtkInformationVector* outputVector) override;
56
57 int RequestInformation(vtkInformation* request,
58 vtkInformationVector** inputVector,
59 vtkInformationVector* outputVector) override;
60
62 const std::vector<GeoLib::Surface*>* _surfaces{nullptr};
63
64private:
65};
Definition of the VtkAlgorithmProperties class.
Contains properties for the visualization of objects as VtkVisPipelineItems.
VTK source object for the visualisation of surfaces. Technically, surfaces are displayed as triangula...
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.