diff options
Diffstat (limited to 'examples')
-rw-r--r-- | examples/qt3d/scene3d/AnimatedEntity.qml | 6 | ||||
-rw-r--r-- | examples/qt3d/scene3d/main.qml | 21 |
2 files changed, 26 insertions, 1 deletions
diff --git a/examples/qt3d/scene3d/AnimatedEntity.qml b/examples/qt3d/scene3d/AnimatedEntity.qml index 3e24dc785..962317a6b 100644 --- a/examples/qt3d/scene3d/AnimatedEntity.qml +++ b/examples/qt3d/scene3d/AnimatedEntity.qml @@ -48,7 +48,7 @@ ** ****************************************************************************/ -import Qt3D.Core 2.0 +import Qt3D.Core 2.15 import Qt3D.Render 2.15 import Qt3D.Input 2.0 import Qt3D.Extras 2.15 @@ -60,6 +60,10 @@ Entity { id: sceneRoot property RenderCapabilities capabilities : renderSettings.renderCapabilities + property bool validBounds: sphereMesh.implicitPointsValid + property vector3d sphereMinPt: sphereMesh.implicitMinPoint + property vector3d sphereMaxPt: sphereMesh.implicitMaxPoint + Camera { id: camera projectionType: CameraLens.PerspectiveProjection diff --git a/examples/qt3d/scene3d/main.qml b/examples/qt3d/scene3d/main.qml index 6d5617ca3..f7ba24ab4 100644 --- a/examples/qt3d/scene3d/main.qml +++ b/examples/qt3d/scene3d/main.qml @@ -151,6 +151,27 @@ Item { } } + Rectangle { + radius: 10 + color: "#aaffffff" + border.width: 1 + border.color: "black" + width: childrenRect.width + anchors.margins + height: childrenRect.height + anchors.margins + anchors.bottom: parent.bottom + anchors.left: parent.left + anchors.margins: 20 + visible: rootEntity.validBounds + + Column { + x: parent.anchors.margins / 2 + y: x + + Text { text: "Sphere:\n Min Extent: " + rootEntity.sphereMinPt } + Text { text: " Max Extent: " + rootEntity.sphereMaxPt } + } + } + SequentialAnimation { id: animation |