mirror of
https://github.com/g-truc/glm.git
synced 2024-11-23 01:14:34 +00:00
6b1e7c6418
Replaced "documenation" with "documentation".
426 lines
22 KiB
HTML
426 lines
22 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"/>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
|
<meta name="generator" content="Doxygen 1.8.14"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
|
<title>0.9.9 API documentation: GLM_EXT_matrix_transform</title>
|
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="jquery.js"></script>
|
|
<script type="text/javascript" src="dynsections.js"></script>
|
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="search/searchdata.js"></script>
|
|
<script type="text/javascript" src="search/search.js"></script>
|
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
|
</head>
|
|
<body>
|
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
|
<div id="titlearea">
|
|
<table cellspacing="0" cellpadding="0">
|
|
<tbody>
|
|
<tr style="height: 56px;">
|
|
<td id="projectlogo"><img alt="Logo" src="logo-mini.png"/></td>
|
|
<td id="projectalign" style="padding-left: 0.5em;">
|
|
<div id="projectname">0.9.9 API documentation
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.8.14 -->
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
|
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
|
/* @license-end */
|
|
</script>
|
|
<script type="text/javascript" src="menudata.js"></script>
|
|
<script type="text/javascript" src="menu.js"></script>
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
|
$(function() {
|
|
initMenu('',true,false,'search.php','Search');
|
|
$(document).ready(function() { init_search(); });
|
|
});
|
|
/* @license-end */</script>
|
|
<div id="main-nav"></div>
|
|
</div><!-- top -->
|
|
<!-- window showing the filter options -->
|
|
<div id="MSearchSelectWindow"
|
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
|
</div>
|
|
|
|
<!-- iframe showing the search results (closed by default) -->
|
|
<div id="MSearchResultsWindow">
|
|
<iframe src="javascript:void(0)" frameborder="0"
|
|
name="MSearchResults" id="MSearchResults">
|
|
</iframe>
|
|
</div>
|
|
|
|
<div class="header">
|
|
<div class="summary">
|
|
<a href="#func-members">Functions</a> </div>
|
|
<div class="headertitle">
|
|
<div class="title">GLM_EXT_matrix_transform<div class="ingroups"><a class="el" href="a00703.html">Stable extensions</a></div></div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
<table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
|
|
Functions</h2></td></tr>
|
|
<tr class="memitem:ga81696f2b8d1db02ea1aff8da8f269314"><td class="memTemplParams" colspan="2"><a id="ga81696f2b8d1db02ea1aff8da8f269314"></a>
|
|
template<typename genType > </td></tr>
|
|
<tr class="memitem:ga81696f2b8d1db02ea1aff8da8f269314"><td class="memTemplItemLeft" align="right" valign="top">GLM_FUNC_DECL GLM_CONSTEXPR genType </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00668.html#ga81696f2b8d1db02ea1aff8da8f269314">identity</a> ()</td></tr>
|
|
<tr class="separator:ga81696f2b8d1db02ea1aff8da8f269314"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:gaa64aa951a0e99136bba9008d2b59c78e"><td class="memTemplParams" colspan="2">template<typename T , qualifier Q> </td></tr>
|
|
<tr class="memitem:gaa64aa951a0e99136bba9008d2b59c78e"><td class="memTemplItemLeft" align="right" valign="top">GLM_FUNC_DECL mat< 4, 4, T, Q > </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00668.html#gaa64aa951a0e99136bba9008d2b59c78e">lookAt</a> (vec< 3, T, Q > const &eye, vec< 3, T, Q > const &center, vec< 3, T, Q > const &up)</td></tr>
|
|
<tr class="separator:gaa64aa951a0e99136bba9008d2b59c78e"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:gab2c09e25b0a16d3a9d89cc85bbae41b0"><td class="memTemplParams" colspan="2">template<typename T , qualifier Q> </td></tr>
|
|
<tr class="memitem:gab2c09e25b0a16d3a9d89cc85bbae41b0"><td class="memTemplItemLeft" align="right" valign="top">GLM_FUNC_DECL mat< 4, 4, T, Q > </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00668.html#gab2c09e25b0a16d3a9d89cc85bbae41b0">lookAtLH</a> (vec< 3, T, Q > const &eye, vec< 3, T, Q > const &center, vec< 3, T, Q > const &up)</td></tr>
|
|
<tr class="separator:gab2c09e25b0a16d3a9d89cc85bbae41b0"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:gacfa12c8889c754846bc20c65d9b5c701"><td class="memTemplParams" colspan="2">template<typename T , qualifier Q> </td></tr>
|
|
<tr class="memitem:gacfa12c8889c754846bc20c65d9b5c701"><td class="memTemplItemLeft" align="right" valign="top">GLM_FUNC_DECL mat< 4, 4, T, Q > </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00668.html#gacfa12c8889c754846bc20c65d9b5c701">lookAtRH</a> (vec< 3, T, Q > const &eye, vec< 3, T, Q > const &center, vec< 3, T, Q > const &up)</td></tr>
|
|
<tr class="separator:gacfa12c8889c754846bc20c65d9b5c701"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:gaee9e865eaa9776370996da2940873fd4"><td class="memTemplParams" colspan="2">template<typename T , qualifier Q> </td></tr>
|
|
<tr class="memitem:gaee9e865eaa9776370996da2940873fd4"><td class="memTemplItemLeft" align="right" valign="top">GLM_FUNC_DECL mat< 4, 4, T, Q > </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00668.html#gaee9e865eaa9776370996da2940873fd4">rotate</a> (mat< 4, 4, T, Q > const &m, T angle, vec< 3, T, Q > const &axis)</td></tr>
|
|
<tr class="separator:gaee9e865eaa9776370996da2940873fd4"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga05051adbee603fb3c5095d8cf5cc229b"><td class="memTemplParams" colspan="2">template<typename T , qualifier Q> </td></tr>
|
|
<tr class="memitem:ga05051adbee603fb3c5095d8cf5cc229b"><td class="memTemplItemLeft" align="right" valign="top">GLM_FUNC_DECL mat< 4, 4, T, Q > </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00668.html#ga05051adbee603fb3c5095d8cf5cc229b">scale</a> (mat< 4, 4, T, Q > const &m, vec< 3, T, Q > const &v)</td></tr>
|
|
<tr class="separator:ga05051adbee603fb3c5095d8cf5cc229b"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga1a4ecc4ad82652b8fb14dcb087879284"><td class="memTemplParams" colspan="2">template<typename T , qualifier Q> </td></tr>
|
|
<tr class="memitem:ga1a4ecc4ad82652b8fb14dcb087879284"><td class="memTemplItemLeft" align="right" valign="top">GLM_FUNC_DECL mat< 4, 4, T, Q > </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00668.html#ga1a4ecc4ad82652b8fb14dcb087879284">translate</a> (mat< 4, 4, T, Q > const &m, vec< 3, T, Q > const &v)</td></tr>
|
|
<tr class="separator:ga1a4ecc4ad82652b8fb14dcb087879284"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table>
|
|
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
|
<p>Defines functions that generate common transformation matrices. </p>
|
|
<p>The matrices generated by this extension use standard OpenGL fixed-function conventions. For example, the lookAt function generates a transform from world space into the specific eye space that the projective matrix functions (perspective, ortho, etc) are designed to expect. The OpenGL compatibility specifications defines the particular layout of this eye space.</p>
|
|
<p>Include <<a class="el" href="a01361.html" title="GLM_EXT_matrix_transform ">glm/ext/matrix_transform.hpp</a>> to use the features of this extension.</p>
|
|
<dl class="section see"><dt>See also</dt><dd><a class="el" href="a00666.html" title="Functions that generate common projection transformation matrices. ">GLM_EXT_matrix_projection</a> </dd>
|
|
<dd>
|
|
<a class="el" href="a00665.html" title="Defines functions that generate common transformation matrices. ">GLM_EXT_matrix_clip_space</a> </dd></dl>
|
|
<h2 class="groupheader">Function Documentation</h2>
|
|
<a id="gaa64aa951a0e99136bba9008d2b59c78e"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#gaa64aa951a0e99136bba9008d2b59c78e">◆ </a></span>lookAt()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">GLM_FUNC_DECL mat<4, 4, T, Q> glm::lookAt </td>
|
|
<td>(</td>
|
|
<td class="paramtype">vec< 3, T, Q > const & </td>
|
|
<td class="paramname"><em>eye</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">vec< 3, T, Q > const & </td>
|
|
<td class="paramname"><em>center</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">vec< 3, T, Q > const & </td>
|
|
<td class="paramname"><em>up</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Build a look at view matrix based on the default handedness. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">eye</td><td>Position of the camera </td></tr>
|
|
<tr><td class="paramname">center</td><td>Position where the camera is looking at </td></tr>
|
|
<tr><td class="paramname">up</td><td>Normalized up vector, how the camera is oriented. Typically (0, 0, 1)</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="tparams"><dt>Template Parameters</dt><dd>
|
|
<table class="tparams">
|
|
<tr><td class="paramname">T</td><td>A floating-point scalar type </td></tr>
|
|
<tr><td class="paramname">Q</td><td>A value from qualifier enum</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section see"><dt>See also</dt><dd>- frustum(T const& left, T const& right, T const& bottom, T const& top, T const& nearVal, T const& farVal) frustum(T const& left, T const& right, T const& bottom, T const& top, T const& nearVal, T const& farVal) </dd>
|
|
<dd>
|
|
<a href="https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/gluLookAt.xml">gluLookAt man page</a> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="gab2c09e25b0a16d3a9d89cc85bbae41b0"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#gab2c09e25b0a16d3a9d89cc85bbae41b0">◆ </a></span>lookAtLH()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">GLM_FUNC_DECL mat<4, 4, T, Q> glm::lookAtLH </td>
|
|
<td>(</td>
|
|
<td class="paramtype">vec< 3, T, Q > const & </td>
|
|
<td class="paramname"><em>eye</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">vec< 3, T, Q > const & </td>
|
|
<td class="paramname"><em>center</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">vec< 3, T, Q > const & </td>
|
|
<td class="paramname"><em>up</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Build a left handed look at view matrix. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">eye</td><td>Position of the camera </td></tr>
|
|
<tr><td class="paramname">center</td><td>Position where the camera is looking at </td></tr>
|
|
<tr><td class="paramname">up</td><td>Normalized up vector, how the camera is oriented. Typically (0, 0, 1)</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="tparams"><dt>Template Parameters</dt><dd>
|
|
<table class="tparams">
|
|
<tr><td class="paramname">T</td><td>A floating-point scalar type </td></tr>
|
|
<tr><td class="paramname">Q</td><td>A value from qualifier enum</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section see"><dt>See also</dt><dd>- frustum(T const& left, T const& right, T const& bottom, T const& top, T const& nearVal, T const& farVal) frustum(T const& left, T const& right, T const& bottom, T const& top, T const& nearVal, T const& farVal) </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="gacfa12c8889c754846bc20c65d9b5c701"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#gacfa12c8889c754846bc20c65d9b5c701">◆ </a></span>lookAtRH()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">GLM_FUNC_DECL mat<4, 4, T, Q> glm::lookAtRH </td>
|
|
<td>(</td>
|
|
<td class="paramtype">vec< 3, T, Q > const & </td>
|
|
<td class="paramname"><em>eye</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">vec< 3, T, Q > const & </td>
|
|
<td class="paramname"><em>center</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">vec< 3, T, Q > const & </td>
|
|
<td class="paramname"><em>up</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Build a right handed look at view matrix. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">eye</td><td>Position of the camera </td></tr>
|
|
<tr><td class="paramname">center</td><td>Position where the camera is looking at </td></tr>
|
|
<tr><td class="paramname">up</td><td>Normalized up vector, how the camera is oriented. Typically (0, 0, 1)</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="tparams"><dt>Template Parameters</dt><dd>
|
|
<table class="tparams">
|
|
<tr><td class="paramname">T</td><td>A floating-point scalar type </td></tr>
|
|
<tr><td class="paramname">Q</td><td>A value from qualifier enum</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section see"><dt>See also</dt><dd>- frustum(T const& left, T const& right, T const& bottom, T const& top, T const& nearVal, T const& farVal) frustum(T const& left, T const& right, T const& bottom, T const& top, T const& nearVal, T const& farVal) </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="gaee9e865eaa9776370996da2940873fd4"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#gaee9e865eaa9776370996da2940873fd4">◆ </a></span>rotate()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">GLM_FUNC_DECL mat<4, 4, T, Q> glm::rotate </td>
|
|
<td>(</td>
|
|
<td class="paramtype">mat< 4, 4, T, Q > const & </td>
|
|
<td class="paramname"><em>m</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">T </td>
|
|
<td class="paramname"><em>angle</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">vec< 3, T, Q > const & </td>
|
|
<td class="paramname"><em>axis</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Builds a rotation 4 * 4 matrix created from an axis vector and an angle. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">m</td><td>Input matrix multiplied by this rotation matrix. </td></tr>
|
|
<tr><td class="paramname">angle</td><td>Rotation angle expressed in radians. </td></tr>
|
|
<tr><td class="paramname">axis</td><td>Rotation axis, recommended to be normalized.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="tparams"><dt>Template Parameters</dt><dd>
|
|
<table class="tparams">
|
|
<tr><td class="paramname">T</td><td>A floating-point scalar type </td></tr>
|
|
<tr><td class="paramname">Q</td><td>A value from qualifier enum</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section see"><dt>See also</dt><dd>- rotate(mat<4, 4, T, Q> const& m, T angle, T x, T y, T z) </dd>
|
|
<dd>
|
|
- rotate(T angle, vec<3, T, Q> const& v) </dd>
|
|
<dd>
|
|
<a href="https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/glRotate.xml">glRotate man page</a> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ga05051adbee603fb3c5095d8cf5cc229b"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ga05051adbee603fb3c5095d8cf5cc229b">◆ </a></span>scale()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">GLM_FUNC_DECL mat<4, 4, T, Q> glm::scale </td>
|
|
<td>(</td>
|
|
<td class="paramtype">mat< 4, 4, T, Q > const & </td>
|
|
<td class="paramname"><em>m</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">vec< 3, T, Q > const & </td>
|
|
<td class="paramname"><em>v</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Builds a scale 4 * 4 matrix created from 3 scalars. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">m</td><td>Input matrix multiplied by this scale matrix. </td></tr>
|
|
<tr><td class="paramname">v</td><td>Ratio of scaling for each axis.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="tparams"><dt>Template Parameters</dt><dd>
|
|
<table class="tparams">
|
|
<tr><td class="paramname">T</td><td>A floating-point scalar type </td></tr>
|
|
<tr><td class="paramname">Q</td><td>A value from qualifier enum</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section see"><dt>See also</dt><dd>- scale(mat<4, 4, T, Q> const& m, T x, T y, T z) </dd>
|
|
<dd>
|
|
- scale(vec<3, T, Q> const& v) </dd>
|
|
<dd>
|
|
<a href="https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/glScale.xml">glScale man page</a> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ga1a4ecc4ad82652b8fb14dcb087879284"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ga1a4ecc4ad82652b8fb14dcb087879284">◆ </a></span>translate()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">GLM_FUNC_DECL mat<4, 4, T, Q> glm::translate </td>
|
|
<td>(</td>
|
|
<td class="paramtype">mat< 4, 4, T, Q > const & </td>
|
|
<td class="paramname"><em>m</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">vec< 3, T, Q > const & </td>
|
|
<td class="paramname"><em>v</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Builds a translation 4 * 4 matrix created from a vector of 3 components. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">m</td><td>Input matrix multiplied by this translation matrix. </td></tr>
|
|
<tr><td class="paramname">v</td><td>Coordinates of a translation vector.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="tparams"><dt>Template Parameters</dt><dd>
|
|
<table class="tparams">
|
|
<tr><td class="paramname">T</td><td>A floating-point scalar type </td></tr>
|
|
<tr><td class="paramname">Q</td><td>A value from qualifier enum</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<div class="fragment"><div class="line"><span class="preprocessor">#include <<a class="code" href="a00386.html">glm/glm.hpp</a>></span></div><div class="line"><span class="preprocessor">#include <<a class="code" href="a01364.html">glm/gtc/matrix_transform.hpp</a>></span></div><div class="line">...</div><div class="line">glm::mat4 m = <a class="code" href="a00668.html#ga1a4ecc4ad82652b8fb14dcb087879284">glm::translate</a>(<a class="code" href="a00701.html#ga0db98d836c5549d31cf64ecd043b7af7">glm::mat4</a>(1.0f), <a class="code" href="a00699.html#ga9c3019b13faf179e4ad3626ea66df334">glm::vec3</a>(1.0f));</div><div class="line"><span class="comment">// m[0][0] == 1.0f, m[0][1] == 0.0f, m[0][2] == 0.0f, m[0][3] == 0.0f</span></div><div class="line"><span class="comment">// m[1][0] == 0.0f, m[1][1] == 1.0f, m[1][2] == 0.0f, m[1][3] == 0.0f</span></div><div class="line"><span class="comment">// m[2][0] == 0.0f, m[2][1] == 0.0f, m[2][2] == 1.0f, m[2][3] == 0.0f</span></div><div class="line"><span class="comment">// m[3][0] == 1.0f, m[3][1] == 1.0f, m[3][2] == 1.0f, m[3][3] == 1.0f</span></div></div><!-- fragment --><dl class="section see"><dt>See also</dt><dd>- translate(mat<4, 4, T, Q> const& m, T x, T y, T z) </dd>
|
|
<dd>
|
|
- translate(vec<3, T, Q> const& v) </dd>
|
|
<dd>
|
|
<a href="https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/glTranslate.xml">glTranslate man page</a> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
</div><!-- contents -->
|
|
<!-- start footer part -->
|
|
<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.8.14
|
|
</small></address>
|
|
</body>
|
|
</html>
|