- Qt 6.11
- Qt 3D
- C++ Classes
- Qt3DRender (Deprecated)
- QDepthRange
- Qt 6.11.1 Reference Documentation

# Qt3DRender::QDepthRange Class

class Qt3DRender::QDepthRange

Enables remapping depth values written into the depth buffer. More...

Header: | `#include <QDepthRange>`
CMake: | `find_package(Qt6 REQUIRED COMPONENTS 3drender)` `target_link_libraries(mytarget PRIVATE Qt6::3drender)`
qmake: | `QT += 3drender`
In QML: | DepthRange
Inherits: | Qt3DRender::QRenderState
Status: | Deprecated

- List of all members, including inherited members

## Properties

- farValue : double
- nearValue : double

## Public Functions

double | farValue() const
double | nearValue() const

## Public Slots

void | setFarValue(double value)
void | setNearValue(double value)

## Signals

void | farValueChanged(double farValue)
void | nearValueChanged(double nearValue)

## Detailed Description

By default, OpenGL writes scene depth information into the depth buffer in the range [0.0, 1.0] with 0.0 corresponding to the near clip plane and 1.0 to the far clip plane. QDepthRange allows mapping these values into a different range so parts of the scene are always rendered in front of or behind other parts. Valid values for near and far are between 0 and 1.

## Property Documentation

### farValue : double

The depth buffer value corresponding to the far clip plane. Valid values for are between 0 and 1.

Access functions:

double | farValue() const
void | setFarValue(double value)

Notifier signal:

void | farValueChanged(double farValue)

### nearValue : double

The depth buffer value corresponding to the near clip plane. Valid values for are between 0 and 1.

Access functions:

double | nearValue() const
void | setNearValue(double value)

Notifier signal:

void | nearValueChanged(double nearValue)