79 lines
2.8 KiB
Plaintext
79 lines
2.8 KiB
Plaintext
.\" Automatically generated by Pandoc 3.1.11.1
|
||
.\"
|
||
.TH "RTCQuaternionDecomposition" "3" "" "" "Embree Ray Tracing Kernels 4"
|
||
.SS NAME
|
||
.IP
|
||
.EX
|
||
RTCQuaternionDecomposition \- structure that represents a quaternion
|
||
decomposition of an affine transformation
|
||
.EE
|
||
.SS SYNOPSIS
|
||
.IP
|
||
.EX
|
||
struct RTCQuaternionDecomposition
|
||
{
|
||
float scale_x, scale_y, scale_z;
|
||
float skew_xy, skew_xz, skew_yz;
|
||
float shift_x, shift_y, shift_z;
|
||
float quaternion_r, quaternion_i, quaternion_j, quaternion_k;
|
||
float translation_x, translation_y, translation_z;
|
||
};
|
||
.EE
|
||
.SS DESCRIPTION
|
||
The struct \f[CR]RTCQuaternionDecomposition\f[R] represents an affine
|
||
transformation decomposed into three parts.
|
||
An upper triangular scaling/skew/shift matrix
|
||
.PP
|
||
.RS
|
||
$$
|
||
S = \[rs]left( \[rs]begin{array}{cccc}
|
||
scale_x & skew_{xy} & skew_{xz} & shift_x \[rs]\[rs]
|
||
0 & scale_y & skew_{yz} & shift_y \[rs]\[rs]
|
||
0 & 0 & scale_z & shift_z \[rs]\[rs]
|
||
0 & 0 & 0 & 1 \[rs]\[rs]
|
||
\[rs]end{array} \[rs]right),
|
||
$$
|
||
.RE
|
||
.PP
|
||
a translation matrix
|
||
.PP
|
||
.RS
|
||
$$
|
||
T = \[rs]left( \[rs]begin{array}{cccc}
|
||
1 & 0 & 0 & translation_x \[rs]\[rs]
|
||
0 & 1 & 0 & translation_y \[rs]\[rs]
|
||
0 & 0 & 1 & translation_z \[rs]\[rs]
|
||
0 & 0 & 0 & 1 \[rs]\[rs]
|
||
\[rs]end{array} \[rs]right),
|
||
$$
|
||
.RE
|
||
.PP
|
||
and a rotation matrix \f[I]R\f[R], represented as a quaternion
|
||
.PP
|
||
\f[I]q\f[R]\f[I]u\f[R]\f[I]a\f[R]\f[I]t\f[R]\f[I]e\f[R]\f[I]r\f[R]\f[I]n\f[R]\f[I]i\f[R]\f[I]o\f[R]\f[I]n\f[R]~\f[I]r\f[R]~ + \f[I]q\f[R]\f[I]u\f[R]\f[I]a\f[R]\f[I]t\f[R]\f[I]e\f[R]\f[I]r\f[R]\f[I]n\f[R]\f[I]i\f[R]\f[I]o\f[R]\f[I]n\f[R]~\f[I]i\f[R]~\ \f[B]i\f[R] + \f[I]q\f[R]\f[I]u\f[R]\f[I]a\f[R]\f[I]t\f[R]\f[I]e\f[R]\f[I]r\f[R]\f[I]n\f[R]\f[I]i\f[R]\f[I]o\f[R]\f[I]n\f[R]~\f[I]j\f[R]~\ \f[B]i\f[R] + \f[I]q\f[R]\f[I]u\f[R]\f[I]a\f[R]\f[I]t\f[R]\f[I]e\f[R]\f[I]r\f[R]\f[I]n\f[R]\f[I]i\f[R]\f[I]o\f[R]\f[I]n\f[R]~\f[I]k\f[R]~\ \f[B]k\f[R]
|
||
.PP
|
||
where \f[B]i\f[R], \f[B]j\f[R] \f[B]k\f[R] are the imaginary quaternion
|
||
units.
|
||
The passed quaternion will be normalized internally.
|
||
.PP
|
||
The affine transformation matrix corresponding to a
|
||
\f[CR]RTCQuaternionDecomposition\f[R] is
|
||
\f[I]T\f[R]\f[I]R\f[R]\f[I]S\f[R] and a point
|
||
\f[I]p\f[R] = (\f[I]p\f[R]~\f[I]x\f[R]~, \f[I]p\f[R]~\f[I]y\f[R]~, \f[I]p\f[R]~\f[I]z\f[R]~, 1)^\f[I]T\f[R]^
|
||
will be transformed as
|
||
.RS
|
||
\f[I]p\f[R]′ = \f[I]T\f[R]\ \f[I]R\f[R]\ \f[I]S\f[R]\ \f[I]p\f[R].
|
||
.RE
|
||
.PP
|
||
The functions \f[CR]rtcInitQuaternionDecomposition\f[R],
|
||
\f[CR]rtcQuaternionDecompositionSetQuaternion\f[R],
|
||
\f[CR]rtcQuaternionDecompositionSetScale\f[R],
|
||
\f[CR]rtcQuaternionDecompositionSetSkew\f[R],
|
||
\f[CR]rtcQuaternionDecompositionSetShift\f[R], and
|
||
\f[CR]rtcQuaternionDecompositionSetTranslation\f[R] allow to set the
|
||
fields of the structure more conveniently.
|
||
.SS EXIT STATUS
|
||
No error code is set by this function.
|
||
.SS SEE ALSO
|
||
[rtcSetGeometryTransformQuaternion], [rtcInitQuaternionDecomposition]
|