Class Quick3DTerrainGeometry
ClassList > Quick3DTerrainGeometry
#include <quick3dterraingeometry.h>
Inherits the following classes: QQuick3DGeometry
Public Properties
| Type | Name |
|---|---|
| property QML_ELEMENT QSize | gridSize Grid dimensions (width x height) for terrain vertices. |
| property QVariantList | heightData Height data array for terrain elevation values. |
| property QSizeF | size Width of the terrain mesh in 3D scene units. |
Public Signals
| Type | Name |
|---|---|
| signal void | gridSizeChanged |
| signal void | heightDataChanged |
| signal void | sizeChanged |
Public Functions
| Type | Name |
|---|---|
| Quick3DTerrainGeometry (QQuick3DObject * parent=nullptr) Creates a new terrain geometry. |
|
| QSize | gridSize () const Returns the grid dimensions. |
| void | setGridSize (const QSize & size) Sets the grid dimensions. |
| void | setHeightData (const QVariantList & data) Sets the height data array. |
| void | setSize (QSizeF size) Sets the terrain width. |
| QSizeF | size () const Returns the width of the terrain mesh in 3D scene units. |
Detailed Description
Custom Qt Quick 3D geometry for rendering terrain meshes with height data.
This class generates a triangulated mesh grid with vertex positions, normals, and texture coordinates based on provided elevation data. The geometry is suitable for use with Qt Quick 3D Model items and supports dynamic updates when height data changes.
Note:
QML Type: Quick3DTerrainGeometry
Public Properties Documentation
property gridSize [1/2]
Grid dimensions (width x height) for terrain vertices.
QML_ELEMENT QSize Quick3DTerrainGeometry::gridSize;
property heightData
Height data array for terrain elevation values.
QVariantList Quick3DTerrainGeometry::heightData;
property size [1/2]
Width of the terrain mesh in 3D scene units.
QSizeF Quick3DTerrainGeometry::size;
Public Signals Documentation
signal gridSizeChanged
void Quick3DTerrainGeometry::gridSizeChanged;
signal heightDataChanged
void Quick3DTerrainGeometry::heightDataChanged;
signal sizeChanged
void Quick3DTerrainGeometry::sizeChanged;
Public Functions Documentation
function Quick3DTerrainGeometry
Creates a new terrain geometry.
explicit Quick3DTerrainGeometry::Quick3DTerrainGeometry (
QQuick3DObject * parent=nullptr
)
function gridSize [2/2]
Returns the grid dimensions.
inline QSize Quick3DTerrainGeometry::gridSize () const
function setGridSize
Sets the grid dimensions.
void Quick3DTerrainGeometry::setGridSize (
const QSize & size
)
function setHeightData
Sets the height data array.
void Quick3DTerrainGeometry::setHeightData (
const QVariantList & data
)
function setSize
Sets the terrain width.
void Quick3DTerrainGeometry::setSize (
QSizeF size
)
function size [2/2]
Returns the width of the terrain mesh in 3D scene units.
inline QSizeF Quick3DTerrainGeometry::size () const
The documentation for this class was generated from the following file src/core/3d/quick3dterraingeometry.h