Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qssgplane.cpp
Go to the documentation of this file.
1
// Copyright (C) 2008-2012 NVIDIA Corporation.
2
// Copyright (C) 2019 The Qt Company Ltd.
3
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
4
5
#include "
qssgplane_p.h
"
6
7
QT_BEGIN_NAMESPACE
8
9
namespace
{
10
float
magnitude
(
const
QVector3D
&
vector
)
11
{
12
return
std::sqrt(
vector
.x() *
vector
.x() +
vector
.y() *
vector
.y() +
vector
.z() *
vector
.z());
13
}
14
}
15
16
void
QSSGPlane::normalize
()
17
{
18
float
denom = 1.0f / magnitude(
n
);
19
n
*= denom;
20
d
*= denom;
21
}
22
23
QT_END_NAMESPACE
QSSGPlane::d
float d
The distance from the origin.
Definition
qssgplane_p.h:83
QSSGPlane::normalize
void normalize()
equivalent plane with unit normal
Definition
qssgplane.cpp:16
QVector3D
The QVector3D class represents a vector or vertex in 3D space.
Definition
qvectornd.h:171
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qstandardpaths_haiku.cpp:21
QT_BEGIN_NAMESPACE::magnitude
float magnitude(const QVector3D &vector)
Definition
qssgplane.cpp:10
QT_END_NAMESPACE
Definition
qsharedpointer.cpp:1590
n
GLfloat n
Definition
qopengles2ext.h:795
qssgplane_p.h
vector
QList< int > vector
[14]
Definition
src_concurrent_qtconcurrentmap.cpp:156
qtquick3d
src
utils
qssgplane.cpp
Generated by
1.10.0