- Qt 5.5
- Qt3D Module
- C++ Classes
- QCameraLens
- Qt 5.5.1 Reference Documentation

# QCameraLens Class

(Qt3D::QCameraLens)

Qt3D::QCameraLens specifies the projection matrix that will be used to define a Camera for a 3D scene. More...

Header: | #include <QCameraLens>
qmake: | QT += 3dcore
Since: | Qt 5.5
Instantiated By: | CameraLens
Inherits: | QComponent

- List of all members, including inherited members

## Public Types

enum | ProjectionType { OrthogonalProjection, PerspectiveProjection, FrustumProjection }

## Properties

aspectRatio : float bottom : float farPlane : float fieldOfView : float left : float | nearPlane : float projectionMatrix : const QMatrix4x4 projectionType : ProjectionType right : float top : float

- 2 properties inherited from Qt3D::QComponent
- 1 property inherited from Qt3D::QNode

## Public Functions

| QCameraLens(QNode * parent = 0)
| ~QCameraLens()
float | aspectRatio() const
float | bottom() const
float | farPlane() const
float | fieldOfView() const
float | left() const
float | nearPlane() const
QMatrix4x4 | projectionMatrix() const
ProjectionType | projectionType() const
float | right() const
void | setAspectRatio(float aspectRatio)
void | setBottom(float bottom)
void | setFarPlane(float farPlane)
void | setFieldOfView(float fieldOfView)
void | setFrustumProjection(float left, float right, float bottom, float top, float nearPlane, float farPlane)
void | setLeft(float left)
void | setNearPlane(float nearPlane)
void | setOrthographicProjection(float left, float right, float bottom, float top, float nearPlane, float farPlane)
void | setPerspectiveProjection(float fieldOfView, float aspectRatio, float nearPlane, float farPlane)
void | setProjectionType(ProjectionType projectionType)
void | setRight(float right)
void | setTop(float top)
float | top() const

- 5 public functions inherited from Qt3D::QComponent
- 6 public functions inherited from Qt3D::QNode

## Signals

void | aspectRatioChanged()
void | bottomChanged()
void | farPlaneChanged()
void | fieldOfViewChanged()
void | leftChanged()
void | nearPlaneChanged()
void | projectionMatrixChanged()
void | projectionTypeChanged()
void | rightChanged()
void | topChanged()

- 2 signals inherited from Qt3D::QComponent
- 1 signal inherited from Qt3D::QNode

## Protected Functions

| QCameraLens(QCameraLensPrivate & dd, QNode * parent = 0)

## Reimplemented Protected Functions

virtual void | copy(const QNode * ref)

- 1 protected function inherited from Qt3D::QComponent
- 3 protected functions inherited from Qt3D::QNode

### Additional Inherited Members

- 1 static protected member inherited from Qt3D::QNode

## Detailed Description

Qt3D::QCameraLens specifies the projection matrix that will be used to define a Camera for a 3D scene.

## Member Type Documentation

### enum QCameraLens::ProjectionType

## Property Documentation

### aspectRatio : float

Access functions:

float | aspectRatio() const
void | setAspectRatio(float aspectRatio)

Notifier signal:

void | aspectRatioChanged()

### bottom : float

Access functions:

float | bottom() const
void | setBottom(float bottom)

Notifier signal:

void | bottomChanged()

### farPlane : float

Access functions:

float | farPlane() const
void | setFarPlane(float farPlane)

Notifier signal:

void | farPlaneChanged()

### fieldOfView : float

Access functions:

float | fieldOfView() const
void | setFieldOfView(float fieldOfView)

Notifier signal:

void | fieldOfViewChanged()

### left : float

Access functions:

float | left() const
void | setLeft(float left)

Notifier signal:

void | leftChanged()

### nearPlane : float

Access functions:

float | nearPlane() const
void | setNearPlane(float nearPlane)

Notifier signal:

void | nearPlaneChanged()

### projectionMatrix : const QMatrix4x4

Access functions:

QMatrix4x4 | projectionMatrix() const

Notifier signal:

void | projectionMatrixChanged()

### projectionType : ProjectionType

Access functions:

ProjectionType | projectionType() const
void | setProjectionType(ProjectionType projectionType)

Notifier signal:

void | projectionTypeChanged()

### right : float

Access functions:

float | right() const
void | setRight(float right)

Notifier signal:

void | rightChanged()

### top : float

Access functions:

float | top() const
void | setTop(float top)

Notifier signal:

void | topChanged()

## Member Function Documentation

### QCameraLens::QCameraLens(QNode * parent = 0)

### `[protected]` QCameraLens::QCameraLens(QCameraLensPrivate & dd, QNode * parent = 0)

### QCameraLens::~QCameraLens()

### `[virtual protected]` void QCameraLens::copy(const QNode * ref)

### void QCameraLens::setFrustumProjection(float left, float right, float bottom, float top, float nearPlane, float farPlane)

Defines an orthographic projection based on left, right, bottom, top, nearPlane, farPlane.

### void QCameraLens::setOrthographicProjection(float left, float right, float bottom, float top, float nearPlane, float farPlane)

Defines an orthographic projection based on left, right, bottom, top, nearPlane, farPlane.

### void QCameraLens::setPerspectiveProjection(float fieldOfView, float aspectRatio, float nearPlane, float farPlane)

Defines a perspective projection based on fieldOfView, aspectRatio, nearPlane, farPlane.