Camera QML Type
Defines a view point through which the scene will be rendered. More...
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(real angle, vector3d axis)
- void pan(real angle)
- void panAboutViewCenter(real angle, vector3d axis)
- void panAboutViewCenter(real angle)
- quaternion panRotation(real angle)
- void roll(real angle)
- void rollAboutViewCenter(real angle)
- quaternion rollRotation(real angle)
- void rotate(quaternion q)
- void rotateAboutViewCenter(quaternion q)
- quaternion rotation(real angle, vector3d axis)
- void tilt(real angle)
- void tiltAboutViewCenter(real angle)
- quaternion tiltRotation(real angle)
- void translate(vector3d vLocal, enumeration option)
- void translateWorld(vector3d vWorld, enumeration option)
- void viewAll()
- void viewEntity(Entity entity)
- void viewSphere(vector3d center, real radius)
Detailed Description
Property Documentation
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.
Holds the type of the camera projection.
- CameraLens.OrthographicProjection
- CameraLens.PerspectiveProjection
- CameraLens.FrustumProjection
- CameraLens.CustomProjection
See also Qt3DRender::QCameraLens::ProjectionType.
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(real angle, vector3d axis) |
Adjusts the camera pan about view center by angle in degrees on axis.
void panAboutViewCenter(real angle, vector3d axis) |
Adjusts the camera pan about view center by angle in degrees on axis.
quaternion panRotation(real 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.
quaternion rollRotation(real 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(quaternion q) |
Rotates the camera with the use of a Quaternion in q.
void rotateAboutViewCenter(quaternion q) |
Rotates the camera about the view center with the use of a Quaternion in q.
quaternion rotation(real angle, vector3d axis) |
Returns the calculated rotation in relation to the angle in degrees and chosen axis taken in.
quaternion tiltRotation(real 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(vector3d 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
void translateWorld(vector3d 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
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 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(vector3d 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.
© 2018 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.