Qt 5.7 | Qt 3D | C++ Classes | QClipPlane

Qt 5.7.1 Reference Documentation

# QClipPlane Class

(Qt3DRender::QClipPlane)

Enables an additional OpenGL clipping plane that can be in shaders using gl_ClipDistance More...

Header: | #include <QClipPlane>
qmake: | QT += 3drender
Since: | Qt 5.5
Instantiated By: | ClipPlane
Inherits: | QRenderState

- List of all members, including inherited members

## Properties

- distance : float
- normal : QVector3D
- planeIndex : int

- 2 properties inherited from Qt3DCore::QNode

## Public Functions

| QClipPlane(Qt3DCore::QNode *parent = nullptr)
float | distance() const
QVector3D | normal() const
int | planeIndex() const

- 6 public functions inherited from Qt3DCore::QNode

## Public Slots

void | setDistance(float)
void | setNormal(QVector3D)
void | setPlaneIndex(int planeIndex)

- 2 public slots inherited from Qt3DCore::QNode

## Signals

void | distanceChanged(float distance)
void | normalChanged(QVector3D normal)
void | planeIndexChanged(int planeIndex)

- 3 signals inherited from Qt3DCore::QNode

### Additional Inherited Members

- 2 protected functions inherited from Qt3DCore::QNode

## Detailed Description

Enables an additional OpenGL clipping plane that can be in shaders using gl_ClipDistance

By default, OpenGL supports up to 8 additional clipping planes. Qt3DCore::QClipPlane allows to enable one of these additional planes. These planes can then be manipulated in the shaders using gl_ClipDistance[i] where i varies between 0 and 8.

## Property Documentation

### distance : float

Access functions:

float | distance() const
void | setDistance(float)

Notifier signal:

void | distanceChanged(float distance)

### normal : QVector3D

Access functions:

QVector3D | normal() const
void | setNormal(QVector3D)

Notifier signal:

void | normalChanged(QVector3D normal)

### planeIndex : int

Access functions:

int | planeIndex() const
void | setPlaneIndex(int planeIndex)

Notifier signal:

void | planeIndexChanged(int planeIndex)

## Member Function Documentation

### QClipPlane::QClipPlane(Qt3DCore::QNode *parent = nullptr)

Default constructs an instance of QClipPlane.

### int QClipPlane::planeIndex() const

Returns the index of the clip plane.

Note: usually between 0-7

Note: Getter function for property planeIndex.

See also setPlaneIndex().

### `[slot]` void QClipPlane::setPlaneIndex(int planeIndex)

Sets the index of the clip plane to plane.

Note: above 7, support is not garanteed

Note: Setter function for property planeIndex.

See also planeIndex().