Kuesa Runtime

TransformTracker QML Type

TransformTracker allows watching a transform for change and computing a projected screen position given a window size and a camera. More...

Since: Kuesa 1.3
Instantiates: TransformTracker

Properties

Detailed Description

TransformTracker allows watching a transform for change and computing a projected screen position given a window size and a camera.

This is especially useful to place 2D content based on a 3D position.

 SceneEntity {
     id: sceneEntity

     Camera {
         id: camera
     }

     TransformTracker {
         name: "MyTransform"
         camera: camera
         screenSize: Qt.size(512, 512)
         onScreenPositionChanged: {
             // Reacts to new position
             ...
         }
     }
 }

Property Documentation

camera : Entity

Holds the camera entity from which we should compute the screen position.


matrix : matrix4x4

Holds the local transformation matrix associated to the tracker's referenced Transform instance.


name : string

Holds the name of theTransform instance to retrieve from the SceneEntity.


rotation : quaternion

Holds the local rotation associated to the tracker's referenced Transform instance.


rotationX : float

Holds the local x rotation (euler angle) associated to the tracker's referenced Transform instance.


rotationY : float

Holds the local y rotation (euler angle) associated to the tracker's referenced Transform instance.


rotationZ : float

Holds the local z rotation (euler angle) associated to the tracker's referenced Transform instance.


scale : float

Holds the local uniform scale associated to the tracker's referenced Transform instance.


scale3D : vector3d

Holds the local 3D scale associated to the tracker's referenced Transform instance.


screenPosition : point

Holds the 2D screen position computed from the transformation in world space obtained from the tracker's referenced Transform, the camera, the sceneSize and viewportRect.


screenSize : size

Holds the size of the area within which we should compute screen positions. This would usually be the size of the window or the size of the sub view within the window.


translation : vector3d

Holds the local translation associated to the tracker's referenced Transform instance.


viewportRect : rect

Holds the normalized viewport rectangle defining the area into which screen positions should be computed. If unspecified Qt.rect(0.0, 0.0, 1.0, 1.0) will be used.


[read-only] worldMatrix : matrix4x4

Holds the world transformation matrix associated to the tracker's referenced Transform instance.