QHeightMapSurfaceDataProxy Class
Base proxy class for Q3DSurface. More...
Header: | #include <QHeightMapSurfaceDataProxy> |
Since: | QtDataVisualization 1.0 |
Instantiated By: | HeightMapSurfaceDataProxy |
Inherits: | QSurfaceDataProxy |
Properties
|
- 3 properties inherited from QSurfaceDataProxy
- 1 property inherited from QAbstractDataProxy
- 1 property inherited from QObject
Public Functions
QHeightMapSurfaceDataProxy(QObject *parent = Q_NULLPTR) | |
QHeightMapSurfaceDataProxy(const QImage &image, QObject *parent = Q_NULLPTR) | |
QHeightMapSurfaceDataProxy(const QString &filename, QObject *parent = Q_NULLPTR) | |
virtual | ~QHeightMapSurfaceDataProxy() |
QImage | heightMap() const |
QString | heightMapFile() const |
float | maxXValue() const |
float | maxZValue() const |
float | minXValue() const |
float | minZValue() const |
void | setHeightMap(const QImage &image) |
void | setHeightMapFile(const QString &filename) |
void | setMaxXValue(float max) |
void | setMaxZValue(float max) |
void | setMinXValue(float min) |
void | setMinZValue(float min) |
void | setValueRanges(float minX, float maxX, float minZ, float maxZ) |
- 16 public functions inherited from QSurfaceDataProxy
- 1 public function inherited from QAbstractDataProxy
- 31 public functions inherited from QObject
Signals
void | heightMapChanged(const QImage &image) |
void | heightMapFileChanged(const QString &filename) |
void | maxXValueChanged(float value) |
void | maxZValueChanged(float value) |
void | minXValueChanged(float value) |
void | minZValueChanged(float value) |
- 9 signals inherited from QSurfaceDataProxy
- 2 signals inherited from QObject
Additional Inherited Members
- 1 public slot inherited from QObject
- 11 static public members inherited from QObject
- 9 protected functions inherited from QObject
Detailed Description
Base proxy class for Q3DSurface.
QHeightMapSurfaceDataProxy takes care of surface related height map data handling. It provides a way to give a height map to be visualized as a surface plot.
Since height maps do not contain values for X or Z axes, those values need to be given separately using minXValue, maxXValue, minZValue, and maxZValue properties. X-value corresponds to image horizontal direction and Z-value to the vertical. Setting any of these properties triggers asynchronous re-resolving of any existing height map.
See also QSurfaceDataProxy and Qt Data Visualization Data Handling.
Property Documentation
heightMap : QImage
A height map image to be visualized. Setting this property replaces current data with height map data.
There are several formats the image can be given in, but if it is not in a directly usable format, a conversion is made.
Note: If the result seems wrong, the automatic conversion failed and you should try converting the image yourself before setting it. Preferred format is QImage::Format_RGB32 in grayscale.
The height of the image is read from the red component of the pixels if the image is in grayscale, otherwise it is an average calculated from red, green, and blue components of the pixels. Using grayscale images may improve data conversion speed for large images.
Not recommended formats: all mono formats (for example QImage::Format_Mono).
The height map is resolved asynchronously. QSurfaceDataProxy::arrayReset() is emitted when the data has been resolved.
Access functions:
QImage | heightMap() const |
void | setHeightMap(const QImage &image) |
Notifier signal:
void | heightMapChanged(const QImage &image) |
heightMapFile : QString
A file with a height map image to be visualized. Setting this property replaces current data with height map data.
Access functions:
QString | heightMapFile() const |
void | setHeightMapFile(const QString &filename) |
Notifier signal:
void | heightMapFileChanged(const QString &filename) |
See also heightMap.
maxXValue : float
The maximum X value for the generated surface points. Defaults to 10.0
. When setting this property the corresponding minimum value is adjusted if necessary, to ensure that the range remains valid.
Access functions:
float | maxXValue() const |
void | setMaxXValue(float max) |
Notifier signal:
void | maxXValueChanged(float value) |
maxZValue : float
The maximum Z value for the generated surface points. Defaults to 10.0
. When setting this property the corresponding minimum value is adjusted if necessary, to ensure that the range remains valid.
Access functions:
float | maxZValue() const |
void | setMaxZValue(float max) |
Notifier signal:
void | maxZValueChanged(float value) |
minXValue : float
The minimum X value for the generated surface points. Defaults to 0.0
. When setting this property the corresponding maximum value is adjusted if necessary, to ensure that the range remains valid.
Access functions:
float | minXValue() const |
void | setMinXValue(float min) |
Notifier signal:
void | minXValueChanged(float value) |
minZValue : float
The minimum Z value for the generated surface points. Defaults to 0.0
. When setting this property the corresponding maximum value is adjusted if necessary, to ensure that the range remains valid.
Access functions:
float | minZValue() const |
void | setMinZValue(float min) |
Notifier signal:
void | minZValueChanged(float value) |
Member Function Documentation
QHeightMapSurfaceDataProxy::QHeightMapSurfaceDataProxy(QObject *parent = Q_NULLPTR)
Constructs QHeightMapSurfaceDataProxy with the given parent.
QHeightMapSurfaceDataProxy::QHeightMapSurfaceDataProxy(const QImage &image, QObject *parent = Q_NULLPTR)
Constructs QHeightMapSurfaceDataProxy with the given image and parent. Height map is set by calling setHeightMap() with image.
See also heightMap.
QHeightMapSurfaceDataProxy::QHeightMapSurfaceDataProxy(const QString &filename, QObject *parent = Q_NULLPTR)
Constructs QHeightMapSurfaceDataProxy from the given image filename and parent. Height map is set by calling setHeightMapFile() with filename.
See also heightMapFile.
[virtual]
QHeightMapSurfaceDataProxy::~QHeightMapSurfaceDataProxy()
Destroys QHeightMapSurfaceDataProxy.
void QHeightMapSurfaceDataProxy::setValueRanges(float minX, float maxX, float minZ, float maxZ)
A convenience function for setting all minimum (minX and minZ) and maximum (maxX and maxZ) values at the same time. The minimum values must be smaller than the corresponding maximum value. Otherwise the values get adjusted so that they are valid.
© 2017 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.