OGS
VtkVisPointSetItem.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
9class vtkAlgorithm;
10class vtkDataSetAttributes;
11class vtkPointSet;
12class vtkProp3D;
13class vtkRenderer;
14class vtkTransformFilter;
16
19
29{
30
31public:
33 VtkVisPointSetItem(vtkAlgorithm* algorithm,
35 const QList<QVariant> data = QList<QVariant>());
36
39 const QList<QVariant> data = QList<QVariant>());
40
41 ~VtkVisPointSetItem() override;
42
44 QString GetActiveAttribute() const override;
45
47 void GetRangeForActiveAttribute(double range[2]) const;
48
51 void Initialize(vtkRenderer* renderer) override;
52
53 vtkAlgorithm* transformFilter() const override;
54
56 void SetActiveAttribute(const QString& name) override;
57
59 void setScale(double x, double y, double z) const override;
60
62 void setTranslation(double x, double y, double z) const override;
63
65 void setBackfaceCulling(bool enable) const override;
66
67protected:
69 vtkTransformFilter* _transformFilter;
71 std::string _activeArrayName;
72
74 int callVTKWriter(vtkAlgorithm* algorithm,
75 const std::string& filename) const override;
76
77 void SetScalarVisibility(bool on);
78
81
82private:
84 bool activeAttributeExists(vtkDataSetAttributes* data, std::string& name);
85
86};
Simply wraps vtkDataSetMapper as a Qt object to enable slot connections.
TreeItem * parentItem() const
Definition TreeItem.cpp:104
TreeItem(QList< QVariant > data, TreeItem *parent)
Definition TreeItem.cpp:12
Contains properties for the visualization of objects as VtkVisPipelineItems.
Is used to combine several filter in one VtkVisPipelineItem. You can use vtk filter and custom filter...
vtkAlgorithm * algorithm() const
Returns the algorithm object.
VtkVisPipelineItem(vtkAlgorithm *algorithm, TreeItem *parentItem, const QList< QVariant > data=QList< QVariant >())
Constructor for a source/filter object.
QVariant data(int column) const override
VtkCompositeFilter * compositeFilter() const
Returns the composite filter.
void setTranslation(double x, double y, double z) const override
Translates the item in visualisation-space.
void GetRangeForActiveAttribute(double range[2]) const
Get the scalar range for the active attribute.
VtkVisPointSetItem(vtkAlgorithm *algorithm, TreeItem *parentItem, const QList< QVariant > data=QList< QVariant >())
Constructor for a source/filter object.
void SetActiveAttribute(const QString &name) override
Sets the selected attribute array for the visualisation of the data set.
bool activeAttributeExists(vtkDataSetAttributes *data, std::string &name)
Checks if the selected attribute actually exists for the data set.
int callVTKWriter(vtkAlgorithm *algorithm, const std::string &filename) const override
Selects the appropriate VTK-Writer object and writes the object to a file with the given name.
void SetScalarVisibility(bool on)
void setVtkProperties(VtkAlgorithmProperties *vtkProps)
Sets pre-set properties on vtkActor and on vtkMapper.
void setBackfaceCulling(bool enable) const override
Enables / disables backface culling.
QVtkDataSetMapper * _mapper
void setScale(double x, double y, double z) const override
Scales the data in visualisation-space.
QString GetActiveAttribute() const override
Gets the last selected attribute.
vtkTransformFilter * _transformFilter
vtkAlgorithm * transformFilter() const override
void Initialize(vtkRenderer *renderer) override
Initializes vtkMapper and vtkActor necessary for visualization of the item and sets the item's proper...