mirror of
https://github.com/g-truc/glm.git
synced 2024-11-10 20:51:48 +00:00
349 lines
16 KiB
HTML
349 lines
16 KiB
HTML
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||
|
<head>
|
||
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||
|
<title>Matrix functions</title>
|
||
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||
|
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
|
||
|
</head>
|
||
|
<body>
|
||
|
<!-- Generated by Doxygen 1.7.3 -->
|
||
|
<div id="top">
|
||
|
<div id="titlearea">
|
||
|
<table cellspacing="0" cellpadding="0">
|
||
|
<tbody>
|
||
|
<tr style="height: 56px;">
|
||
|
<td id="projectlogo"><img alt="Logo" src="logo-mini.png"></td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</div>
|
||
|
<div id="navrow1" class="tabs">
|
||
|
<ul class="tablist">
|
||
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
||
|
<li><a href="pages.html"><span>Related Pages</span></a></li>
|
||
|
<li><a href="modules.html"><span>Modules</span></a></li>
|
||
|
<li><a href="annotated.html"><span>Classes</span></a></li>
|
||
|
<li><a href="files.html"><span>Files</span></a></li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="header">
|
||
|
<div class="summary">
|
||
|
<a href="#func-members">Functions</a> </div>
|
||
|
<div class="headertitle">
|
||
|
<h1>Matrix functions</h1> </div>
|
||
|
<div class="ingroups"><a class="el" href="a00154.html">GLM Core</a></div></div>
|
||
|
<div class="contents">
|
||
|
|
||
|
<p>For each of the following built-in matrix functions, there is both a single-precision floating point version, where all arguments and return values are single precision, and a double-precision floating version, where all arguments and return values are double precision.
|
||
|
<a href="#_details">More...</a></p>
|
||
|
<table class="memberdecls">
|
||
|
<tr><td colspan="2"><h2><a name="func-members"></a>
|
||
|
Functions</h2></td></tr>
|
||
|
<tr><td class="memTemplParams" colspan="2">template<typename valType > </td></tr>
|
||
|
<tr><td class="memTemplItemLeft" align="right" valign="top">detail::tmat2x2< valType ><br class="typebreak"/>
|
||
|
::value_type </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00146.html#ga87c2e4aadca7b8cae5aee6f152e87ef0">determinant</a> (detail::tmat2x2< valType > const &m)</td></tr>
|
||
|
<tr><td class="memTemplParams" colspan="2">template<typename valType > </td></tr>
|
||
|
<tr><td class="memTemplItemLeft" align="right" valign="top">detail::tmat3x3< valType ><br class="typebreak"/>
|
||
|
::value_type </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00146.html#ga26a4e40253ac308ec8857237c6f94fc4">determinant</a> (detail::tmat3x3< valType > const &m)</td></tr>
|
||
|
<tr><td class="memTemplParams" colspan="2">template<typename valType > </td></tr>
|
||
|
<tr><td class="memTemplItemLeft" align="right" valign="top">detail::tmat4x4< valType ><br class="typebreak"/>
|
||
|
::value_type </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00146.html#gac565f88f2dc85f66516c6dd006b51868">determinant</a> (detail::tmat4x4< valType > const &m)</td></tr>
|
||
|
<tr><td class="memTemplParams" colspan="2">template<typename valType > </td></tr>
|
||
|
<tr><td class="memTemplItemLeft" align="right" valign="top">detail::tmat4x4< valType > </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00146.html#ga7612885b822e56955233ca65a9c8e725">inverse</a> (detail::tmat4x4< valType > const &m)</td></tr>
|
||
|
<tr><td class="memTemplParams" colspan="2">template<typename valType > </td></tr>
|
||
|
<tr><td class="memTemplItemLeft" align="right" valign="top">detail::tmat3x3< valType > </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00146.html#gaa0a168d23c89bf8f8a062f8c7567b337">inverse</a> (detail::tmat3x3< valType > const &m)</td></tr>
|
||
|
<tr><td class="memTemplParams" colspan="2">template<typename valType > </td></tr>
|
||
|
<tr><td class="memTemplItemLeft" align="right" valign="top">detail::tmat2x2< valType > </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00146.html#gaf845b72628caa525a914e7f0f85bbb66">inverse</a> (detail::tmat2x2< valType > const &m)</td></tr>
|
||
|
<tr><td class="memTemplParams" colspan="2">template<typename matType > </td></tr>
|
||
|
<tr><td class="memTemplItemLeft" align="right" valign="top">matType </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00146.html#ga7fa88b00e3f2d7aabfeac9ff722eaddf">matrixCompMult</a> (matType const &x, matType const &y)</td></tr>
|
||
|
<tr><td class="memTemplParams" colspan="2">template<typename vecType , typename matType > </td></tr>
|
||
|
<tr><td class="memTemplItemLeft" align="right" valign="top">matType </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00146.html#ga79343e6eb94fd12734763f74e1df42ff">outerProduct</a> (vecType const &c, vecType const &r)</td></tr>
|
||
|
<tr><td class="memTemplParams" colspan="2">template<typename matType > </td></tr>
|
||
|
<tr><td class="memTemplItemLeft" align="right" valign="top">matType::transpose_type </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00146.html#ga1c6f81fdca31fef3639e4b0642387c3c">transpose</a> (matType const &x)</td></tr>
|
||
|
</table>
|
||
|
<hr/><a name="_details"></a><h2>Detailed Description</h2>
|
||
|
<p>For each of the following built-in matrix functions, there is both a single-precision floating point version, where all arguments and return values are single precision, and a double-precision floating version, where all arguments and return values are double precision. </p>
|
||
|
<p>Only the single-precision floating point version is shown. </p>
|
||
|
<hr/><h2>Function Documentation</h2>
|
||
|
<a class="anchor" id="ga87c2e4aadca7b8cae5aee6f152e87ef0"></a><!-- doxytag: member="glm::determinant" ref="ga87c2e4aadca7b8cae5aee6f152e87ef0" args="(detail::tmat2x2< valType > const &m)" -->
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">detail::tmat2x2<valType>::value_type glm::determinant </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype">detail::tmat2x2< valType > const & </td>
|
||
|
<td class="paramname"><em>m</em></td><td>)</td>
|
||
|
<td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div>
|
||
|
<div class="memdoc">
|
||
|
|
||
|
<p>Return the determinant of a mat2 matrix. </p>
|
||
|
<dl><dt><b>Template Parameters:</b></dt><dd>
|
||
|
<table class="">
|
||
|
<tr><td class="paramname">valType</td><td>Floating-point scalar types. </td></tr>
|
||
|
</table>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
<dl class="see"><dt><b>See also:</b></dt><dd>- <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/determinant.xml">GLSL determinant man page</a> </dd>
|
||
|
<dd>
|
||
|
- <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.6</a> </dd></dl>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="ga26a4e40253ac308ec8857237c6f94fc4"></a><!-- doxytag: member="glm::determinant" ref="ga26a4e40253ac308ec8857237c6f94fc4" args="(detail::tmat3x3< valType > const &m)" -->
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">detail::tmat3x3<valType>::value_type glm::determinant </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype">detail::tmat3x3< valType > const & </td>
|
||
|
<td class="paramname"><em>m</em></td><td>)</td>
|
||
|
<td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div>
|
||
|
<div class="memdoc">
|
||
|
|
||
|
<p>Return the determinant of a mat3 matrix. </p>
|
||
|
<dl><dt><b>Template Parameters:</b></dt><dd>
|
||
|
<table class="">
|
||
|
<tr><td class="paramname">valType</td><td>Floating-point scalar types. </td></tr>
|
||
|
</table>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
<dl class="see"><dt><b>See also:</b></dt><dd>- <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/determinant.xml">GLSL determinant man page</a> </dd>
|
||
|
<dd>
|
||
|
- <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.6</a> </dd></dl>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="gac565f88f2dc85f66516c6dd006b51868"></a><!-- doxytag: member="glm::determinant" ref="gac565f88f2dc85f66516c6dd006b51868" args="(detail::tmat4x4< valType > const &m)" -->
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">detail::tmat4x4<valType>::value_type glm::determinant </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype">detail::tmat4x4< valType > const & </td>
|
||
|
<td class="paramname"><em>m</em></td><td>)</td>
|
||
|
<td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div>
|
||
|
<div class="memdoc">
|
||
|
|
||
|
<p>Return the determinant of a mat4 matrix. </p>
|
||
|
<dl><dt><b>Template Parameters:</b></dt><dd>
|
||
|
<table class="">
|
||
|
<tr><td class="paramname">valType</td><td>Floating-point scalar types. </td></tr>
|
||
|
</table>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
<dl class="see"><dt><b>See also:</b></dt><dd>- <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/determinant.xml">GLSL determinant man page</a> </dd>
|
||
|
<dd>
|
||
|
- <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.6</a> </dd></dl>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="ga7612885b822e56955233ca65a9c8e725"></a><!-- doxytag: member="glm::inverse" ref="ga7612885b822e56955233ca65a9c8e725" args="(detail::tmat4x4< valType > const &m)" -->
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">detail::tmat4x4<valType> glm::inverse </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype">detail::tmat4x4< valType > const & </td>
|
||
|
<td class="paramname"><em>m</em></td><td>)</td>
|
||
|
<td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div>
|
||
|
<div class="memdoc">
|
||
|
|
||
|
<p>Return the inverse of a mat4 matrix. </p>
|
||
|
<dl><dt><b>Template Parameters:</b></dt><dd>
|
||
|
<table class="">
|
||
|
<tr><td class="paramname">valType</td><td>Floating-point scalar types. </td></tr>
|
||
|
</table>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
<dl class="see"><dt><b>See also:</b></dt><dd>- <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/inverse.xml">GLSL inverse man page</a> </dd>
|
||
|
<dd>
|
||
|
- <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.6</a> </dd></dl>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="gaa0a168d23c89bf8f8a062f8c7567b337"></a><!-- doxytag: member="glm::inverse" ref="gaa0a168d23c89bf8f8a062f8c7567b337" args="(detail::tmat3x3< valType > const &m)" -->
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">detail::tmat3x3<valType> glm::inverse </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype">detail::tmat3x3< valType > const & </td>
|
||
|
<td class="paramname"><em>m</em></td><td>)</td>
|
||
|
<td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div>
|
||
|
<div class="memdoc">
|
||
|
|
||
|
<p>Return the inverse of a mat3 matrix. </p>
|
||
|
<dl><dt><b>Template Parameters:</b></dt><dd>
|
||
|
<table class="">
|
||
|
<tr><td class="paramname">valType</td><td>Floating-point scalar types. </td></tr>
|
||
|
</table>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
<dl class="see"><dt><b>See also:</b></dt><dd>- <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/inverse.xml">GLSL inverse man page</a> </dd>
|
||
|
<dd>
|
||
|
- <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.6</a> </dd></dl>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="gaf845b72628caa525a914e7f0f85bbb66"></a><!-- doxytag: member="glm::inverse" ref="gaf845b72628caa525a914e7f0f85bbb66" args="(detail::tmat2x2< valType > const &m)" -->
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">detail::tmat2x2<valType> glm::inverse </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype">detail::tmat2x2< valType > const & </td>
|
||
|
<td class="paramname"><em>m</em></td><td>)</td>
|
||
|
<td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div>
|
||
|
<div class="memdoc">
|
||
|
|
||
|
<p>Return the inverse of a mat2 matrix. </p>
|
||
|
<dl><dt><b>Template Parameters:</b></dt><dd>
|
||
|
<table class="">
|
||
|
<tr><td class="paramname">valType</td><td>Floating-point scalar types. </td></tr>
|
||
|
</table>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
<dl class="see"><dt><b>See also:</b></dt><dd>- <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/inverse.xml">GLSL inverse man page</a> </dd>
|
||
|
<dd>
|
||
|
- <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.6</a> </dd></dl>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="ga7fa88b00e3f2d7aabfeac9ff722eaddf"></a><!-- doxytag: member="glm::matrixCompMult" ref="ga7fa88b00e3f2d7aabfeac9ff722eaddf" args="(matType const &x, matType const &y)" -->
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">matType glm::matrixCompMult </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype">matType const & </td>
|
||
|
<td class="paramname"><em>x</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="paramkey"></td>
|
||
|
<td></td>
|
||
|
<td class="paramtype">matType const & </td>
|
||
|
<td class="paramname"><em>y</em> </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td></td>
|
||
|
<td>)</td>
|
||
|
<td></td><td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div>
|
||
|
<div class="memdoc">
|
||
|
|
||
|
<p>Multiply matrix x by matrix y component-wise, i.e., result[i][j] is the scalar product of x[i][j] and y[i][j]. </p>
|
||
|
<dl><dt><b>Template Parameters:</b></dt><dd>
|
||
|
<table class="">
|
||
|
<tr><td class="paramname">matType</td><td>Floating-point matrix types. </td></tr>
|
||
|
</table>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
<dl class="see"><dt><b>See also:</b></dt><dd>- <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/matrixCompMult.xml">GLSL matrixCompMult man page</a> </dd>
|
||
|
<dd>
|
||
|
- <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.6</a> </dd></dl>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="ga79343e6eb94fd12734763f74e1df42ff"></a><!-- doxytag: member="glm::outerProduct" ref="ga79343e6eb94fd12734763f74e1df42ff" args="(vecType const &c, vecType const &r)" -->
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">matType glm::outerProduct </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype">vecType const & </td>
|
||
|
<td class="paramname"><em>c</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="paramkey"></td>
|
||
|
<td></td>
|
||
|
<td class="paramtype">vecType const & </td>
|
||
|
<td class="paramname"><em>r</em> </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td></td>
|
||
|
<td>)</td>
|
||
|
<td></td><td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div>
|
||
|
<div class="memdoc">
|
||
|
|
||
|
<p>Treats the first parameter c as a column vector and the second parameter r as a row vector and does a linear algebraic matrix multiply c * r. </p>
|
||
|
<dl><dt><b>Template Parameters:</b></dt><dd>
|
||
|
<table class="">
|
||
|
<tr><td class="paramname">matType</td><td>Floating-point matrix types. </td></tr>
|
||
|
</table>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
<dl class="see"><dt><b>See also:</b></dt><dd>- <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/outerProduct.xml">GLSL outerProduct man page</a> </dd>
|
||
|
<dd>
|
||
|
- <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.6</a> </dd></dl>
|
||
|
<dl class="todo"><dt><b><a class="el" href="a00230.html#_todo000006">Todo:</a></b></dt><dd>Clarify the declaration to specify that matType doesn't have to be provided when used.</dd></dl>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="ga1c6f81fdca31fef3639e4b0642387c3c"></a><!-- doxytag: member="glm::transpose" ref="ga1c6f81fdca31fef3639e4b0642387c3c" args="(matType const &x)" -->
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">matType::transpose_type glm::transpose </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype">matType const & </td>
|
||
|
<td class="paramname"><em>x</em></td><td>)</td>
|
||
|
<td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div>
|
||
|
<div class="memdoc">
|
||
|
|
||
|
<p>Returns the transposed matrix of x. </p>
|
||
|
<dl><dt><b>Template Parameters:</b></dt><dd>
|
||
|
<table class="">
|
||
|
<tr><td class="paramname">matType</td><td>Floating-point matrix types. </td></tr>
|
||
|
</table>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
<dl class="see"><dt><b>See also:</b></dt><dd>- <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/transpose.xml">GLSL transpose man page</a> </dd>
|
||
|
<dd>
|
||
|
- <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.6</a> </dd></dl>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
<hr class="footer"/><address class="footer"><small>Generated by 
|
||
|
<a href="http://www.doxygen.org/index.html">
|
||
|
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </small></address>
|
||
|
</body>
|
||
|
</html>
|