QHeightMapSurfaceDataProxy Class
Clase proxy base para Q3DSurface. Más...
| Cabecera: | #include <QHeightMapSurfaceDataProxy> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS DataVisualization)target_link_libraries(mytarget PRIVATE Qt6::DataVisualization) |
| qmake: | QT += datavisualization |
| Desde: | QtDataVisualization 1.0 |
| En QML: | HeightMapSurfaceDataProxy |
| Hereda: | QSurfaceDataProxy |
Propiedades
|
Funciones públicas
| QHeightMapSurfaceDataProxy(QObject *parent = nullptr) | |
| QHeightMapSurfaceDataProxy(const QImage &image, QObject *parent = nullptr) | |
| QHeightMapSurfaceDataProxy(const QString &filename, QObject *parent = nullptr) | |
| virtual | ~QHeightMapSurfaceDataProxy() |
| bool | autoScaleY() const |
| QImage | heightMap() const |
| QString | heightMapFile() const |
| float | maxXValue() const |
| float | maxYValue() const |
| float | maxZValue() const |
| float | minXValue() const |
| float | minYValue() const |
| float | minZValue() const |
| void | setAutoScaleY(bool enabled) |
| void | setHeightMap(const QImage &image) |
| void | setHeightMapFile(const QString &filename) |
| void | setMaxXValue(float max) |
| void | setMaxYValue(float max) |
| void | setMaxZValue(float max) |
| void | setMinXValue(float min) |
| void | setMinYValue(float min) |
| void | setMinZValue(float min) |
| void | setValueRanges(float minX, float maxX, float minZ, float maxZ) |
Señales
| void | autoScaleYChanged(bool enabled) |
| void | heightMapChanged(const QImage &image) |
| void | heightMapFileChanged(const QString &filename) |
| void | maxXValueChanged(float value) |
| void | maxYValueChanged(float value) |
| void | maxZValueChanged(float value) |
| void | minXValueChanged(float value) |
| void | minYValueChanged(float value) |
| void | minZValueChanged(float value) |
Descripción Detallada
QHeightMapSurfaceDataProxy se encarga del manejo de datos de mapas de altura relacionados con superficies. Proporciona una manera de dar un mapa de altura para ser visualizado como un gráfico de superficie.
Dado que los mapas de altura no contienen valores para los ejes X o Z, esos valores deben darse por separado utilizando las propiedades minXValue, maxXValue, minZValue, y maxZValue. El valor X corresponde a la dirección horizontal de la imagen y el valor Z a la vertical. Al establecer cualquiera de estas propiedades se desencadena una nueva resolución asíncrona de cualquier mapa de alturas existente.
Véase también QSurfaceDataProxy y Qt Data Visualization Manejo de datos.
Documentación de propiedades
[since 6.3] autoScaleY : bool
Escala los valores de altura al eje Y.
Por defecto es false.
Cuando esta propiedad se establece en true, los valores de altura se escalan para ajustarse al eje Y entre minYValue y maxYValue.
Esta propiedad se introdujo en Qt 6.3.
Funciones de acceso:
| bool | autoScaleY() const |
| void | setAutoScaleY(bool enabled) |
Señal de notificador:
| void | autoScaleYChanged(bool enabled) |
Véase también minYValue y maxYValue.
heightMap : QImage
Esta propiedad contiene la imagen del mapa de alturas que se va a visualizar.
Funciones de acceso:
| QImage | heightMap() const |
| void | setHeightMap(const QImage &image) |
Señal del notificador:
| void | heightMapChanged(const QImage &image) |
heightMapFile : QString
Esta propiedad contiene el nombre del archivo con la imagen del mapa de alturas que se va a visualizar.
Funciones de acceso:
| QString | heightMapFile() const |
| void | setHeightMapFile(const QString &filename) |
Señal del notificador:
| void | heightMapFileChanged(const QString &filename) |
maxXValue : float
Esta propiedad contiene el valor X máximo para los puntos de superficie generados.
Por defecto es 10.0.
Cuando se establece esta propiedad, el valor mínimo correspondiente se ajusta si es necesario, para asegurar que el rango sigue siendo válido.
Funciones de acceso:
| float | maxXValue() const |
| void | setMaxXValue(float max) |
Señal del notificador:
| void | maxXValueChanged(float value) |
[since 6.3] maxYValue : float
Esta propiedad contiene el valor Y máximo para los puntos de superficie generados.
Por defecto es 10.0.
Cuando se establece esta propiedad, el valor mínimo correspondiente se ajusta si es necesario, para asegurar que el rango sigue siendo válido.
Esta propiedad se introdujo en Qt 6.3.
Funciones de acceso:
| float | maxYValue() const |
| void | setMaxYValue(float max) |
Señal de notificador:
| void | maxYValueChanged(float value) |
Véase también autoScaleY.
maxZValue : float
Esta propiedad contiene el valor máximo de Z para los puntos de superficie generados.
Por defecto es 10.0.
Cuando se establece esta propiedad, el valor mínimo correspondiente se ajusta si es necesario, para asegurar que el rango sigue siendo válido.
Funciones de acceso:
| float | maxZValue() const |
| void | setMaxZValue(float max) |
Señal del notificador:
| void | maxZValueChanged(float value) |
minXValue : float
Esta propiedad contiene el valor X mínimo para los puntos de superficie generados.
Por defecto es 0.0.
Cuando se establece esta propiedad, el valor máximo correspondiente se ajusta si es necesario, para asegurar que el rango sigue siendo válido.
Funciones de acceso:
| float | minXValue() const |
| void | setMinXValue(float min) |
Señal del notificador:
| void | minXValueChanged(float value) |
[since 6.3] minYValue : float
Esta propiedad contiene el valor Y mínimo para los puntos de superficie generados.
Por defecto es 0.0.
Cuando se establece esta propiedad, el valor máximo correspondiente se ajusta si es necesario, para asegurar que el rango sigue siendo válido.
Esta propiedad se introdujo en Qt 6.3.
Funciones de acceso:
| float | minYValue() const |
| void | setMinYValue(float min) |
Señal de notificador:
| void | minYValueChanged(float value) |
Véase también autoScaleY.
minZValue : float
Esta propiedad contiene el valor Z mínimo para los puntos de superficie generados.
Por defecto es 0.0.
Cuando se establece esta propiedad, el valor máximo correspondiente se ajusta si es necesario, para asegurar que el rango sigue siendo válido.
Funciones de acceso:
| float | minZValue() const |
| void | setMinZValue(float min) |
Señal del notificador:
| void | minZValueChanged(float value) |
Documentación de la función miembro
[explicit] QHeightMapSurfaceDataProxy::QHeightMapSurfaceDataProxy(QObject *parent = nullptr)
Construye QHeightMapSurfaceDataProxy con la dirección parent.
[explicit] QHeightMapSurfaceDataProxy::QHeightMapSurfaceDataProxy(const QImage &image, QObject *parent = nullptr)
Construye QHeightMapSurfaceDataProxy con los datos image y parent. El mapa de altura se establece llamando a setHeightMap() con image.
Ver también heightMap.
[explicit] QHeightMapSurfaceDataProxy::QHeightMapSurfaceDataProxy(const QString &filename, QObject *parent = nullptr)
Construye QHeightMapSurfaceDataProxy a partir de la imagen dada filename y parent. El mapa de altura se establece llamando a setHeightMapFile() con filename.
Ver también heightMapFile.
[virtual noexcept] QHeightMapSurfaceDataProxy::~QHeightMapSurfaceDataProxy()
Destruye QHeightMapSurfaceDataProxy.
void QHeightMapSurfaceDataProxy::setHeightMap(const QImage &image)
Sustituye los datos actuales por los datos del mapa de alturas especificados por image.
Hay varios formatos en los que se puede dar el image, pero si no está en un formato directamente utilizable, se hace una conversión.
Nota: Si el resultado parece erróneo, la conversión automática ha fallado y debe intentar convertir el image usted mismo antes de configurarlo. El formato preferido es QImage::Format_RGB32 en escala de grises.
La altura de image se lee a partir del componente rojo de los píxeles si image está en escala de grises, de lo contrario es una media calculada a partir de los componentes rojo, verde y azul de los píxeles. El uso de imágenes en escala de grises puede mejorar la velocidad de conversión de datos en el caso de imágenes de gran tamaño.
Formatos no recomendados: todos los formatos mono (por ejemplo QImage::Format_Mono).
El mapa de alturas se resuelve de forma asíncrona. QSurfaceDataProxy::arrayReset() se emite cuando se han resuelto los datos.
Nota: Función Setter para la propiedad heightMap.
Véase también heightMap().
void QHeightMapSurfaceDataProxy::setHeightMapFile(const QString &filename)
Sustituye los datos actuales por los datos del mapa de alturas del archivo especificado por filename.
Nota: Función Setter para la propiedad heightMapFile.
Véase también heightMapFile() y heightMap.
void QHeightMapSurfaceDataProxy::setValueRanges(float minX, float maxX, float minZ, float maxZ)
Una función práctica para establecer todos los valores mínimos (minX y minZ) y máximos (maxX y maxZ) al mismo tiempo. Los valores mínimos deben ser menores que el valor máximo correspondiente. De lo contrario, los valores se ajustan para que sean válidos.
© 2026 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.