Getting Started with Kuesa Qt 3D
For a C++ applications and C++/QML applications that performs 2D or 3D rendering leveraging the Kuesa and Qt 3D modules:
CMakeLists.txt
| find_package(Kuesa REQUIRED)
target_link_libraries(${PROJECT_NAME}
PRIVATE
Kuesa::Kuesa
Kuesa::KuesaQt3D
Kuesa::KuesaQt3DUtils)
|
To include the definitions of the module's classes, use the following directives:
C++:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 | #include <Kuesa>
int main(int ac, char **av)
{
QGuiApplication app(ac, av);
Qt3DExtras::Qt3DWindow w;
KuesaUtils::SceneConfiguration sceneConfiguration;
sceneConf.setSource(QUrl("file:///path/to/file.gltf"));
sceneConf.setCameraName("CameraNameInGLTF");
KuesaUtils::View3DScene view3d;
view3d.setActiveScene(&sceneConfiguration);
w.setRootEntity(&view3d);
w.setActiveFrameGraph(view3d.frameGraph());
w.show();
return app.exec();
}
|
Kuesa Qt3D CPP Examples
QML:
| import Kuesa 2.0
import Kuesa.Utils 2.0
View3D {
id: scene3D
multisample: true
source: "file:///path/to/file.gltf"
camera: "cameraNameInGLTF"
}
|
Kuesa Qt3D QML Examples
Updated on 2023-07-03 at 11:02:17 +0000