- Qt 6.8
- Qt Graphs
- C++ Classes
- QtGraphs
- QSurfaceDataItem
- Qt Graphs | Commercial or GPLv3

# QSurfaceDataItem Class

The QSurfaceDataItem class provides a container for resolved data to be added to surface graphs. More...

Header: | `#include <QSurfaceDataItem>`
CMake: | `find_package(Qt6 REQUIRED COMPONENTS Graphs)` `target_link_libraries(mytarget PRIVATE Qt6::Graphs)`
qmake: | `QT += graphs`

- List of all members, including inherited members
- QSurfaceDataItem is part of Qt Graphs C++ Classes for 3D.

## Public Functions

| QSurfaceDataItem()
| QSurfaceDataItem(int position)
| QSurfaceDataItem(float x, float y, float z)
int | position() const
void | setPosition(int pos)
void | setX(float value)
void | setY(float value)
void | setZ(float value)
float | x() const
float | y() const
float | z() const

## Detailed Description

A surface data item holds the data for a single vertex in a surface graph. Surface data proxies parse data into QSurfaceDataItem instances for surface graphs.

See also QSurfaceDataProxy and Qt Graphs C++ Classes for 3D.

## Member Function Documentation

### `[constexpr noexcept]` QSurfaceDataItem::QSurfaceDataItem()

Constructs a surface data item.

### `[explicit constexpr noexcept]` QSurfaceDataItem::QSurfaceDataItem(int position)

Constructs a surface data item at the position position.

### `[constexpr noexcept]` QSurfaceDataItem::QSurfaceDataItem(float x, float y, float z)

Constructs a surface data item at the position specified by x, y, and z.

### `[constexpr noexcept]` int QSurfaceDataItem::position() const

Returns the position of this data item.

See also setPosition().

### `[constexpr noexcept]` void QSurfaceDataItem::setPosition(int pos)

Sets the position pos to this data item.

See also position().

### `[constexpr noexcept]` void QSurfaceDataItem::setX(float value)

Sets the x-coordinate of the item position to the value value.

See also x().

### `[constexpr noexcept]` void QSurfaceDataItem::setY(float value)

Sets the y-coordinate of the item position to the value value.

See also y().

### `[constexpr noexcept]` void QSurfaceDataItem::setZ(float value)

Sets the z-coordinate of the item position to the value value.

See also z().

### `[constexpr noexcept]` float QSurfaceDataItem::x() const

Returns the x-coordinate of the position of this data item.

See also setX().

### `[constexpr noexcept]` float QSurfaceDataItem::y() const

Returns the y-coordinate of the position of this data item.

See also setY().

### `[constexpr noexcept]` float QSurfaceDataItem::z() const

Returns the z-coordinate of the position of this data item.

See also setZ().