|
| 1 | +.\" Automatically generated by Pandoc 1.17.0.3 |
| 2 | +.\" |
| 3 | +.TH "RTCQuaternionDecomposition" "3" "" "" "Embree Ray Tracing Kernels 3" |
| 4 | +.hy |
| 5 | +.SS NAME |
| 6 | +.IP |
| 7 | +.nf |
| 8 | +\f[C] |
| 9 | +RTCQuaternionDecomposition\ \-\ structure\ that\ represents\ a\ quaternion |
| 10 | +\ \ decomposition\ of\ an\ affine\ transformation |
| 11 | +\f[] |
| 12 | +.fi |
| 13 | +.SS SYNOPSIS |
| 14 | +.IP |
| 15 | +.nf |
| 16 | +\f[C] |
| 17 | +struct\ RTCQuaternionDecomposition |
| 18 | +{ |
| 19 | +\ \ float\ scale_x,\ scale_y,\ scale_z; |
| 20 | +\ \ float\ skew_xy,\ skew_xz,\ skew_yz; |
| 21 | +\ \ float\ shift_x,\ shift_y,\ shift_z; |
| 22 | +\ \ float\ quaternion_r,\ quaternion_i,\ quaternion_j,\ quaternion_k; |
| 23 | +\ \ float\ translation_x,\ translation_y,\ translation_z; |
| 24 | +}; |
| 25 | +\f[] |
| 26 | +.fi |
| 27 | +.SS DESCRIPTION |
| 28 | +.PP |
| 29 | +The struct \f[C]RTCQuaternionDecomposition\f[] represents an affine |
| 30 | +transformation decomposed into three parts. |
| 31 | +An upper triangular scaling/skew/shift matrix |
| 32 | +.PP |
| 33 | +.RS |
| 34 | +$$ |
| 35 | +S = \\left( \\begin{array}{cccc} |
| 36 | +scale_x & skew_{xy} & skew_{xz} & shift_x \\\\ |
| 37 | +0 & scale_y & skew_{yz} & shift_y \\\\ |
| 38 | +0 & 0 & scale_z & shift_z \\\\ |
| 39 | +0 & 0 & 0 & 1 \\\\ |
| 40 | +\\end{array} \\right), |
| 41 | +$$ |
| 42 | +.RE |
| 43 | +.PP |
| 44 | +a translation matrix |
| 45 | +.PP |
| 46 | +.RS |
| 47 | +$$ |
| 48 | +T = \\left( \\begin{array}{cccc} |
| 49 | +1 & 0 & 0 & translation_x \\\\ |
| 50 | +0 & 1 & 0 & translation_y \\\\ |
| 51 | +0 & 0 & 1 & translation_z \\\\ |
| 52 | +0 & 0 & 0 & 1 \\\\ |
| 53 | +\\end{array} \\right), |
| 54 | +$$ |
| 55 | +.RE |
| 56 | +.PP |
| 57 | +and a rotation matrix \f[I]R\f[], represented as a quaternion |
| 58 | +.PP |
| 59 | +\f[I]q\f[]\f[I]u\f[]\f[I]a\f[]\f[I]t\f[]\f[I]e\f[]\f[I]r\f[]\f[I]n\f[]\f[I]i\f[]\f[I]o\f[]\f[I]n\f[]~\f[I]r\f[]~ + \f[I]q\f[]\f[I]u\f[]\f[I]a\f[]\f[I]t\f[]\f[I]e\f[]\f[I]r\f[]\f[I]n\f[]\f[I]i\f[]\f[I]o\f[]\f[I]n\f[]~\f[I]i\f[]~\ \f[B]i\f[] + \f[I]q\f[]\f[I]u\f[]\f[I]a\f[]\f[I]t\f[]\f[I]e\f[]\f[I]r\f[]\f[I]n\f[]\f[I]i\f[]\f[I]o\f[]\f[I]n\f[]~\f[I]j\f[]~\ \f[B]i\f[] + \f[I]q\f[]\f[I]u\f[]\f[I]a\f[]\f[I]t\f[]\f[I]e\f[]\f[I]r\f[]\f[I]n\f[]\f[I]i\f[]\f[I]o\f[]\f[I]n\f[]~\f[I]k\f[]~\ \f[B]k\f[] |
| 60 | +.PP |
| 61 | +where \f[B]i\f[], \f[B]j\f[] \f[B]k\f[] are the imaginary quaternion |
| 62 | +units. |
| 63 | +The passed quaternion has to be a properly normalized unit quaternion, |
| 64 | +as only these represent rotations. |
| 65 | +.PP |
| 66 | +The affine transformation matrix corresponding to a |
| 67 | +\f[C]RTCQuaternionDecomposition\f[] is \f[I]T\f[]\f[I]R\f[]\f[I]S\f[] |
| 68 | +and a point |
| 69 | +\f[I]p\f[] = (\f[I]p\f[]~\f[I]x\f[]~, \f[I]p\f[]~\f[I]y\f[]~, \f[I]p\f[]~\f[I]z\f[]~, 1)^\f[I]T\f[]^ |
| 70 | +will be transformed as |
| 71 | +.RS |
| 72 | +\f[I]p\f[]′=\f[I]T\f[]\ \f[I]R\f[]\ \f[I]S\f[]\ \f[I]p\f[]. |
| 73 | +.RE |
| 74 | +.PP |
| 75 | +The functions \f[C]rtcInitQuaternionDecomposition\f[], |
| 76 | +\f[C]rtcQuaternionDecompositionSetQuaternion\f[], |
| 77 | +\f[C]rtcQuaternionDecompositionSetScale\f[], |
| 78 | +\f[C]rtcQuaternionDecompositionSetSkew\f[], |
| 79 | +\f[C]rtcQuaternionDecompositionSetShift\f[], and |
| 80 | +\f[C]rtcQuaternionDecompositionSetTranslation\f[] allow to set the |
| 81 | +fields of the structure more conveniently. |
| 82 | +.SS EXIT STATUS |
| 83 | +.PP |
| 84 | +No error code is set by this function. |
| 85 | +.SS SEE ALSO |
| 86 | +.PP |
| 87 | +[rtcSetGeometryTransformQuaternion], [rtcInitQuaternionDecomposition] |
0 commit comments