1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> 5 6 <title>frameworks/rs/scriptc/rs_matrix.rsh File Reference</title> 7 <link href="tabs.css" rel="stylesheet" type="text/css"/> 8 <link href="doxygen.css" rel="stylesheet" type="text/css" /> 9 10 11 12 </head> 13 <body> 14 <div id="top"><!-- do not remove this div! --> 15 16 17 <!-- Generated by Doxygen 1.7.5.1 --> 18 <div id="navrow1" class="tabs"> 19 <ul class="tablist"> 20 <li><a href="index.html"><span>Overview</span></a></li> 21 <li class="current"><a href="globals.html"><span>Globals</span></a></li> 22 <li><a href="annotated.html"><span>Structs</span></a></li> 23 </ul> 24 </div> 25 </div> 26 <div class="header"> 27 <div class="summary"> 28 <a href="#func-members">Functions</a> </div> 29 <div class="headertitle"> 30 <div class="title">frameworks/rs/scriptc/rs_matrix.rsh File Reference</div> </div> 31 </div> 32 <div class="contents"> 33 <table class="memberdecls"> 34 <tr><td colspan="2"><h2><a name="func-members"></a> 35 Functions</h2></td></tr> 36 <tr><td class="memItemLeft" align="right" valign="top">_RS_RUNTIME void </td><td class="memItemRight" valign="bottom"><a class="el" href="rs__matrix_8rsh.html#aca88832ed720e301780152c60884393e">rsMatrixSet</a> (<a class="el" href="structrs__matrix4x4.html">rs_matrix4x4</a> *m, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> col, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> row, float v)</td></tr> 37 <tr><td class="memItemLeft" align="right" valign="top">_RS_RUNTIME void </td><td class="memItemRight" valign="bottom"><a class="el" href="rs__matrix_8rsh.html#a08a247cdf2e70e78310bf04f9ecd5144">rsMatrixSet</a> (<a class="el" href="structrs__matrix3x3.html">rs_matrix3x3</a> *m, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> col, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> row, float v)</td></tr> 38 <tr><td class="memItemLeft" align="right" valign="top">_RS_RUNTIME void </td><td class="memItemRight" valign="bottom"><a class="el" href="rs__matrix_8rsh.html#af9707d7be5945bf55ed53683624176ff">rsMatrixSet</a> (<a class="el" href="structrs__matrix2x2.html">rs_matrix2x2</a> *m, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> col, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> row, float v)</td></tr> 39 <tr><td class="memItemLeft" align="right" valign="top">_RS_RUNTIME float </td><td class="memItemRight" valign="bottom"><a class="el" href="rs__matrix_8rsh.html#af26fdbf8b8f0ed5d1b53f62b2aef5110">rsMatrixGet</a> (const <a class="el" href="structrs__matrix4x4.html">rs_matrix4x4</a> *m, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> col, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> row)</td></tr> 40 <tr><td class="memItemLeft" align="right" valign="top">_RS_RUNTIME float </td><td class="memItemRight" valign="bottom"><a class="el" href="rs__matrix_8rsh.html#acfebfc7b97e7282b78cd9c65b791932a">rsMatrixGet</a> (const <a class="el" href="structrs__matrix3x3.html">rs_matrix3x3</a> *m, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> col, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> row)</td></tr> 41 <tr><td class="memItemLeft" align="right" valign="top">_RS_RUNTIME float </td><td class="memItemRight" valign="bottom"><a class="el" href="rs__matrix_8rsh.html#a683b4537b98103c50cc66780dfe8cd69">rsMatrixGet</a> (const <a class="el" href="structrs__matrix2x2.html">rs_matrix2x2</a> *m, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> col, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> row)</td></tr> 42 <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="rs__matrix_8rsh.html#a0ffd9de971cf10d0a663ff565be8d3cc">rsMatrixLoadIdentity</a> (<a class="el" href="structrs__matrix4x4.html">rs_matrix4x4</a> *m)</td></tr> 43 <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="rs__matrix_8rsh.html#a5b31e83553efa947db2198674d5db043">rsMatrixLoadIdentity</a> (<a class="el" href="structrs__matrix3x3.html">rs_matrix3x3</a> *m)</td></tr> 44 <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="rs__matrix_8rsh.html#ad2954a5ac11d2370227296be89e92471">rsMatrixLoadIdentity</a> (<a class="el" href="structrs__matrix2x2.html">rs_matrix2x2</a> *m)</td></tr> 45 <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="rs__matrix_8rsh.html#ac380c4117e047da494a74f0dad20fab3">rsMatrixLoad</a> (<a class="el" href="structrs__matrix4x4.html">rs_matrix4x4</a> *m, const float *v)</td></tr> 46 <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="rs__matrix_8rsh.html#aef942535c5d56072125dcf5244970ea2">rsMatrixLoad</a> (<a class="el" href="structrs__matrix3x3.html">rs_matrix3x3</a> *m, const float *v)</td></tr> 47 <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="rs__matrix_8rsh.html#aa327089f7ad9161d7372094163147005">rsMatrixLoad</a> (<a class="el" href="structrs__matrix2x2.html">rs_matrix2x2</a> *m, const float *v)</td></tr> 48 <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="rs__matrix_8rsh.html#a5239a3f5f2becd20507d0aa56638ba03">rsMatrixLoad</a> (<a class="el" href="structrs__matrix4x4.html">rs_matrix4x4</a> *m, const <a class="el" href="structrs__matrix4x4.html">rs_matrix4x4</a> *v)</td></tr> 49 <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="rs__matrix_8rsh.html#a06176acb38405937cb94c835a712a3b3">rsMatrixLoad</a> (<a class="el" href="structrs__matrix4x4.html">rs_matrix4x4</a> *m, const <a class="el" href="structrs__matrix3x3.html">rs_matrix3x3</a> *v)</td></tr> 50 <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="rs__matrix_8rsh.html#a3a3d0f0053720fb4afb3a3eb32e42a82">rsMatrixLoad</a> (<a class="el" href="structrs__matrix4x4.html">rs_matrix4x4</a> *m, const <a class="el" href="structrs__matrix2x2.html">rs_matrix2x2</a> *v)</td></tr> 51 <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="rs__matrix_8rsh.html#a654e5abe095770979d740f7b55382bd0">rsMatrixLoad</a> (<a class="el" href="structrs__matrix3x3.html">rs_matrix3x3</a> *m, const <a class="el" href="structrs__matrix3x3.html">rs_matrix3x3</a> *v)</td></tr> 52 <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="rs__matrix_8rsh.html#a5f3697805c794c9c9f2f8cfdde4b9a44">rsMatrixLoad</a> (<a class="el" href="structrs__matrix2x2.html">rs_matrix2x2</a> *m, const <a class="el" href="structrs__matrix2x2.html">rs_matrix2x2</a> *v)</td></tr> 53 <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="rs__matrix_8rsh.html#a268032f3ac6d766b1d7fe72a6cb50464">rsMatrixLoadRotate</a> (<a class="el" href="structrs__matrix4x4.html">rs_matrix4x4</a> *m, float rot, float x, float y, float z)</td></tr> 54 <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="rs__matrix_8rsh.html#acaf51d1f9ad5041ce01fbf8b7c5923fd">rsMatrixLoadScale</a> (<a class="el" href="structrs__matrix4x4.html">rs_matrix4x4</a> *m, float x, float y, float z)</td></tr> 55 <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="rs__matrix_8rsh.html#a1b521c8a3d1260fa732cbf0a71af0e74">rsMatrixLoadTranslate</a> (<a class="el" href="structrs__matrix4x4.html">rs_matrix4x4</a> *m, float x, float y, float z)</td></tr> 56 <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="rs__matrix_8rsh.html#a79f14c4c0f5ecc1bbd0bf54da8b653ef">rsMatrixLoadMultiply</a> (<a class="el" href="structrs__matrix4x4.html">rs_matrix4x4</a> *m, const <a class="el" href="structrs__matrix4x4.html">rs_matrix4x4</a> *lhs, const <a class="el" href="structrs__matrix4x4.html">rs_matrix4x4</a> *rhs)</td></tr> 57 <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="rs__matrix_8rsh.html#a78872343ea6a5c1a846160ccdc4add52">rsMatrixLoadMultiply</a> (<a class="el" href="structrs__matrix3x3.html">rs_matrix3x3</a> *m, const <a class="el" href="structrs__matrix3x3.html">rs_matrix3x3</a> *lhs, const <a class="el" href="structrs__matrix3x3.html">rs_matrix3x3</a> *rhs)</td></tr> 58 <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="rs__matrix_8rsh.html#ae0dd4755c28fc896626ebf5dc784130f">rsMatrixLoadMultiply</a> (<a class="el" href="structrs__matrix2x2.html">rs_matrix2x2</a> *m, const <a class="el" href="structrs__matrix2x2.html">rs_matrix2x2</a> *lhs, const <a class="el" href="structrs__matrix2x2.html">rs_matrix2x2</a> *rhs)</td></tr> 59 <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="rs__matrix_8rsh.html#a97953ab2606900a839e5816c619abe66">rsMatrixMultiply</a> (<a class="el" href="structrs__matrix4x4.html">rs_matrix4x4</a> *m, const <a class="el" href="structrs__matrix4x4.html">rs_matrix4x4</a> *rhs)</td></tr> 60 <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="rs__matrix_8rsh.html#ae0b03aeec17ec8b9c5e75f8efb1bdc53">rsMatrixMultiply</a> (<a class="el" href="structrs__matrix3x3.html">rs_matrix3x3</a> *m, const <a class="el" href="structrs__matrix3x3.html">rs_matrix3x3</a> *rhs)</td></tr> 61 <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="rs__matrix_8rsh.html#ab1973ad3efa0ab2d53f466dd9fb190bb">rsMatrixMultiply</a> (<a class="el" href="structrs__matrix2x2.html">rs_matrix2x2</a> *m, const <a class="el" href="structrs__matrix2x2.html">rs_matrix2x2</a> *rhs)</td></tr> 62 <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="rs__matrix_8rsh.html#ad5ed05ca4880397fb29615e3c6798de1">rsMatrixRotate</a> (<a class="el" href="structrs__matrix4x4.html">rs_matrix4x4</a> *m, float rot, float x, float y, float z)</td></tr> 63 <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="rs__matrix_8rsh.html#a94cc6b22bd1a6c07a9a1c1d21afb392c">rsMatrixScale</a> (<a class="el" href="structrs__matrix4x4.html">rs_matrix4x4</a> *m, float x, float y, float z)</td></tr> 64 <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="rs__matrix_8rsh.html#a4df5f9b5bb6044f3c3426f2f58b94405">rsMatrixTranslate</a> (<a class="el" href="structrs__matrix4x4.html">rs_matrix4x4</a> *m, float x, float y, float z)</td></tr> 65 <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="rs__matrix_8rsh.html#a4c59884a0e534dbbcdc5655842732d43">rsMatrixLoadOrtho</a> (<a class="el" href="structrs__matrix4x4.html">rs_matrix4x4</a> *m, float left, float right, float bottom, float top, float near, float far)</td></tr> 66 <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="rs__matrix_8rsh.html#ad25760aaf01e95d0055237afab41bbb3">rsMatrixLoadFrustum</a> (<a class="el" href="structrs__matrix4x4.html">rs_matrix4x4</a> *m, float left, float right, float bottom, float top, float near, float far)</td></tr> 67 <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="rs__matrix_8rsh.html#aa404c34d7478f2921f7415d2da95d02b">rsMatrixLoadPerspective</a> (<a class="el" href="structrs__matrix4x4.html">rs_matrix4x4</a> *m, float fovy, float aspect, float near, float far)</td></tr> 68 <tr><td class="memItemLeft" align="right" valign="top">_RS_RUNTIME <a class="el" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="rs__matrix_8rsh.html#a47b6abbf32ffaf77bb13d96c3f05779f">rsMatrixMultiply</a> (<a class="el" href="structrs__matrix4x4.html">rs_matrix4x4</a> *m, <a class="el" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> in)</td></tr> 69 <tr><td class="memItemLeft" align="right" valign="top">_RS_RUNTIME <a class="el" href="rs__types_8rsh.html#a0046fa0f208d0899adbcf1f8b5aafadd">float3</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="rs__matrix_8rsh.html#a716bc2d29b80eb25388aba3ba8845aef">rsMatrixMultiply</a> (<a class="el" href="structrs__matrix3x3.html">rs_matrix3x3</a> *m, <a class="el" href="rs__types_8rsh.html#a0046fa0f208d0899adbcf1f8b5aafadd">float3</a> in)</td></tr> 70 <tr><td class="memItemLeft" align="right" valign="top">_RS_RUNTIME <a class="el" href="rs__types_8rsh.html#a5086d0fcb71f916c936af486ccf0dd41">float2</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="rs__matrix_8rsh.html#a4d9a8bb7c3f5d67b14fa349bdd531d13">rsMatrixMultiply</a> (<a class="el" href="structrs__matrix2x2.html">rs_matrix2x2</a> *m, <a class="el" href="rs__types_8rsh.html#a5086d0fcb71f916c936af486ccf0dd41">float2</a> in)</td></tr> 71 <tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="rs__matrix_8rsh.html#a00b6a334ba5ac94d84850f22ec9f4de5">rsMatrixInverse</a> (<a class="el" href="structrs__matrix4x4.html">rs_matrix4x4</a> *m)</td></tr> 72 <tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="rs__matrix_8rsh.html#ac05080d52da2d99a759ef34fa0655e82">rsMatrixInverseTranspose</a> (<a class="el" href="structrs__matrix4x4.html">rs_matrix4x4</a> *m)</td></tr> 73 <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="rs__matrix_8rsh.html#a88095c70f1550c760844b3e32e41a31a">rsMatrixTranspose</a> (<a class="el" href="structrs__matrix4x4.html">rs_matrix4x4</a> *m)</td></tr> 74 <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="rs__matrix_8rsh.html#ac52acb31a705f6c68af8bddea0e79969">rsMatrixTranspose</a> (<a class="el" href="structrs__matrix3x3.html">rs_matrix3x3</a> *m)</td></tr> 75 <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="rs__matrix_8rsh.html#a49164dd4d4e85b212196028b1fd89dc1">rsMatrixTranspose</a> (<a class="el" href="structrs__matrix2x2.html">rs_matrix2x2</a> *m)</td></tr> 76 </table> 77 <hr/><a name="details" id="details"></a><h2>Detailed Description</h2> 78 <div class="textblock"><p>Matrix functions. </p> 79 <p>These functions let you manipulate square matrices of rank 2x2, 3x3, and 4x4. They are particularly useful for graphical transformations and are compatible with OpenGL.</p> 80 <p>A few general notes:</p> 81 <ul> 82 <li>We use a zero-based index for rows and columns. E.g. the last element of a <a class="el" href="structrs__matrix4x4.html">rs_matrix4x4</a> is found at (3, 3).</li> 83 </ul> 84 <ul> 85 <li>RenderScript uses column-based vectors. Transforming a vector is done by postmultiplying the vector, e.g. <em>(matrix * vector)</em>, as provided by <a class="el" href="rs__matrix_8rsh.html#a4d9a8bb7c3f5d67b14fa349bdd531d13">rsMatrixMultiply</a>.</li> 86 </ul> 87 <ul> 88 <li>To create a transformation matrix that performs two transformations at once, multiply the two source matrices, with the first transformation as the right argument. E.g. to create a transformation matrix that applies the transformation <em>s1</em> followed by <em>s2</em>, call rsMatrixLoadMultiply(&combined, &s2, &s1). This derives from <em>s2 * (s1 * v)</em>, which is <em>(s2 * s1) * v</em>.</li> 89 </ul> 90 <ul> 91 <li>We have two style of functions to create transformation matrices: rsMatrixLoad<em>Transformation</em> and rsMatrix<em>Transformation</em>. The former style simply stores the transformation matrix in the first argument. The latter modifies a pre-existing transformation matrix so that the new transformation happens first. E.g. if you call <a class="el" href="rs__matrix_8rsh.html#a4df5f9b5bb6044f3c3426f2f58b94405">rsMatrixTranslate</a> on a matrix that already does a scaling, the resulting matrix when applied to a vector will first do the translation then the scaling. </li> 92 </ul> 93 94 <p>Definition in file <a class="el" href="rs__matrix_8rsh_source.html">rs_matrix.rsh</a>.</p> 95 </div><hr/><h2>Function Documentation</h2> 96 <a class="anchor" id="af26fdbf8b8f0ed5d1b53f62b2aef5110"></a><!-- doxytag: member="rs_matrix.rsh::rsMatrixGet" ref="af26fdbf8b8f0ed5d1b53f62b2aef5110" args="(const rs_matrix4x4 *m, uint32_t col, uint32_t row)" --> 97 <div class="memitem"> 98 <div class="memproto"> 99 <table class="memname"> 100 <tr> 101 <td class="memname">_RS_RUNTIME float rsMatrixGet </td> 102 <td>(</td> 103 <td class="paramtype">const <a class="el" href="structrs__matrix4x4.html">rs_matrix4x4</a> * </td> 104 <td class="paramname"><em>m</em>, </td> 105 </tr> 106 <tr> 107 <td class="paramkey"></td> 108 <td></td> 109 <td class="paramtype"><a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> </td> 110 <td class="paramname"><em>col</em>, </td> 111 </tr> 112 <tr> 113 <td class="paramkey"></td> 114 <td></td> 115 <td class="paramtype"><a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> </td> 116 <td class="paramname"><em>row</em> </td> 117 </tr> 118 <tr> 119 <td></td> 120 <td>)</td> 121 <td></td><td></td> 122 </tr> 123 </table> 124 </div> 125 <div class="memdoc"> 126 <p>Returns one element of a matrix.</p> 127 <dl><dt><b>Parameters:</b></dt><dd> 128 <table class="params"> 129 <tr><td class="paramname">m</td><td>The matrix to extract the element from. </td></tr> 130 <tr><td class="paramname">col</td><td>The zero-based column of the element to be extracted. </td></tr> 131 <tr><td class="paramname">row</td><td>The zero-based row of the element to extracted.</td></tr> 132 </table> 133 </dd> 134 </dl> 135 <dl class="warning"><dt><b>Warning:</b></dt><dd>The order of the column and row parameters may be unexpected.</dd></dl> 136 <dl class="return"><dt><b>Returns:</b></dt><dd>float </dd></dl> 137 138 </div> 139 </div> 140 <a class="anchor" id="acfebfc7b97e7282b78cd9c65b791932a"></a><!-- doxytag: member="rs_matrix.rsh::rsMatrixGet" ref="acfebfc7b97e7282b78cd9c65b791932a" args="(const rs_matrix3x3 *m, uint32_t col, uint32_t row)" --> 141 <div class="memitem"> 142 <div class="memproto"> 143 <table class="memname"> 144 <tr> 145 <td class="memname">_RS_RUNTIME float rsMatrixGet </td> 146 <td>(</td> 147 <td class="paramtype">const <a class="el" href="structrs__matrix3x3.html">rs_matrix3x3</a> * </td> 148 <td class="paramname"><em>m</em>, </td> 149 </tr> 150 <tr> 151 <td class="paramkey"></td> 152 <td></td> 153 <td class="paramtype"><a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> </td> 154 <td class="paramname"><em>col</em>, </td> 155 </tr> 156 <tr> 157 <td class="paramkey"></td> 158 <td></td> 159 <td class="paramtype"><a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> </td> 160 <td class="paramname"><em>row</em> </td> 161 </tr> 162 <tr> 163 <td></td> 164 <td>)</td> 165 <td></td><td></td> 166 </tr> 167 </table> 168 </div> 169 <div class="memdoc"> 170 <p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p> 171 172 </div> 173 </div> 174 <a class="anchor" id="a683b4537b98103c50cc66780dfe8cd69"></a><!-- doxytag: member="rs_matrix.rsh::rsMatrixGet" ref="a683b4537b98103c50cc66780dfe8cd69" args="(const rs_matrix2x2 *m, uint32_t col, uint32_t row)" --> 175 <div class="memitem"> 176 <div class="memproto"> 177 <table class="memname"> 178 <tr> 179 <td class="memname">_RS_RUNTIME float rsMatrixGet </td> 180 <td>(</td> 181 <td class="paramtype">const <a class="el" href="structrs__matrix2x2.html">rs_matrix2x2</a> * </td> 182 <td class="paramname"><em>m</em>, </td> 183 </tr> 184 <tr> 185 <td class="paramkey"></td> 186 <td></td> 187 <td class="paramtype"><a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> </td> 188 <td class="paramname"><em>col</em>, </td> 189 </tr> 190 <tr> 191 <td class="paramkey"></td> 192 <td></td> 193 <td class="paramtype"><a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> </td> 194 <td class="paramname"><em>row</em> </td> 195 </tr> 196 <tr> 197 <td></td> 198 <td>)</td> 199 <td></td><td></td> 200 </tr> 201 </table> 202 </div> 203 <div class="memdoc"> 204 <p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p> 205 206 </div> 207 </div> 208 <a class="anchor" id="a00b6a334ba5ac94d84850f22ec9f4de5"></a><!-- doxytag: member="rs_matrix.rsh::rsMatrixInverse" ref="a00b6a334ba5ac94d84850f22ec9f4de5" args="(rs_matrix4x4 *m)" --> 209 <div class="memitem"> 210 <div class="memproto"> 211 <table class="memname"> 212 <tr> 213 <td class="memname">bool rsMatrixInverse </td> 214 <td>(</td> 215 <td class="paramtype"><a class="el" href="structrs__matrix4x4.html">rs_matrix4x4</a> * </td> 216 <td class="paramname"><em>m</em></td><td>)</td> 217 <td></td> 218 </tr> 219 </table> 220 </div> 221 <div class="memdoc"> 222 <p>Inverts a matrix in place.</p> 223 <p>Returns true if the matrix was successfully inversed.</p> 224 <dl><dt><b>Parameters:</b></dt><dd> 225 <table class="params"> 226 <tr><td class="paramname">m</td><td>The matrix to invert. </td></tr> 227 </table> 228 </dd> 229 </dl> 230 231 </div> 232 </div> 233 <a class="anchor" id="ac05080d52da2d99a759ef34fa0655e82"></a><!-- doxytag: member="rs_matrix.rsh::rsMatrixInverseTranspose" ref="ac05080d52da2d99a759ef34fa0655e82" args="(rs_matrix4x4 *m)" --> 234 <div class="memitem"> 235 <div class="memproto"> 236 <table class="memname"> 237 <tr> 238 <td class="memname">bool rsMatrixInverseTranspose </td> 239 <td>(</td> 240 <td class="paramtype"><a class="el" href="structrs__matrix4x4.html">rs_matrix4x4</a> * </td> 241 <td class="paramname"><em>m</em></td><td>)</td> 242 <td></td> 243 </tr> 244 </table> 245 </div> 246 <div class="memdoc"> 247 <p>Inverts and transpose a matrix in place.</p> 248 <p>The matrix is first inverted then transposed. Returns true if the matrix was successfully inverted.</p> 249 <dl><dt><b>Parameters:</b></dt><dd> 250 <table class="params"> 251 <tr><td class="paramname">m</td><td>The matrix to modify. </td></tr> 252 </table> 253 </dd> 254 </dl> 255 256 </div> 257 </div> 258 <a class="anchor" id="ac380c4117e047da494a74f0dad20fab3"></a><!-- doxytag: member="rs_matrix.rsh::rsMatrixLoad" ref="ac380c4117e047da494a74f0dad20fab3" args="(rs_matrix4x4 *m, const float *v)" --> 259 <div class="memitem"> 260 <div class="memproto"> 261 <table class="memname"> 262 <tr> 263 <td class="memname">void rsMatrixLoad </td> 264 <td>(</td> 265 <td class="paramtype"><a class="el" href="structrs__matrix4x4.html">rs_matrix4x4</a> * </td> 266 <td class="paramname"><em>m</em>, </td> 267 </tr> 268 <tr> 269 <td class="paramkey"></td> 270 <td></td> 271 <td class="paramtype">const float * </td> 272 <td class="paramname"><em>v</em> </td> 273 </tr> 274 <tr> 275 <td></td> 276 <td>)</td> 277 <td></td><td></td> 278 </tr> 279 </table> 280 </div> 281 <div class="memdoc"> 282 <p>Set the elements of a matrix from an array of floats.</p> 283 <p>The array of floats should be in row-major order, i.e. the element a <em>row 0, column 0</em> should be first, followed by the element at <em>row 0, column 1</em>, etc.</p> 284 <dl><dt><b>Parameters:</b></dt><dd> 285 <table class="params"> 286 <tr><td class="paramname">m</td><td>The matrix to set. </td></tr> 287 <tr><td class="paramname">v</td><td>The array of values to set the matrix to. These arrays should be 4, 9, or 16 floats long, depending on the matrix size. </td></tr> 288 </table> 289 </dd> 290 </dl> 291 292 </div> 293 </div> 294 <a class="anchor" id="aef942535c5d56072125dcf5244970ea2"></a><!-- doxytag: member="rs_matrix.rsh::rsMatrixLoad" ref="aef942535c5d56072125dcf5244970ea2" args="(rs_matrix3x3 *m, const float *v)" --> 295 <div class="memitem"> 296 <div class="memproto"> 297 <table class="memname"> 298 <tr> 299 <td class="memname">void rsMatrixLoad </td> 300 <td>(</td> 301 <td class="paramtype"><a class="el" href="structrs__matrix3x3.html">rs_matrix3x3</a> * </td> 302 <td class="paramname"><em>m</em>, </td> 303 </tr> 304 <tr> 305 <td class="paramkey"></td> 306 <td></td> 307 <td class="paramtype">const float * </td> 308 <td class="paramname"><em>v</em> </td> 309 </tr> 310 <tr> 311 <td></td> 312 <td>)</td> 313 <td></td><td></td> 314 </tr> 315 </table> 316 </div> 317 <div class="memdoc"> 318 <p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p> 319 320 </div> 321 </div> 322 <a class="anchor" id="aa327089f7ad9161d7372094163147005"></a><!-- doxytag: member="rs_matrix.rsh::rsMatrixLoad" ref="aa327089f7ad9161d7372094163147005" args="(rs_matrix2x2 *m, const float *v)" --> 323 <div class="memitem"> 324 <div class="memproto"> 325 <table class="memname"> 326 <tr> 327 <td class="memname">void rsMatrixLoad </td> 328 <td>(</td> 329 <td class="paramtype"><a class="el" href="structrs__matrix2x2.html">rs_matrix2x2</a> * </td> 330 <td class="paramname"><em>m</em>, </td> 331 </tr> 332 <tr> 333 <td class="paramkey"></td> 334 <td></td> 335 <td class="paramtype">const float * </td> 336 <td class="paramname"><em>v</em> </td> 337 </tr> 338 <tr> 339 <td></td> 340 <td>)</td> 341 <td></td><td></td> 342 </tr> 343 </table> 344 </div> 345 <div class="memdoc"> 346 <p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p> 347 348 </div> 349 </div> 350 <a class="anchor" id="a5239a3f5f2becd20507d0aa56638ba03"></a><!-- doxytag: member="rs_matrix.rsh::rsMatrixLoad" ref="a5239a3f5f2becd20507d0aa56638ba03" args="(rs_matrix4x4 *m, const rs_matrix4x4 *v)" --> 351 <div class="memitem"> 352 <div class="memproto"> 353 <table class="memname"> 354 <tr> 355 <td class="memname">void rsMatrixLoad </td> 356 <td>(</td> 357 <td class="paramtype"><a class="el" href="structrs__matrix4x4.html">rs_matrix4x4</a> * </td> 358 <td class="paramname"><em>m</em>, </td> 359 </tr> 360 <tr> 361 <td class="paramkey"></td> 362 <td></td> 363 <td class="paramtype">const <a class="el" href="structrs__matrix4x4.html">rs_matrix4x4</a> * </td> 364 <td class="paramname"><em>v</em> </td> 365 </tr> 366 <tr> 367 <td></td> 368 <td>)</td> 369 <td></td><td></td> 370 </tr> 371 </table> 372 </div> 373 <div class="memdoc"> 374 <p>Set the elements of a matrix from another matrix.</p> 375 <p>If the source matrix is smaller than the destination, the rest of the destination is filled with elements of the identity matrix. E.g. loading a <a class="el" href="structrs__matrix2x2.html" title="2x2 float matrix">rs_matrix2x2</a> into a <a class="el" href="structrs__matrix4x4.html" title="4x4 float matrix">rs_matrix4x4</a> will give:</p> 376 <table> 377 <tr><td>m00</td><td>m01</td><td>0.0</td><td>0.0</td></tr> 378 <tr><td>m10</td><td>m11</td><td>0.0</td><td>0.0</td></tr> 379 <tr><td>0.0</td><td>0.0</td><td>1.0</td><td>0.0</td></tr> 380 <tr><td>0.0</td><td>0.0</td><td>0.0</td><td>1.0</td></tr> 381 </table><dl><dt><b>Parameters:</b></dt><dd> 382 <table class="params"> 383 <tr><td class="paramname">m</td><td>The matrix to set. </td></tr> 384 <tr><td class="paramname">v</td><td>The source matrix. </td></tr> 385 </table> 386 </dd> 387 </dl> 388 389 </div> 390 </div> 391 <a class="anchor" id="a06176acb38405937cb94c835a712a3b3"></a><!-- doxytag: member="rs_matrix.rsh::rsMatrixLoad" ref="a06176acb38405937cb94c835a712a3b3" args="(rs_matrix4x4 *m, const rs_matrix3x3 *v)" --> 392 <div class="memitem"> 393 <div class="memproto"> 394 <table class="memname"> 395 <tr> 396 <td class="memname">void rsMatrixLoad </td> 397 <td>(</td> 398 <td class="paramtype"><a class="el" href="structrs__matrix4x4.html">rs_matrix4x4</a> * </td> 399 <td class="paramname"><em>m</em>, </td> 400 </tr> 401 <tr> 402 <td class="paramkey"></td> 403 <td></td> 404 <td class="paramtype">const <a class="el" href="structrs__matrix3x3.html">rs_matrix3x3</a> * </td> 405 <td class="paramname"><em>v</em> </td> 406 </tr> 407 <tr> 408 <td></td> 409 <td>)</td> 410 <td></td><td></td> 411 </tr> 412 </table> 413 </div> 414 <div class="memdoc"> 415 <p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p> 416 417 </div> 418 </div> 419 <a class="anchor" id="a3a3d0f0053720fb4afb3a3eb32e42a82"></a><!-- doxytag: member="rs_matrix.rsh::rsMatrixLoad" ref="a3a3d0f0053720fb4afb3a3eb32e42a82" args="(rs_matrix4x4 *m, const rs_matrix2x2 *v)" --> 420 <div class="memitem"> 421 <div class="memproto"> 422 <table class="memname"> 423 <tr> 424 <td class="memname">void rsMatrixLoad </td> 425 <td>(</td> 426 <td class="paramtype"><a class="el" href="structrs__matrix4x4.html">rs_matrix4x4</a> * </td> 427 <td class="paramname"><em>m</em>, </td> 428 </tr> 429 <tr> 430 <td class="paramkey"></td> 431 <td></td> 432 <td class="paramtype">const <a class="el" href="structrs__matrix2x2.html">rs_matrix2x2</a> * </td> 433 <td class="paramname"><em>v</em> </td> 434 </tr> 435 <tr> 436 <td></td> 437 <td>)</td> 438 <td></td><td></td> 439 </tr> 440 </table> 441 </div> 442 <div class="memdoc"> 443 <p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p> 444 445 </div> 446 </div> 447 <a class="anchor" id="a654e5abe095770979d740f7b55382bd0"></a><!-- doxytag: member="rs_matrix.rsh::rsMatrixLoad" ref="a654e5abe095770979d740f7b55382bd0" args="(rs_matrix3x3 *m, const rs_matrix3x3 *v)" --> 448 <div class="memitem"> 449 <div class="memproto"> 450 <table class="memname"> 451 <tr> 452 <td class="memname">void rsMatrixLoad </td> 453 <td>(</td> 454 <td class="paramtype"><a class="el" href="structrs__matrix3x3.html">rs_matrix3x3</a> * </td> 455 <td class="paramname"><em>m</em>, </td> 456 </tr> 457 <tr> 458 <td class="paramkey"></td> 459 <td></td> 460 <td class="paramtype">const <a class="el" href="structrs__matrix3x3.html">rs_matrix3x3</a> * </td> 461 <td class="paramname"><em>v</em> </td> 462 </tr> 463 <tr> 464 <td></td> 465 <td>)</td> 466 <td></td><td></td> 467 </tr> 468 </table> 469 </div> 470 <div class="memdoc"> 471 <p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p> 472 473 </div> 474 </div> 475 <a class="anchor" id="a5f3697805c794c9c9f2f8cfdde4b9a44"></a><!-- doxytag: member="rs_matrix.rsh::rsMatrixLoad" ref="a5f3697805c794c9c9f2f8cfdde4b9a44" args="(rs_matrix2x2 *m, const rs_matrix2x2 *v)" --> 476 <div class="memitem"> 477 <div class="memproto"> 478 <table class="memname"> 479 <tr> 480 <td class="memname">void rsMatrixLoad </td> 481 <td>(</td> 482 <td class="paramtype"><a class="el" href="structrs__matrix2x2.html">rs_matrix2x2</a> * </td> 483 <td class="paramname"><em>m</em>, </td> 484 </tr> 485 <tr> 486 <td class="paramkey"></td> 487 <td></td> 488 <td class="paramtype">const <a class="el" href="structrs__matrix2x2.html">rs_matrix2x2</a> * </td> 489 <td class="paramname"><em>v</em> </td> 490 </tr> 491 <tr> 492 <td></td> 493 <td>)</td> 494 <td></td><td></td> 495 </tr> 496 </table> 497 </div> 498 <div class="memdoc"> 499 <p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p> 500 501 </div> 502 </div> 503 <a class="anchor" id="ad25760aaf01e95d0055237afab41bbb3"></a><!-- doxytag: member="rs_matrix.rsh::rsMatrixLoadFrustum" ref="ad25760aaf01e95d0055237afab41bbb3" args="(rs_matrix4x4 *m, float left, float right, float bottom, float top, float near, float far)" --> 504 <div class="memitem"> 505 <div class="memproto"> 506 <table class="memname"> 507 <tr> 508 <td class="memname">void rsMatrixLoadFrustum </td> 509 <td>(</td> 510 <td class="paramtype"><a class="el" href="structrs__matrix4x4.html">rs_matrix4x4</a> * </td> 511 <td class="paramname"><em>m</em>, </td> 512 </tr> 513 <tr> 514 <td class="paramkey"></td> 515 <td></td> 516 <td class="paramtype">float </td> 517 <td class="paramname"><em>left</em>, </td> 518 </tr> 519 <tr> 520 <td class="paramkey"></td> 521 <td></td> 522 <td class="paramtype">float </td> 523 <td class="paramname"><em>right</em>, </td> 524 </tr> 525 <tr> 526 <td class="paramkey"></td> 527 <td></td> 528 <td class="paramtype">float </td> 529 <td class="paramname"><em>bottom</em>, </td> 530 </tr> 531 <tr> 532 <td class="paramkey"></td> 533 <td></td> 534 <td class="paramtype">float </td> 535 <td class="paramname"><em>top</em>, </td> 536 </tr> 537 <tr> 538 <td class="paramkey"></td> 539 <td></td> 540 <td class="paramtype">float </td> 541 <td class="paramname"><em>near</em>, </td> 542 </tr> 543 <tr> 544 <td class="paramkey"></td> 545 <td></td> 546 <td class="paramtype">float </td> 547 <td class="paramname"><em>far</em> </td> 548 </tr> 549 <tr> 550 <td></td> 551 <td>)</td> 552 <td></td><td></td> 553 </tr> 554 </table> 555 </div> 556 <div class="memdoc"> 557 <p>Load a frustum projection matrix.</p> 558 <p>Constructs a frustum projection matrix, transforming the box identified by the six clipping planes <em>left, right, bottom, top, near, far</em>.</p> 559 <p>To apply this projection to a vector, multiply the vector by the created matrix using <a class="el" href="rs__matrix_8rsh.html#a4d9a8bb7c3f5d67b14fa349bdd531d13">rsMatrixMultiply</a>.</p> 560 <p>See <a href="https://www.opengl.org/documentation/specs/version2.0/glspec20.pdf">https://www.opengl.org/documentation/specs/version2.0/glspec20.pdf</a></p> 561 <dl><dt><b>Parameters:</b></dt><dd> 562 <table class="params"> 563 <tr><td class="paramname">m</td><td>The matrix to set. </td></tr> 564 <tr><td class="paramname">left</td><td></td></tr> 565 <tr><td class="paramname">right</td><td></td></tr> 566 <tr><td class="paramname">bottom</td><td></td></tr> 567 <tr><td class="paramname">top</td><td></td></tr> 568 <tr><td class="paramname">near</td><td></td></tr> 569 <tr><td class="paramname">far</td><td></td></tr> 570 </table> 571 </dd> 572 </dl> 573 574 </div> 575 </div> 576 <a class="anchor" id="a0ffd9de971cf10d0a663ff565be8d3cc"></a><!-- doxytag: member="rs_matrix.rsh::rsMatrixLoadIdentity" ref="a0ffd9de971cf10d0a663ff565be8d3cc" args="(rs_matrix4x4 *m)" --> 577 <div class="memitem"> 578 <div class="memproto"> 579 <table class="memname"> 580 <tr> 581 <td class="memname">void rsMatrixLoadIdentity </td> 582 <td>(</td> 583 <td class="paramtype"><a class="el" href="structrs__matrix4x4.html">rs_matrix4x4</a> * </td> 584 <td class="paramname"><em>m</em></td><td>)</td> 585 <td></td> 586 </tr> 587 </table> 588 </div> 589 <div class="memdoc"> 590 <p>Set the elements of a matrix to the identity matrix.</p> 591 <dl><dt><b>Parameters:</b></dt><dd> 592 <table class="params"> 593 <tr><td class="paramname">m</td><td>The matrix to set. </td></tr> 594 </table> 595 </dd> 596 </dl> 597 598 </div> 599 </div> 600 <a class="anchor" id="a5b31e83553efa947db2198674d5db043"></a><!-- doxytag: member="rs_matrix.rsh::rsMatrixLoadIdentity" ref="a5b31e83553efa947db2198674d5db043" args="(rs_matrix3x3 *m)" --> 601 <div class="memitem"> 602 <div class="memproto"> 603 <table class="memname"> 604 <tr> 605 <td class="memname">void rsMatrixLoadIdentity </td> 606 <td>(</td> 607 <td class="paramtype"><a class="el" href="structrs__matrix3x3.html">rs_matrix3x3</a> * </td> 608 <td class="paramname"><em>m</em></td><td>)</td> 609 <td></td> 610 </tr> 611 </table> 612 </div> 613 <div class="memdoc"> 614 <p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p> 615 616 </div> 617 </div> 618 <a class="anchor" id="ad2954a5ac11d2370227296be89e92471"></a><!-- doxytag: member="rs_matrix.rsh::rsMatrixLoadIdentity" ref="ad2954a5ac11d2370227296be89e92471" args="(rs_matrix2x2 *m)" --> 619 <div class="memitem"> 620 <div class="memproto"> 621 <table class="memname"> 622 <tr> 623 <td class="memname">void rsMatrixLoadIdentity </td> 624 <td>(</td> 625 <td class="paramtype"><a class="el" href="structrs__matrix2x2.html">rs_matrix2x2</a> * </td> 626 <td class="paramname"><em>m</em></td><td>)</td> 627 <td></td> 628 </tr> 629 </table> 630 </div> 631 <div class="memdoc"> 632 <p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p> 633 634 </div> 635 </div> 636 <a class="anchor" id="a79f14c4c0f5ecc1bbd0bf54da8b653ef"></a><!-- doxytag: member="rs_matrix.rsh::rsMatrixLoadMultiply" ref="a79f14c4c0f5ecc1bbd0bf54da8b653ef" args="(rs_matrix4x4 *m, const rs_matrix4x4 *lhs, const rs_matrix4x4 *rhs)" --> 637 <div class="memitem"> 638 <div class="memproto"> 639 <table class="memname"> 640 <tr> 641 <td class="memname">void rsMatrixLoadMultiply </td> 642 <td>(</td> 643 <td class="paramtype"><a class="el" href="structrs__matrix4x4.html">rs_matrix4x4</a> * </td> 644 <td class="paramname"><em>m</em>, </td> 645 </tr> 646 <tr> 647 <td class="paramkey"></td> 648 <td></td> 649 <td class="paramtype">const <a class="el" href="structrs__matrix4x4.html">rs_matrix4x4</a> * </td> 650 <td class="paramname"><em>lhs</em>, </td> 651 </tr> 652 <tr> 653 <td class="paramkey"></td> 654 <td></td> 655 <td class="paramtype">const <a class="el" href="structrs__matrix4x4.html">rs_matrix4x4</a> * </td> 656 <td class="paramname"><em>rhs</em> </td> 657 </tr> 658 <tr> 659 <td></td> 660 <td>)</td> 661 <td></td><td></td> 662 </tr> 663 </table> 664 </div> 665 <div class="memdoc"> 666 <p>Multiply two matrices.</p> 667 <p>Sets <em>m</em> to the matrix product of <em>lhs * rhs</em>.</p> 668 <p>To combine two 4x4 transformaton matrices, multiply the second transformation matrix by the first transformation matrix. E.g. to create a transformation matrix that applies the transformation <em>s1</em> followed by <em>s2</em>, call rsMatrixLoadMultiply(&combined, &s2, &s1).</p> 669 <dl class="warning"><dt><b>Warning:</b></dt><dd>As of version 21, storing the result back into right matrix is not supported and will result in undefined behavior. Use rsMatrixMulitply instead. E.g. instead of doing rsMatrixLoadMultiply (&m2r, &m2r, &m2l), use rsMatrixMultiply (&m2r, &m2l). rsMatrixLoadMultiply (&m2l, &m2r, &m2l) works as expected.</dd></dl> 670 <dl><dt><b>Parameters:</b></dt><dd> 671 <table class="params"> 672 <tr><td class="paramname">m</td><td>The matrix to set. </td></tr> 673 <tr><td class="paramname">lhs</td><td>The left matrix of the product. </td></tr> 674 <tr><td class="paramname">rhs</td><td>The right matrix of the product. </td></tr> 675 </table> 676 </dd> 677 </dl> 678 679 </div> 680 </div> 681 <a class="anchor" id="a78872343ea6a5c1a846160ccdc4add52"></a><!-- doxytag: member="rs_matrix.rsh::rsMatrixLoadMultiply" ref="a78872343ea6a5c1a846160ccdc4add52" args="(rs_matrix3x3 *m, const rs_matrix3x3 *lhs, const rs_matrix3x3 *rhs)" --> 682 <div class="memitem"> 683 <div class="memproto"> 684 <table class="memname"> 685 <tr> 686 <td class="memname">void rsMatrixLoadMultiply </td> 687 <td>(</td> 688 <td class="paramtype"><a class="el" href="structrs__matrix3x3.html">rs_matrix3x3</a> * </td> 689 <td class="paramname"><em>m</em>, </td> 690 </tr> 691 <tr> 692 <td class="paramkey"></td> 693 <td></td> 694 <td class="paramtype">const <a class="el" href="structrs__matrix3x3.html">rs_matrix3x3</a> * </td> 695 <td class="paramname"><em>lhs</em>, </td> 696 </tr> 697 <tr> 698 <td class="paramkey"></td> 699 <td></td> 700 <td class="paramtype">const <a class="el" href="structrs__matrix3x3.html">rs_matrix3x3</a> * </td> 701 <td class="paramname"><em>rhs</em> </td> 702 </tr> 703 <tr> 704 <td></td> 705 <td>)</td> 706 <td></td><td></td> 707 </tr> 708 </table> 709 </div> 710 <div class="memdoc"> 711 <p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p> 712 713 </div> 714 </div> 715 <a class="anchor" id="ae0dd4755c28fc896626ebf5dc784130f"></a><!-- doxytag: member="rs_matrix.rsh::rsMatrixLoadMultiply" ref="ae0dd4755c28fc896626ebf5dc784130f" args="(rs_matrix2x2 *m, const rs_matrix2x2 *lhs, const rs_matrix2x2 *rhs)" --> 716 <div class="memitem"> 717 <div class="memproto"> 718 <table class="memname"> 719 <tr> 720 <td class="memname">void rsMatrixLoadMultiply </td> 721 <td>(</td> 722 <td class="paramtype"><a class="el" href="structrs__matrix2x2.html">rs_matrix2x2</a> * </td> 723 <td class="paramname"><em>m</em>, </td> 724 </tr> 725 <tr> 726 <td class="paramkey"></td> 727 <td></td> 728 <td class="paramtype">const <a class="el" href="structrs__matrix2x2.html">rs_matrix2x2</a> * </td> 729 <td class="paramname"><em>lhs</em>, </td> 730 </tr> 731 <tr> 732 <td class="paramkey"></td> 733 <td></td> 734 <td class="paramtype">const <a class="el" href="structrs__matrix2x2.html">rs_matrix2x2</a> * </td> 735 <td class="paramname"><em>rhs</em> </td> 736 </tr> 737 <tr> 738 <td></td> 739 <td>)</td> 740 <td></td><td></td> 741 </tr> 742 </table> 743 </div> 744 <div class="memdoc"> 745 <p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p> 746 747 </div> 748 </div> 749 <a class="anchor" id="a4c59884a0e534dbbcdc5655842732d43"></a><!-- doxytag: member="rs_matrix.rsh::rsMatrixLoadOrtho" ref="a4c59884a0e534dbbcdc5655842732d43" args="(rs_matrix4x4 *m, float left, float right, float bottom, float top, float near, float far)" --> 750 <div class="memitem"> 751 <div class="memproto"> 752 <table class="memname"> 753 <tr> 754 <td class="memname">void rsMatrixLoadOrtho </td> 755 <td>(</td> 756 <td class="paramtype"><a class="el" href="structrs__matrix4x4.html">rs_matrix4x4</a> * </td> 757 <td class="paramname"><em>m</em>, </td> 758 </tr> 759 <tr> 760 <td class="paramkey"></td> 761 <td></td> 762 <td class="paramtype">float </td> 763 <td class="paramname"><em>left</em>, </td> 764 </tr> 765 <tr> 766 <td class="paramkey"></td> 767 <td></td> 768 <td class="paramtype">float </td> 769 <td class="paramname"><em>right</em>, </td> 770 </tr> 771 <tr> 772 <td class="paramkey"></td> 773 <td></td> 774 <td class="paramtype">float </td> 775 <td class="paramname"><em>bottom</em>, </td> 776 </tr> 777 <tr> 778 <td class="paramkey"></td> 779 <td></td> 780 <td class="paramtype">float </td> 781 <td class="paramname"><em>top</em>, </td> 782 </tr> 783 <tr> 784 <td class="paramkey"></td> 785 <td></td> 786 <td class="paramtype">float </td> 787 <td class="paramname"><em>near</em>, </td> 788 </tr> 789 <tr> 790 <td class="paramkey"></td> 791 <td></td> 792 <td class="paramtype">float </td> 793 <td class="paramname"><em>far</em> </td> 794 </tr> 795 <tr> 796 <td></td> 797 <td>)</td> 798 <td></td><td></td> 799 </tr> 800 </table> 801 </div> 802 <div class="memdoc"> 803 <p>Load an orthographic projection matrix.</p> 804 <p>Constructs an orthographic projection matrix, transforming the box identified by the six clipping planes <em>left, right, bottom, top, near, far</em> into a unit cube with a corner at <em>(-1, -1, -1)</em> and the opposite at <em>(1, 1, 1)</em>.</p> 805 <p>To apply this projection to a vector, multiply the vector by the created matrix using <a class="el" href="rs__matrix_8rsh.html#a4d9a8bb7c3f5d67b14fa349bdd531d13">rsMatrixMultiply</a>.</p> 806 <p>See <a href="https://en.wikipedia.org/wiki/Orthographic_projection">https://en.wikipedia.org/wiki/Orthographic_projection</a> and <a href="https://www.opengl.org/documentation/specs/version2.0/glspec20.pdf">https://www.opengl.org/documentation/specs/version2.0/glspec20.pdf</a></p> 807 <dl><dt><b>Parameters:</b></dt><dd> 808 <table class="params"> 809 <tr><td class="paramname">m</td><td>The matrix to set. </td></tr> 810 <tr><td class="paramname">left</td><td></td></tr> 811 <tr><td class="paramname">right</td><td></td></tr> 812 <tr><td class="paramname">bottom</td><td></td></tr> 813 <tr><td class="paramname">top</td><td></td></tr> 814 <tr><td class="paramname">near</td><td></td></tr> 815 <tr><td class="paramname">far</td><td></td></tr> 816 </table> 817 </dd> 818 </dl> 819 820 </div> 821 </div> 822 <a class="anchor" id="aa404c34d7478f2921f7415d2da95d02b"></a><!-- doxytag: member="rs_matrix.rsh::rsMatrixLoadPerspective" ref="aa404c34d7478f2921f7415d2da95d02b" args="(rs_matrix4x4 *m, float fovy, float aspect, float near, float far)" --> 823 <div class="memitem"> 824 <div class="memproto"> 825 <table class="memname"> 826 <tr> 827 <td class="memname">void rsMatrixLoadPerspective </td> 828 <td>(</td> 829 <td class="paramtype"><a class="el" href="structrs__matrix4x4.html">rs_matrix4x4</a> * </td> 830 <td class="paramname"><em>m</em>, </td> 831 </tr> 832 <tr> 833 <td class="paramkey"></td> 834 <td></td> 835 <td class="paramtype">float </td> 836 <td class="paramname"><em>fovy</em>, </td> 837 </tr> 838 <tr> 839 <td class="paramkey"></td> 840 <td></td> 841 <td class="paramtype">float </td> 842 <td class="paramname"><em>aspect</em>, </td> 843 </tr> 844 <tr> 845 <td class="paramkey"></td> 846 <td></td> 847 <td class="paramtype">float </td> 848 <td class="paramname"><em>near</em>, </td> 849 </tr> 850 <tr> 851 <td class="paramkey"></td> 852 <td></td> 853 <td class="paramtype">float </td> 854 <td class="paramname"><em>far</em> </td> 855 </tr> 856 <tr> 857 <td></td> 858 <td>)</td> 859 <td></td><td></td> 860 </tr> 861 </table> 862 </div> 863 <div class="memdoc"> 864 <p>Load a perspective projection matrix.</p> 865 <p>Constructs a perspective projection matrix, assuming a symmetrical field of view.</p> 866 <p>To apply this projection to a vector, multiply the vector by the created matrix using <a class="el" href="rs__matrix_8rsh.html#a4d9a8bb7c3f5d67b14fa349bdd531d13">rsMatrixMultiply</a>.</p> 867 <p>See <a href="https://www.opengl.org/documentation/specs/version2.0/glspec20.pdf">https://www.opengl.org/documentation/specs/version2.0/glspec20.pdf</a></p> 868 <dl><dt><b>Parameters:</b></dt><dd> 869 <table class="params"> 870 <tr><td class="paramname">m</td><td>The matrix to set. </td></tr> 871 <tr><td class="paramname">fovy</td><td>Field of view, in degrees along the Y axis. </td></tr> 872 <tr><td class="paramname">aspect</td><td>Ratio of x / y. </td></tr> 873 <tr><td class="paramname">near</td><td>The near clipping plane. </td></tr> 874 <tr><td class="paramname">far</td><td>The far clipping plane. </td></tr> 875 </table> 876 </dd> 877 </dl> 878 879 </div> 880 </div> 881 <a class="anchor" id="a268032f3ac6d766b1d7fe72a6cb50464"></a><!-- doxytag: member="rs_matrix.rsh::rsMatrixLoadRotate" ref="a268032f3ac6d766b1d7fe72a6cb50464" args="(rs_matrix4x4 *m, float rot, float x, float y, float z)" --> 882 <div class="memitem"> 883 <div class="memproto"> 884 <table class="memname"> 885 <tr> 886 <td class="memname">void rsMatrixLoadRotate </td> 887 <td>(</td> 888 <td class="paramtype"><a class="el" href="structrs__matrix4x4.html">rs_matrix4x4</a> * </td> 889 <td class="paramname"><em>m</em>, </td> 890 </tr> 891 <tr> 892 <td class="paramkey"></td> 893 <td></td> 894 <td class="paramtype">float </td> 895 <td class="paramname"><em>rot</em>, </td> 896 </tr> 897 <tr> 898 <td class="paramkey"></td> 899 <td></td> 900 <td class="paramtype">float </td> 901 <td class="paramname"><em>x</em>, </td> 902 </tr> 903 <tr> 904 <td class="paramkey"></td> 905 <td></td> 906 <td class="paramtype">float </td> 907 <td class="paramname"><em>y</em>, </td> 908 </tr> 909 <tr> 910 <td class="paramkey"></td> 911 <td></td> 912 <td class="paramtype">float </td> 913 <td class="paramname"><em>z</em> </td> 914 </tr> 915 <tr> 916 <td></td> 917 <td>)</td> 918 <td></td><td></td> 919 </tr> 920 </table> 921 </div> 922 <div class="memdoc"> 923 <p>Load a rotation matrix.</p> 924 <p>This function creates a rotation matrix. The axis of rotation is the <em>(x, y, z)</em> vector.</p> 925 <p>To rotate a vector, multiply the vector by the created matrix using <a class="el" href="rs__matrix_8rsh.html#a4d9a8bb7c3f5d67b14fa349bdd531d13">rsMatrixMultiply</a>.</p> 926 <p>See <a href="http://en.wikipedia.org/wiki/Rotation_matrix">http://en.wikipedia.org/wiki/Rotation_matrix</a> .</p> 927 <dl><dt><b>Parameters:</b></dt><dd> 928 <table class="params"> 929 <tr><td class="paramname">m</td><td>The matrix to set. </td></tr> 930 <tr><td class="paramname">rot</td><td>How much rotation to do, in degrees. </td></tr> 931 <tr><td class="paramname">x</td><td>The x component of the vector that is the axis of rotation. </td></tr> 932 <tr><td class="paramname">y</td><td>The y component of the vector that is the axis of rotation. </td></tr> 933 <tr><td class="paramname">z</td><td>The z component of the vector that is the axis of rotation. </td></tr> 934 </table> 935 </dd> 936 </dl> 937 938 </div> 939 </div> 940 <a class="anchor" id="acaf51d1f9ad5041ce01fbf8b7c5923fd"></a><!-- doxytag: member="rs_matrix.rsh::rsMatrixLoadScale" ref="acaf51d1f9ad5041ce01fbf8b7c5923fd" args="(rs_matrix4x4 *m, float x, float y, float z)" --> 941 <div class="memitem"> 942 <div class="memproto"> 943 <table class="memname"> 944 <tr> 945 <td class="memname">void rsMatrixLoadScale </td> 946 <td>(</td> 947 <td class="paramtype"><a class="el" href="structrs__matrix4x4.html">rs_matrix4x4</a> * </td> 948 <td class="paramname"><em>m</em>, </td> 949 </tr> 950 <tr> 951 <td class="paramkey"></td> 952 <td></td> 953 <td class="paramtype">float </td> 954 <td class="paramname"><em>x</em>, </td> 955 </tr> 956 <tr> 957 <td class="paramkey"></td> 958 <td></td> 959 <td class="paramtype">float </td> 960 <td class="paramname"><em>y</em>, </td> 961 </tr> 962 <tr> 963 <td class="paramkey"></td> 964 <td></td> 965 <td class="paramtype">float </td> 966 <td class="paramname"><em>z</em> </td> 967 </tr> 968 <tr> 969 <td></td> 970 <td>)</td> 971 <td></td><td></td> 972 </tr> 973 </table> 974 </div> 975 <div class="memdoc"> 976 <p>Load a scale matrix.</p> 977 <p>This function creates a scaling matrix, where each component of a vector is multiplied by a number. This number can be negative.</p> 978 <p>To scale a vector, multiply the vector by the created matrix using <a class="el" href="rs__matrix_8rsh.html#a4d9a8bb7c3f5d67b14fa349bdd531d13">rsMatrixMultiply</a>.</p> 979 <dl><dt><b>Parameters:</b></dt><dd> 980 <table class="params"> 981 <tr><td class="paramname">m</td><td>The matrix to set. </td></tr> 982 <tr><td class="paramname">x</td><td>The multiple to scale the x components by. </td></tr> 983 <tr><td class="paramname">y</td><td>The multiple to scale the y components by. </td></tr> 984 <tr><td class="paramname">z</td><td>The multiple to scale the z components by. </td></tr> 985 </table> 986 </dd> 987 </dl> 988 989 </div> 990 </div> 991 <a class="anchor" id="a1b521c8a3d1260fa732cbf0a71af0e74"></a><!-- doxytag: member="rs_matrix.rsh::rsMatrixLoadTranslate" ref="a1b521c8a3d1260fa732cbf0a71af0e74" args="(rs_matrix4x4 *m, float x, float y, float z)" --> 992 <div class="memitem"> 993 <div class="memproto"> 994 <table class="memname"> 995 <tr> 996 <td class="memname">void rsMatrixLoadTranslate </td> 997 <td>(</td> 998 <td class="paramtype"><a class="el" href="structrs__matrix4x4.html">rs_matrix4x4</a> * </td> 999 <td class="paramname"><em>m</em>, </td> 1000 </tr> 1001 <tr> 1002 <td class="paramkey"></td> 1003 <td></td> 1004 <td class="paramtype">float </td> 1005 <td class="paramname"><em>x</em>, </td> 1006 </tr> 1007 <tr> 1008 <td class="paramkey"></td> 1009 <td></td> 1010 <td class="paramtype">float </td> 1011 <td class="paramname"><em>y</em>, </td> 1012 </tr> 1013 <tr> 1014 <td class="paramkey"></td> 1015 <td></td> 1016 <td class="paramtype">float </td> 1017 <td class="paramname"><em>z</em> </td> 1018 </tr> 1019 <tr> 1020 <td></td> 1021 <td>)</td> 1022 <td></td><td></td> 1023 </tr> 1024 </table> 1025 </div> 1026 <div class="memdoc"> 1027 <p>Load a translation matrix.</p> 1028 <p>This function creates a translation matrix, where a number is added to each element of a vector.</p> 1029 <p>To translate a vector, multiply the vector by the created matrix using <a class="el" href="rs__matrix_8rsh.html#a4d9a8bb7c3f5d67b14fa349bdd531d13">rsMatrixMultiply</a>.</p> 1030 <dl><dt><b>Parameters:</b></dt><dd> 1031 <table class="params"> 1032 <tr><td class="paramname">m</td><td>The matrix to set. </td></tr> 1033 <tr><td class="paramname">x</td><td>The number to add to each x component. </td></tr> 1034 <tr><td class="paramname">y</td><td>The number to add to each y component. </td></tr> 1035 <tr><td class="paramname">z</td><td>The number to add to each z component. </td></tr> 1036 </table> 1037 </dd> 1038 </dl> 1039 1040 </div> 1041 </div> 1042 <a class="anchor" id="a97953ab2606900a839e5816c619abe66"></a><!-- doxytag: member="rs_matrix.rsh::rsMatrixMultiply" ref="a97953ab2606900a839e5816c619abe66" args="(rs_matrix4x4 *m, const rs_matrix4x4 *rhs)" --> 1043 <div class="memitem"> 1044 <div class="memproto"> 1045 <table class="memname"> 1046 <tr> 1047 <td class="memname">void rsMatrixMultiply </td> 1048 <td>(</td> 1049 <td class="paramtype"><a class="el" href="structrs__matrix4x4.html">rs_matrix4x4</a> * </td> 1050 <td class="paramname"><em>m</em>, </td> 1051 </tr> 1052 <tr> 1053 <td class="paramkey"></td> 1054 <td></td> 1055 <td class="paramtype">const <a class="el" href="structrs__matrix4x4.html">rs_matrix4x4</a> * </td> 1056 <td class="paramname"><em>rhs</em> </td> 1057 </tr> 1058 <tr> 1059 <td></td> 1060 <td>)</td> 1061 <td></td><td></td> 1062 </tr> 1063 </table> 1064 </div> 1065 <div class="memdoc"> 1066 <p>Multiply a matrix into another one.</p> 1067 <p>Sets <em>m</em> to the matrix product <em>m * rhs</em>.</p> 1068 <p>When combining two 4x4 transformation matrices using this function, the resulting matrix will correspond to performing the <em>rhs</em> transformation first followed by the original <em>m</em> transformation.</p> 1069 <dl><dt><b>Parameters:</b></dt><dd> 1070 <table class="params"> 1071 <tr><td class="paramname">m</td><td>The left matrix of the product and the matrix to be set. </td></tr> 1072 <tr><td class="paramname">rhs</td><td>The right matrix of the product. </td></tr> 1073 </table> 1074 </dd> 1075 </dl> 1076 1077 </div> 1078 </div> 1079 <a class="anchor" id="ae0b03aeec17ec8b9c5e75f8efb1bdc53"></a><!-- doxytag: member="rs_matrix.rsh::rsMatrixMultiply" ref="ae0b03aeec17ec8b9c5e75f8efb1bdc53" args="(rs_matrix3x3 *m, const rs_matrix3x3 *rhs)" --> 1080 <div class="memitem"> 1081 <div class="memproto"> 1082 <table class="memname"> 1083 <tr> 1084 <td class="memname">void rsMatrixMultiply </td> 1085 <td>(</td> 1086 <td class="paramtype"><a class="el" href="structrs__matrix3x3.html">rs_matrix3x3</a> * </td> 1087 <td class="paramname"><em>m</em>, </td> 1088 </tr> 1089 <tr> 1090 <td class="paramkey"></td> 1091 <td></td> 1092 <td class="paramtype">const <a class="el" href="structrs__matrix3x3.html">rs_matrix3x3</a> * </td> 1093 <td class="paramname"><em>rhs</em> </td> 1094 </tr> 1095 <tr> 1096 <td></td> 1097 <td>)</td> 1098 <td></td><td></td> 1099 </tr> 1100 </table> 1101 </div> 1102 <div class="memdoc"> 1103 <p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p> 1104 1105 </div> 1106 </div> 1107 <a class="anchor" id="ab1973ad3efa0ab2d53f466dd9fb190bb"></a><!-- doxytag: member="rs_matrix.rsh::rsMatrixMultiply" ref="ab1973ad3efa0ab2d53f466dd9fb190bb" args="(rs_matrix2x2 *m, const rs_matrix2x2 *rhs)" --> 1108 <div class="memitem"> 1109 <div class="memproto"> 1110 <table class="memname"> 1111 <tr> 1112 <td class="memname">void rsMatrixMultiply </td> 1113 <td>(</td> 1114 <td class="paramtype"><a class="el" href="structrs__matrix2x2.html">rs_matrix2x2</a> * </td> 1115 <td class="paramname"><em>m</em>, </td> 1116 </tr> 1117 <tr> 1118 <td class="paramkey"></td> 1119 <td></td> 1120 <td class="paramtype">const <a class="el" href="structrs__matrix2x2.html">rs_matrix2x2</a> * </td> 1121 <td class="paramname"><em>rhs</em> </td> 1122 </tr> 1123 <tr> 1124 <td></td> 1125 <td>)</td> 1126 <td></td><td></td> 1127 </tr> 1128 </table> 1129 </div> 1130 <div class="memdoc"> 1131 <p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p> 1132 1133 </div> 1134 </div> 1135 <a class="anchor" id="a47b6abbf32ffaf77bb13d96c3f05779f"></a><!-- doxytag: member="rs_matrix.rsh::rsMatrixMultiply" ref="a47b6abbf32ffaf77bb13d96c3f05779f" args="(rs_matrix4x4 *m, float4 in)" --> 1136 <div class="memitem"> 1137 <div class="memproto"> 1138 <table class="memname"> 1139 <tr> 1140 <td class="memname">_RS_RUNTIME <a class="el" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> rsMatrixMultiply </td> 1141 <td>(</td> 1142 <td class="paramtype"><a class="el" href="structrs__matrix4x4.html">rs_matrix4x4</a> * </td> 1143 <td class="paramname"><em>m</em>, </td> 1144 </tr> 1145 <tr> 1146 <td class="paramkey"></td> 1147 <td></td> 1148 <td class="paramtype"><a class="el" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> </td> 1149 <td class="paramname"><em>in</em> </td> 1150 </tr> 1151 <tr> 1152 <td></td> 1153 <td>)</td> 1154 <td></td><td></td> 1155 </tr> 1156 </table> 1157 </div> 1158 <div class="memdoc"> 1159 <p>Multiply a vector by a matrix.</p> 1160 <p>Returns the post-multiplication of the vector by the matrix, ie. <em>m * in</em>.</p> 1161 <p>When multiplying a <em>float3</em> to a <em><a class="el" href="structrs__matrix4x4.html" title="4x4 float matrix">rs_matrix4x4</a></em>, the vector is expanded with (1).</p> 1162 <p>When multiplying a <em>float2</em> to a <em><a class="el" href="structrs__matrix4x4.html" title="4x4 float matrix">rs_matrix4x4</a></em>, the vector is expanded with (0, 1).</p> 1163 <p>When multiplying a <em>float2</em> to a <em><a class="el" href="structrs__matrix3x3.html" title="3x3 float matrix">rs_matrix3x3</a></em>, the vector is expanded with (0).</p> 1164 <p>This function is available in API version 10-13. Starting with API 14, the function takes a const matrix as the first argument.</p> 1165 <p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p> 1166 1167 </div> 1168 </div> 1169 <a class="anchor" id="a716bc2d29b80eb25388aba3ba8845aef"></a><!-- doxytag: member="rs_matrix.rsh::rsMatrixMultiply" ref="a716bc2d29b80eb25388aba3ba8845aef" args="(rs_matrix3x3 *m, float3 in)" --> 1170 <div class="memitem"> 1171 <div class="memproto"> 1172 <table class="memname"> 1173 <tr> 1174 <td class="memname">_RS_RUNTIME <a class="el" href="rs__types_8rsh.html#a0046fa0f208d0899adbcf1f8b5aafadd">float3</a> rsMatrixMultiply </td> 1175 <td>(</td> 1176 <td class="paramtype"><a class="el" href="structrs__matrix3x3.html">rs_matrix3x3</a> * </td> 1177 <td class="paramname"><em>m</em>, </td> 1178 </tr> 1179 <tr> 1180 <td class="paramkey"></td> 1181 <td></td> 1182 <td class="paramtype"><a class="el" href="rs__types_8rsh.html#a0046fa0f208d0899adbcf1f8b5aafadd">float3</a> </td> 1183 <td class="paramname"><em>in</em> </td> 1184 </tr> 1185 <tr> 1186 <td></td> 1187 <td>)</td> 1188 <td></td><td></td> 1189 </tr> 1190 </table> 1191 </div> 1192 <div class="memdoc"> 1193 <p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p> 1194 1195 </div> 1196 </div> 1197 <a class="anchor" id="a4d9a8bb7c3f5d67b14fa349bdd531d13"></a><!-- doxytag: member="rs_matrix.rsh::rsMatrixMultiply" ref="a4d9a8bb7c3f5d67b14fa349bdd531d13" args="(rs_matrix2x2 *m, float2 in)" --> 1198 <div class="memitem"> 1199 <div class="memproto"> 1200 <table class="memname"> 1201 <tr> 1202 <td class="memname">_RS_RUNTIME <a class="el" href="rs__types_8rsh.html#a5086d0fcb71f916c936af486ccf0dd41">float2</a> rsMatrixMultiply </td> 1203 <td>(</td> 1204 <td class="paramtype"><a class="el" href="structrs__matrix2x2.html">rs_matrix2x2</a> * </td> 1205 <td class="paramname"><em>m</em>, </td> 1206 </tr> 1207 <tr> 1208 <td class="paramkey"></td> 1209 <td></td> 1210 <td class="paramtype"><a class="el" href="rs__types_8rsh.html#a5086d0fcb71f916c936af486ccf0dd41">float2</a> </td> 1211 <td class="paramname"><em>in</em> </td> 1212 </tr> 1213 <tr> 1214 <td></td> 1215 <td>)</td> 1216 <td></td><td></td> 1217 </tr> 1218 </table> 1219 </div> 1220 <div class="memdoc"> 1221 <p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p> 1222 1223 </div> 1224 </div> 1225 <a class="anchor" id="ad5ed05ca4880397fb29615e3c6798de1"></a><!-- doxytag: member="rs_matrix.rsh::rsMatrixRotate" ref="ad5ed05ca4880397fb29615e3c6798de1" args="(rs_matrix4x4 *m, float rot, float x, float y, float z)" --> 1226 <div class="memitem"> 1227 <div class="memproto"> 1228 <table class="memname"> 1229 <tr> 1230 <td class="memname">void rsMatrixRotate </td> 1231 <td>(</td> 1232 <td class="paramtype"><a class="el" href="structrs__matrix4x4.html">rs_matrix4x4</a> * </td> 1233 <td class="paramname"><em>m</em>, </td> 1234 </tr> 1235 <tr> 1236 <td class="paramkey"></td> 1237 <td></td> 1238 <td class="paramtype">float </td> 1239 <td class="paramname"><em>rot</em>, </td> 1240 </tr> 1241 <tr> 1242 <td class="paramkey"></td> 1243 <td></td> 1244 <td class="paramtype">float </td> 1245 <td class="paramname"><em>x</em>, </td> 1246 </tr> 1247 <tr> 1248 <td class="paramkey"></td> 1249 <td></td> 1250 <td class="paramtype">float </td> 1251 <td class="paramname"><em>y</em>, </td> 1252 </tr> 1253 <tr> 1254 <td class="paramkey"></td> 1255 <td></td> 1256 <td class="paramtype">float </td> 1257 <td class="paramname"><em>z</em> </td> 1258 </tr> 1259 <tr> 1260 <td></td> 1261 <td>)</td> 1262 <td></td><td></td> 1263 </tr> 1264 </table> 1265 </div> 1266 <div class="memdoc"> 1267 <p>Multiply the matrix <em>m</em> with a rotation matrix.</p> 1268 <p>This function modifies a transformation matrix to first do a rotation. The axis of rotation is the <em>(x, y, z)</em> vector.</p> 1269 <p>To apply this combined transformation to a vector, multiply the vector by the created matrix using <a class="el" href="rs__matrix_8rsh.html#a4d9a8bb7c3f5d67b14fa349bdd531d13">rsMatrixMultiply</a>.</p> 1270 <dl><dt><b>Parameters:</b></dt><dd> 1271 <table class="params"> 1272 <tr><td class="paramname">m</td><td>The matrix to modify. </td></tr> 1273 <tr><td class="paramname">rot</td><td>How much rotation to do, in degrees. </td></tr> 1274 <tr><td class="paramname">x</td><td>The x component of the vector that is the axis of rotation. </td></tr> 1275 <tr><td class="paramname">y</td><td>The y component of the vector that is the axis of rotation. </td></tr> 1276 <tr><td class="paramname">z</td><td>The z component of the vector that is the axis of rotation. </td></tr> 1277 </table> 1278 </dd> 1279 </dl> 1280 1281 </div> 1282 </div> 1283 <a class="anchor" id="a94cc6b22bd1a6c07a9a1c1d21afb392c"></a><!-- doxytag: member="rs_matrix.rsh::rsMatrixScale" ref="a94cc6b22bd1a6c07a9a1c1d21afb392c" args="(rs_matrix4x4 *m, float x, float y, float z)" --> 1284 <div class="memitem"> 1285 <div class="memproto"> 1286 <table class="memname"> 1287 <tr> 1288 <td class="memname">void rsMatrixScale </td> 1289 <td>(</td> 1290 <td class="paramtype"><a class="el" href="structrs__matrix4x4.html">rs_matrix4x4</a> * </td> 1291 <td class="paramname"><em>m</em>, </td> 1292 </tr> 1293 <tr> 1294 <td class="paramkey"></td> 1295 <td></td> 1296 <td class="paramtype">float </td> 1297 <td class="paramname"><em>x</em>, </td> 1298 </tr> 1299 <tr> 1300 <td class="paramkey"></td> 1301 <td></td> 1302 <td class="paramtype">float </td> 1303 <td class="paramname"><em>y</em>, </td> 1304 </tr> 1305 <tr> 1306 <td class="paramkey"></td> 1307 <td></td> 1308 <td class="paramtype">float </td> 1309 <td class="paramname"><em>z</em> </td> 1310 </tr> 1311 <tr> 1312 <td></td> 1313 <td>)</td> 1314 <td></td><td></td> 1315 </tr> 1316 </table> 1317 </div> 1318 <div class="memdoc"> 1319 <p>Multiply the matrix <em>m</em> with a scaling matrix.</p> 1320 <p>This function modifies a transformation matrix to first do a scaling. When scaling, each component of a vector is multiplied by a number. This number can be negative.</p> 1321 <p>To apply this combined transformation to a vector, multiply the vector by the created matrix using <a class="el" href="rs__matrix_8rsh.html#a4d9a8bb7c3f5d67b14fa349bdd531d13">rsMatrixMultiply</a>.</p> 1322 <dl><dt><b>Parameters:</b></dt><dd> 1323 <table class="params"> 1324 <tr><td class="paramname">m</td><td>The matrix to modify. </td></tr> 1325 <tr><td class="paramname">x</td><td>The multiple to scale the x components by. </td></tr> 1326 <tr><td class="paramname">y</td><td>The multiple to scale the y components by. </td></tr> 1327 <tr><td class="paramname">z</td><td>The multiple to scale the z components by. </td></tr> 1328 </table> 1329 </dd> 1330 </dl> 1331 1332 </div> 1333 </div> 1334 <a class="anchor" id="aca88832ed720e301780152c60884393e"></a><!-- doxytag: member="rs_matrix.rsh::rsMatrixSet" ref="aca88832ed720e301780152c60884393e" args="(rs_matrix4x4 *m, uint32_t col, uint32_t row, float v)" --> 1335 <div class="memitem"> 1336 <div class="memproto"> 1337 <table class="memname"> 1338 <tr> 1339 <td class="memname">_RS_RUNTIME void rsMatrixSet </td> 1340 <td>(</td> 1341 <td class="paramtype"><a class="el" href="structrs__matrix4x4.html">rs_matrix4x4</a> * </td> 1342 <td class="paramname"><em>m</em>, </td> 1343 </tr> 1344 <tr> 1345 <td class="paramkey"></td> 1346 <td></td> 1347 <td class="paramtype"><a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> </td> 1348 <td class="paramname"><em>col</em>, </td> 1349 </tr> 1350 <tr> 1351 <td class="paramkey"></td> 1352 <td></td> 1353 <td class="paramtype"><a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> </td> 1354 <td class="paramname"><em>row</em>, </td> 1355 </tr> 1356 <tr> 1357 <td class="paramkey"></td> 1358 <td></td> 1359 <td class="paramtype">float </td> 1360 <td class="paramname"><em>v</em> </td> 1361 </tr> 1362 <tr> 1363 <td></td> 1364 <td>)</td> 1365 <td></td><td></td> 1366 </tr> 1367 </table> 1368 </div> 1369 <div class="memdoc"> 1370 <p>Set an element of a matrix.</p> 1371 <dl><dt><b>Parameters:</b></dt><dd> 1372 <table class="params"> 1373 <tr><td class="paramname">m</td><td>The matrix that will be modified. </td></tr> 1374 <tr><td class="paramname">col</td><td>The zero-based column of the element to be set. </td></tr> 1375 <tr><td class="paramname">row</td><td>The zero-based row of the element to be set. </td></tr> 1376 <tr><td class="paramname">v</td><td>The value to set.</td></tr> 1377 </table> 1378 </dd> 1379 </dl> 1380 <dl class="warning"><dt><b>Warning:</b></dt><dd>The order of the column and row parameters may be unexpected.</dd></dl> 1381 <dl class="return"><dt><b>Returns:</b></dt><dd>void </dd></dl> 1382 1383 </div> 1384 </div> 1385 <a class="anchor" id="a08a247cdf2e70e78310bf04f9ecd5144"></a><!-- doxytag: member="rs_matrix.rsh::rsMatrixSet" ref="a08a247cdf2e70e78310bf04f9ecd5144" args="(rs_matrix3x3 *m, uint32_t col, uint32_t row, float v)" --> 1386 <div class="memitem"> 1387 <div class="memproto"> 1388 <table class="memname"> 1389 <tr> 1390 <td class="memname">_RS_RUNTIME void rsMatrixSet </td> 1391 <td>(</td> 1392 <td class="paramtype"><a class="el" href="structrs__matrix3x3.html">rs_matrix3x3</a> * </td> 1393 <td class="paramname"><em>m</em>, </td> 1394 </tr> 1395 <tr> 1396 <td class="paramkey"></td> 1397 <td></td> 1398 <td class="paramtype"><a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> </td> 1399 <td class="paramname"><em>col</em>, </td> 1400 </tr> 1401 <tr> 1402 <td class="paramkey"></td> 1403 <td></td> 1404 <td class="paramtype"><a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> </td> 1405 <td class="paramname"><em>row</em>, </td> 1406 </tr> 1407 <tr> 1408 <td class="paramkey"></td> 1409 <td></td> 1410 <td class="paramtype">float </td> 1411 <td class="paramname"><em>v</em> </td> 1412 </tr> 1413 <tr> 1414 <td></td> 1415 <td>)</td> 1416 <td></td><td></td> 1417 </tr> 1418 </table> 1419 </div> 1420 <div class="memdoc"> 1421 <p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p> 1422 1423 </div> 1424 </div> 1425 <a class="anchor" id="af9707d7be5945bf55ed53683624176ff"></a><!-- doxytag: member="rs_matrix.rsh::rsMatrixSet" ref="af9707d7be5945bf55ed53683624176ff" args="(rs_matrix2x2 *m, uint32_t col, uint32_t row, float v)" --> 1426 <div class="memitem"> 1427 <div class="memproto"> 1428 <table class="memname"> 1429 <tr> 1430 <td class="memname">_RS_RUNTIME void rsMatrixSet </td> 1431 <td>(</td> 1432 <td class="paramtype"><a class="el" href="structrs__matrix2x2.html">rs_matrix2x2</a> * </td> 1433 <td class="paramname"><em>m</em>, </td> 1434 </tr> 1435 <tr> 1436 <td class="paramkey"></td> 1437 <td></td> 1438 <td class="paramtype"><a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> </td> 1439 <td class="paramname"><em>col</em>, </td> 1440 </tr> 1441 <tr> 1442 <td class="paramkey"></td> 1443 <td></td> 1444 <td class="paramtype"><a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> </td> 1445 <td class="paramname"><em>row</em>, </td> 1446 </tr> 1447 <tr> 1448 <td class="paramkey"></td> 1449 <td></td> 1450 <td class="paramtype">float </td> 1451 <td class="paramname"><em>v</em> </td> 1452 </tr> 1453 <tr> 1454 <td></td> 1455 <td>)</td> 1456 <td></td><td></td> 1457 </tr> 1458 </table> 1459 </div> 1460 <div class="memdoc"> 1461 <p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p> 1462 1463 </div> 1464 </div> 1465 <a class="anchor" id="a4df5f9b5bb6044f3c3426f2f58b94405"></a><!-- doxytag: member="rs_matrix.rsh::rsMatrixTranslate" ref="a4df5f9b5bb6044f3c3426f2f58b94405" args="(rs_matrix4x4 *m, float x, float y, float z)" --> 1466 <div class="memitem"> 1467 <div class="memproto"> 1468 <table class="memname"> 1469 <tr> 1470 <td class="memname">void rsMatrixTranslate </td> 1471 <td>(</td> 1472 <td class="paramtype"><a class="el" href="structrs__matrix4x4.html">rs_matrix4x4</a> * </td> 1473 <td class="paramname"><em>m</em>, </td> 1474 </tr> 1475 <tr> 1476 <td class="paramkey"></td> 1477 <td></td> 1478 <td class="paramtype">float </td> 1479 <td class="paramname"><em>x</em>, </td> 1480 </tr> 1481 <tr> 1482 <td class="paramkey"></td> 1483 <td></td> 1484 <td class="paramtype">float </td> 1485 <td class="paramname"><em>y</em>, </td> 1486 </tr> 1487 <tr> 1488 <td class="paramkey"></td> 1489 <td></td> 1490 <td class="paramtype">float </td> 1491 <td class="paramname"><em>z</em> </td> 1492 </tr> 1493 <tr> 1494 <td></td> 1495 <td>)</td> 1496 <td></td><td></td> 1497 </tr> 1498 </table> 1499 </div> 1500 <div class="memdoc"> 1501 <p>Multiply the matrix <em>m</em> with a translation matrix.</p> 1502 <p>This function modifies a transformation matrix to first do a translation. When translating, a number is added to each component of a vector.</p> 1503 <p>To apply this combined transformation to a vector, multiply the vector by the created matrix using <a class="el" href="rs__matrix_8rsh.html#a4d9a8bb7c3f5d67b14fa349bdd531d13">rsMatrixMultiply</a>.</p> 1504 <dl><dt><b>Parameters:</b></dt><dd> 1505 <table class="params"> 1506 <tr><td class="paramname">m</td><td>The matrix to modify. </td></tr> 1507 <tr><td class="paramname">x</td><td>The number to add to each x component. </td></tr> 1508 <tr><td class="paramname">y</td><td>The number to add to each y component. </td></tr> 1509 <tr><td class="paramname">z</td><td>The number to add to each z component. </td></tr> 1510 </table> 1511 </dd> 1512 </dl> 1513 1514 </div> 1515 </div> 1516 <a class="anchor" id="a88095c70f1550c760844b3e32e41a31a"></a><!-- doxytag: member="rs_matrix.rsh::rsMatrixTranspose" ref="a88095c70f1550c760844b3e32e41a31a" args="(rs_matrix4x4 *m)" --> 1517 <div class="memitem"> 1518 <div class="memproto"> 1519 <table class="memname"> 1520 <tr> 1521 <td class="memname">void rsMatrixTranspose </td> 1522 <td>(</td> 1523 <td class="paramtype"><a class="el" href="structrs__matrix4x4.html">rs_matrix4x4</a> * </td> 1524 <td class="paramname"><em>m</em></td><td>)</td> 1525 <td></td> 1526 </tr> 1527 </table> 1528 </div> 1529 <div class="memdoc"> 1530 <p>Transpose the matrix m in place.</p> 1531 <dl><dt><b>Parameters:</b></dt><dd> 1532 <table class="params"> 1533 <tr><td class="paramname">m</td><td>The matrix to transpose. </td></tr> 1534 </table> 1535 </dd> 1536 </dl> 1537 1538 </div> 1539 </div> 1540 <a class="anchor" id="ac52acb31a705f6c68af8bddea0e79969"></a><!-- doxytag: member="rs_matrix.rsh::rsMatrixTranspose" ref="ac52acb31a705f6c68af8bddea0e79969" args="(rs_matrix3x3 *m)" --> 1541 <div class="memitem"> 1542 <div class="memproto"> 1543 <table class="memname"> 1544 <tr> 1545 <td class="memname">void rsMatrixTranspose </td> 1546 <td>(</td> 1547 <td class="paramtype"><a class="el" href="structrs__matrix3x3.html">rs_matrix3x3</a> * </td> 1548 <td class="paramname"><em>m</em></td><td>)</td> 1549 <td></td> 1550 </tr> 1551 </table> 1552 </div> 1553 <div class="memdoc"> 1554 <p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p> 1555 1556 </div> 1557 </div> 1558 <a class="anchor" id="a49164dd4d4e85b212196028b1fd89dc1"></a><!-- doxytag: member="rs_matrix.rsh::rsMatrixTranspose" ref="a49164dd4d4e85b212196028b1fd89dc1" args="(rs_matrix2x2 *m)" --> 1559 <div class="memitem"> 1560 <div class="memproto"> 1561 <table class="memname"> 1562 <tr> 1563 <td class="memname">void rsMatrixTranspose </td> 1564 <td>(</td> 1565 <td class="paramtype"><a class="el" href="structrs__matrix2x2.html">rs_matrix2x2</a> * </td> 1566 <td class="paramname"><em>m</em></td><td>)</td> 1567 <td></td> 1568 </tr> 1569 </table> 1570 </div> 1571 <div class="memdoc"> 1572 <p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p> 1573 1574 </div> 1575 </div> 1576 </div> 1577 1578 </body> 1579 </html> 1580