Camera QML Type
Defines a view point through which the scene will be rendered. More...
Import Statement: | import Qt3D.Render 2.13 |
Since: | Qt 5.5 |
Instantiates: | QCamera |
Inherits: |
Properties
- aspectRatio : real
- bottom : real
- farPlane : real
- fieldOfView : real
- left : real
- nearPlane : real
- position : vector3d
- projectionMatrix : matrix4x4
- projectionType : enumeration
- right : real
- top : real
- upVector : vector3d
- viewCenter : vector3d
- viewVector : vector3d
Methods
- void pan(angle, vector3d axis)
- void pan(angle)
- void panAboutViewCenter(angle, vector3d axis)
- void panAboutViewCenter(angle)
- quaternion panRotation(angle)
- void roll(angle)
- void rollAboutViewCenter(angle)
- quaternion rollRotation(angle)
- void rotate(q)
- void rotateAboutViewCenter(q)
- quaternion rotation(angle, vector3d axis)
- void tilt(angle)
- void tiltAboutViewCenter(angle)
- quaternion tiltRotation(angle)
- void translate(vLocal, enumeration option)
- void translateWorld(vWorld, enumeration option)
- void viewAll()
- void viewEntity(entity)
- void viewSphere(center, real radius)
Detailed Description
Property Documentation
aspectRatio : real
Holds the current aspect ratio of the camera.
bottom : real
Holds the current bottom of the camera.
farPlane : real
Holds the current camera far plane of the camera.
fieldOfView : real
Holds the current field of view of the camera in degrees.
left : real
Holds the current left of the camera.
nearPlane : real
Holds the current camera near plane of the camera.
position : vector3d
Holds the current position of the camera in coordinates relative to the parent entity.
projectionMatrix : matrix4x4
Holds the current projection matrix of the camera.
projectionType : enumeration
Holds the type of the camera projection.
- CameraLens.OrthographicProjection
- CameraLens.PerspectiveProjection
- CameraLens.FrustumProjection
- CameraLens.CustomProjection
See also Qt3DRender::QCameraLens::ProjectionType.
right : real
Holds the current right of the camera.
top : real
Holds the current top of the camera.
upVector : vector3d
Holds the current up vector of the camera in coordinates relative to the parent entity.
[read-only] viewCenter : vector3d
Holds the current view center of the camera in coordinates relative to the parent entity.
[read-only] viewVector : vector3d
Holds the camera's view vector in coordinates relative to the parent entity.
Method Documentation
void pan(angle, vector3d axis)
Adjusts the camera pan about view center by angle in degrees on axis.
void pan(angle)
Adjusts the pan angle of the camera by angle in degrees.
void panAboutViewCenter(angle, vector3d axis)
Adjusts the camera pan about view center by angle in degrees on axis.
void panAboutViewCenter(angle)
Adjusts the camera pan about view center by angle in degrees.
quaternion panRotation(angle)
Returns the calculated pan rotation in relation to the angle in degrees taken in to adjust the camera's pan or left/right rotation on the Y axis.
void roll(angle)
Adjusts the camera roll by angle in degrees.
void rollAboutViewCenter(angle)
Adjusts the camera roll about view center by angle in degrees.
quaternion rollRotation(angle)
Returns the calculated roll rotation in relation to the angle in degrees taken in to adjust the camera's roll or lean left/right rotation on the Z axis.
void rotate(q)
Rotates the camera with the use of a Quaternion in q.
void rotateAboutViewCenter(q)
Rotates the camera about the view center with the use of a Quaternion in q.
quaternion rotation(angle, vector3d axis)
Returns the calculated rotation in relation to the angle in degrees and chosen axis taken in.
void tilt(angle)
Adjusts the tilt angle of the camera by angle in degrees.
void tiltAboutViewCenter(angle)
Adjusts the camera tilt about view center by angle in degrees.
quaternion tiltRotation(angle)
Returns the calculated tilt rotation in relation to the angle in degrees taken in to adjust the camera's tilt or up/down rotation on the X axis.
void translate(vLocal, enumeration option)
Translates the camera's position and its view vector by vLocal in local coordinates. The option allows for toggling whether the view center should be translated.
- Camera.TranslateViewCenter
- Camera.DontTranslateViewCenter
See also Qt3DRender::QCamera::CameraTranslationOption.
void translateWorld(vWorld, enumeration option)
Translates the camera's position and its view vector by vWorld in world coordinates. The option allows for toggling whether the view center should be translated.
- Camera.TranslateViewCenter
- Camera.DontTranslateViewCenter
See also Qt3DRender::QCamera::CameraTranslationOption.
void viewAll()
Rotates and moves the camera so that it's viewCenter is the center of the scene's bounding volume and the entire scene fits in the view port.
Note: Only works if the lens is in perspective projection mode.
See also Qt3D.Render::Camera::projectionType.
void viewEntity(entity)
Rotates and moves the camera so that it's viewCenter is the center of the entity's bounding volume and the entire entity fits in the view port.
Note: Only works if the lens is in perspective projection mode.
See also Qt3D.Render::Camera::projectionType.
void viewSphere(center, real radius)
Rotates and moves the camera so that it's viewCenter is center and a sphere of radius fits in the view port.
Note: Only works if the lens is in perspective projection mode.
See also Qt3D.Render::Camera::projectionType.
© The Qt Company Ltd
Licensed under the GNU Free Documentation License, Version 1.3.
https://doc.qt.io/qt-5.13/qml-qt3d-render-camera.html