Skip to content

Commit

Permalink
Add pose demo
Browse files Browse the repository at this point in the history
  • Loading branch information
sergeivolodin committed May 10, 2021
1 parent f684d01 commit 0dd5b44
Show file tree
Hide file tree
Showing 8 changed files with 1,212 additions and 0 deletions.
21 changes: 21 additions & 0 deletions examples/14_pose/Activity.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/**
* @file Activity.qml
* @brief This file renders the scene in Qt3D
* @author Sergei Volodin
* @version 1.0
* @date 2018-08-03
*/

import Qt3D.Core 2.0
import Qt3D.Extras 2.0

/** @brief a cube at (0, 0, 0) */
Entity {
components: [
// adding material
PhongMaterial { ambient: Qt.rgba(0.5, 0.5, 0.5, 1); },

// adding 5cm^3 cube
CuboidMesh { xExtent: 50; yExtent: 50; zExtent: 50 }
]
}
38 changes: 38 additions & 0 deletions examples/14_pose/ar-pose.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
##### QT
# Name of the application
TEMPLATE = app

TARGET=ar-pose

# Qt configuration for Quick applications
QT += quick multimedia opengl multimediawidgets 3dinput 3drender
CONFIG += c++11

# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target

# The following define makes your compiler emit warnings if you use
# any feature of Qt which as been marked deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS

# You can also make your code fail to compile if you use deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0

##### SOURCES/HEADERS (this project)
SOURCES += main.cpp
RESOURCES += qml.qrc

# adding assets/ folder
# See https://stackoverflow.com/questions/20573838/qt-5-2-including-external-file-into-an-android-package
# https://forum.qt.io/topic/69946/qt-android-assets/4
# https://falsinsoft.blogspot.ch/2017/01/qt-creator-include-additional-files.html
assets.path = /assets
assets.files += $$PWD/assets/*
assets.depends += FORCE
INSTALLS += assets
7 changes: 7 additions & 0 deletions examples/14_pose/assets/camera_matrix.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"camera_matrix": [
7.3321993364036177e+02, 0., 2.9429448615773646e+02, 0., 7.3321993364036177e+02, 6.8074088355361582e+01, 0., 0., 1.
],
"width": 640,
"height": 480
}
Loading

0 comments on commit 0dd5b44

Please sign in to comment.