Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
src_gui_math3d_qquaternion.cpp
Go to the documentation of this file.
1
// Copyright (C) 2018 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
3
#
include
<
QQuaternion
>
4
#
include
<
QVector3D
>
5
6
7
namespace
src_gui_math3d_qquaternion
{
8
QQuaternion
q
;
9
QVector3D
vector
;
10
void
wrapper0
() {
11
12
//! [0]
13
QVector3D result = q.rotatedVector(vector);
14
//! [0]
15
16
Q_UNUSED(result);
17
}
// wrapper0
18
19
20
void
wrapper1
() {
21
22
//! [1]
23
QVector3D result = (
q
* QQuaternion(0, vector) * q.conjugated()).vector();
24
//! [1]
25
26
Q_UNUSED(result);
27
}
// wrapper1
28
}
// src_gui_math3d_qquaternion
src_gui_math3d_qquaternion
Definition
src_gui_math3d_qquaternion.cpp:7
src_gui_math3d_qquaternion::vector
QVector3D vector
Definition
src_gui_math3d_qquaternion.cpp:9
src_gui_math3d_qquaternion::wrapper0
void wrapper0()
Definition
src_gui_math3d_qquaternion.cpp:10
src_gui_math3d_qquaternion::wrapper1
void wrapper1()
Definition
src_gui_math3d_qquaternion.cpp:20
src_gui_math3d_qquaternion::q
QQuaternion q
Definition
src_gui_math3d_qquaternion.cpp:8
qtbase
src
gui
doc
snippets
code
src_gui_math3d_qquaternion.cpp
Generated on
for Qt by
1.14.0