FrustumCamera QML Type

Defines a PerspectiveCamera with a custom frustum. More...

Import Statement: import QtQuick3D
Inherits:

PerspectiveCamera

Properties

Detailed Description

A Camera defines how the content of the 3D scene is projected onto a 2D surface, such as a View3D. A scene needs at least one Camera in order to visualize its contents.

It is possible to position and rotate the Camera like any other spatial Node in the scene. The Node's location and orientation determines where the Camera is in the scene, and what direction it is facing. The default orientation of the Camera has its forward vector pointing along the negative Z axis and its up vector along the positive Y axis.

The FrustumCamera type provides a PerspectiveCamera where the frustum bounds can be customized. This can be useful for creating asymmetrical frustums.

The following example creates a FrustumCamera at [0, 0, 100] in the scene. The near plane is placed 100 units in front of the camera at the origin. The intersection of the frustum and the near plane is then given by the rectangle that has a bottom left corner at [-5, -5], and a top right corner at [5, 5], and continues until it intersect the far plane, which is located 1000 units from the camera at [0, 0, -900].

Note: The vertical field of view angle is a product of the distance between the camera, the near plane and the length between the top and bottom of the near plane.

Note: If the top and bottom, or left right, values are asymmetric, the apex of the frustum will be shifted, effectively offsetting the camera from its location.

 FrustumCamera {
     position: Qt.vector3d(0, 0, 100)
     clipNear: 100
     clipFar: 1000
     top: 5
     bottom: -5
     left: -5
     right: 5
 }

See also PerspectiveCamera, OrthographicCamera, and CustomCamera.

Property Documentation

bottom : real

The bottom value specifies the bottom of the near clip plane, relative to the camera's position in local coordinates.


left : real

The left value specifies the left of the near clip plane, relative to the camera's position in local coordinates.


right : real

The right value specifies the right of the near clip plane, relative to the camera's position in local coordinates.


top : real

The top value specifies the top of the near clip plane, relative to the camera's position in local coordinates.