.\" Automatically generated by Pandoc 2.5
.\"
.TH "RTCQuaternionDecomposition" "3" "" "" "Embree Ray Tracing Kernels 3"
.hy
.SS NAME
.IP
.nf
\f[C]
RTCQuaternionDecomposition \- structure that represents a quaternion
  decomposition of an affine transformation
\f[R]
.fi
.SS SYNOPSIS
.IP
.nf
\f[C]
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;
};
\f[R]
.fi
.SS DESCRIPTION
.PP
The struct \f[C]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]~\[u2005]+\[u2005]\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]\[u2005]+\[u2005]\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]\[u2005]+\[u2005]\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[C]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]\[u2004]=\[u2004](\f[I]p\f[R]~\f[I]x\f[R]~,\[u2006]\f[I]p\f[R]~\f[I]y\f[R]~,\[u2006]\f[I]p\f[R]~\f[I]z\f[R]~,\[u2006]1)^\f[I]T\f[R]^
will be transformed as
.RS
\f[I]p\f[R]\[fm]\[u2004]=\[u2004]\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[C]rtcInitQuaternionDecomposition\f[R],
\f[C]rtcQuaternionDecompositionSetQuaternion\f[R],
\f[C]rtcQuaternionDecompositionSetScale\f[R],
\f[C]rtcQuaternionDecompositionSetSkew\f[R],
\f[C]rtcQuaternionDecompositionSetShift\f[R], and
\f[C]rtcQuaternionDecompositionSetTranslation\f[R] allow to set the
fields of the structure more conveniently.
.SS EXIT STATUS
.PP
No error code is set by this function.
.SS SEE ALSO
.PP
[rtcSetGeometryTransformQuaternion], [rtcInitQuaternionDecomposition]
