You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and dots ('.'), can be up to 35 characters long. Letters must be lowercase.
301 lines
15 KiB
301 lines
15 KiB
<!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>GLM: glm::core::function::geometric Namespace Reference</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.6.1 --> |
|
<div class="navigation" id="top"> |
|
<div class="tabs"> |
|
<ul> |
|
<li><a href="index.html"><span>Main Page</span></a></li> |
|
<li class="current"><a href="namespaces.html"><span>Namespaces</span></a></li> |
|
<li><a href="files.html"><span>Files</span></a></li> |
|
</ul> |
|
</div> |
|
<div class="tabs"> |
|
<ul> |
|
<li><a href="namespaces.html"><span>Namespace List</span></a></li> |
|
<li><a href="namespacemembers.html"><span>Namespace Members</span></a></li> |
|
</ul> |
|
</div> |
|
<div class="navpath"><a class="el" href="a00124.html">glm</a>::<a class="el" href="a00125.html">core</a>::<a class="el" href="a00126.html">function</a>::<a class="el" href="a00129.html">geometric</a> |
|
</div> |
|
</div> |
|
<div class="contents"> |
|
<h1>glm::core::function::geometric Namespace Reference</h1> |
|
<p>Define all <a class="el" href="a00129.html" title="Define all geometric functions from Section 8.4 of GLSL 1.30.8 specification. Included...">geometric</a> functions from Section 8.4 of GLSL 1.30.8 specification. Included in <a class="el" href="a00124.html" title="GLM namespace, it contains all GLSL based features.">glm</a> namespace. |
|
<a href="#_details">More...</a></p> |
|
<table border="0" cellpadding="0" cellspacing="0"> |
|
<tr><td colspan="2"><h2>Functions</h2></td></tr> |
|
<tr><td class="memTemplParams" colspan="2">template<typename valType > </td></tr> |
|
<tr><td class="memTemplItemLeft" align="right" valign="top">detail::tvec3< valType > </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00129.html#aef2c634b57ee979caa2ab897b6960e1f">cross</a> (detail::tvec3< valType > const &x, detail::tvec3< valType > const &y)</td></tr> |
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the cross product of x and y. <a href="#aef2c634b57ee979caa2ab897b6960e1f"></a><br/></td></tr> |
|
<tr><td class="memTemplParams" colspan="2">template<typename genType > </td></tr> |
|
<tr><td class="memTemplItemLeft" align="right" valign="top">genType::value_type </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00129.html#aa7cb6dbe9b8224c25345f1fd6fc09e77">distance</a> (genType const &p0, genType const &p1)</td></tr> |
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the distance betwwen p0 and p1, i.e., length(p0 - p1). <a href="#aa7cb6dbe9b8224c25345f1fd6fc09e77"></a><br/></td></tr> |
|
<tr><td class="memTemplParams" colspan="2">template<typename genType > </td></tr> |
|
<tr><td class="memTemplItemLeft" align="right" valign="top">genType::value_type </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00129.html#a38e1f1538ac0fedc9d6ac14910105421">dot</a> (genType const &x, genType const &y)</td></tr> |
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the dot product of x and y, i.e., result = x * y. <a href="#a38e1f1538ac0fedc9d6ac14910105421"></a><br/></td></tr> |
|
<tr><td class="memTemplParams" colspan="2">template<typename genType > </td></tr> |
|
<tr><td class="memTemplItemLeft" align="right" valign="top">genType </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00129.html#ad591e8f7b1a5e311d3439dda2bb82aea">faceforward</a> (genType const &N, genType const &I, genType const &Nref)</td></tr> |
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">If dot(Nref, I) < 0.0, return N, otherwise, return -N. <a href="#ad591e8f7b1a5e311d3439dda2bb82aea"></a><br/></td></tr> |
|
<tr><td class="memTemplParams" colspan="2">template<typename genType > </td></tr> |
|
<tr><td class="memTemplItemLeft" align="right" valign="top">genType::value_type </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00129.html#a10ee9a1d18c6da61cab61d8637d23847">length</a> (genType const &x)</td></tr> |
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the length of x, i.e., sqrt(x * x). <a href="#a10ee9a1d18c6da61cab61d8637d23847"></a><br/></td></tr> |
|
<tr><td class="memTemplParams" colspan="2">template<typename genType > </td></tr> |
|
<tr><td class="memTemplItemLeft" align="right" valign="top">genType </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00129.html#a07ff16965f11fa17122ac874ed492276">normalize</a> (genType const &x)</td></tr> |
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns a vector in the same direction as x but with length of 1. <a href="#a07ff16965f11fa17122ac874ed492276"></a><br/></td></tr> |
|
<tr><td class="memTemplParams" colspan="2">template<typename genType > </td></tr> |
|
<tr><td class="memTemplItemLeft" align="right" valign="top">genType </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00129.html#a2863d2331eb3752a5a17244c604c1d07">reflect</a> (genType const &I, genType const &N)</td></tr> |
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">For the incident vector I and surface orientation N, returns the reflection direction : result = I - 2.0 * dot(N, I) * N. <a href="#a2863d2331eb3752a5a17244c604c1d07"></a><br/></td></tr> |
|
<tr><td class="memTemplParams" colspan="2">template<typename genType > </td></tr> |
|
<tr><td class="memTemplItemLeft" align="right" valign="top">genType </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00129.html#a895392ad98499a450e2cc8579d76a84d">refract</a> (genType const &I, genType const &N, typename genType::value_type const &eta)</td></tr> |
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">For the incident vector I and surface normal N, and the ratio of indices of refraction eta, return the refraction vector. <a href="#a895392ad98499a450e2cc8579d76a84d"></a><br/></td></tr> |
|
</table> |
|
<hr/><a name="_details"></a><h2>Detailed Description</h2> |
|
<p>Define all <a class="el" href="a00129.html" title="Define all geometric functions from Section 8.4 of GLSL 1.30.8 specification. Included...">geometric</a> functions from Section 8.4 of GLSL 1.30.8 specification. Included in <a class="el" href="a00124.html" title="GLM namespace, it contains all GLSL based features.">glm</a> namespace. </p> |
|
<hr/><h2>Function Documentation</h2> |
|
<a class="anchor" id="aef2c634b57ee979caa2ab897b6960e1f"></a><!-- doxytag: member="glm::core::function::geometric::cross" ref="aef2c634b57ee979caa2ab897b6960e1f" args="(detail::tvec3< valType > const &x, detail::tvec3< valType > const &y)" --> |
|
<div class="memitem"> |
|
<div class="memproto"> |
|
<table class="memname"> |
|
<tr> |
|
<td class="memname">detail::tvec3<valType> glm::core::function::geometric::cross </td> |
|
<td>(</td> |
|
<td class="paramtype">detail::tvec3< valType > const & </td> |
|
<td class="paramname"> <em>x</em>, </td> |
|
</tr> |
|
<tr> |
|
<td class="paramkey"></td> |
|
<td></td> |
|
<td class="paramtype">detail::tvec3< valType > const & </td> |
|
<td class="paramname"> <em>y</em></td><td> </td> |
|
</tr> |
|
<tr> |
|
<td></td> |
|
<td>)</td> |
|
<td></td><td></td><td></td> |
|
</tr> |
|
</table> |
|
</div> |
|
<div class="memdoc"> |
|
|
|
<p>Returns the cross product of x and y. </p> |
|
<p>(From GLSL 1.30.08 specification, section 8.4) </p> |
|
|
|
</div> |
|
</div> |
|
<a class="anchor" id="aa7cb6dbe9b8224c25345f1fd6fc09e77"></a><!-- doxytag: member="glm::core::function::geometric::distance" ref="aa7cb6dbe9b8224c25345f1fd6fc09e77" args="(genType const &p0, genType const &p1)" --> |
|
<div class="memitem"> |
|
<div class="memproto"> |
|
<table class="memname"> |
|
<tr> |
|
<td class="memname">genType::value_type glm::core::function::geometric::distance </td> |
|
<td>(</td> |
|
<td class="paramtype">genType const & </td> |
|
<td class="paramname"> <em>p0</em>, </td> |
|
</tr> |
|
<tr> |
|
<td class="paramkey"></td> |
|
<td></td> |
|
<td class="paramtype">genType const & </td> |
|
<td class="paramname"> <em>p1</em></td><td> </td> |
|
</tr> |
|
<tr> |
|
<td></td> |
|
<td>)</td> |
|
<td></td><td></td><td></td> |
|
</tr> |
|
</table> |
|
</div> |
|
<div class="memdoc"> |
|
|
|
<p>Returns the distance betwwen p0 and p1, i.e., length(p0 - p1). </p> |
|
<p>(From GLSL 1.30.08 specification, section 8.4) </p> |
|
|
|
</div> |
|
</div> |
|
<a class="anchor" id="a38e1f1538ac0fedc9d6ac14910105421"></a><!-- doxytag: member="glm::core::function::geometric::dot" ref="a38e1f1538ac0fedc9d6ac14910105421" args="(genType const &x, genType const &y)" --> |
|
<div class="memitem"> |
|
<div class="memproto"> |
|
<table class="memname"> |
|
<tr> |
|
<td class="memname">genType::value_type glm::core::function::geometric::dot </td> |
|
<td>(</td> |
|
<td class="paramtype">genType const & </td> |
|
<td class="paramname"> <em>x</em>, </td> |
|
</tr> |
|
<tr> |
|
<td class="paramkey"></td> |
|
<td></td> |
|
<td class="paramtype">genType const & </td> |
|
<td class="paramname"> <em>y</em></td><td> </td> |
|
</tr> |
|
<tr> |
|
<td></td> |
|
<td>)</td> |
|
<td></td><td></td><td></td> |
|
</tr> |
|
</table> |
|
</div> |
|
<div class="memdoc"> |
|
|
|
<p>Returns the dot product of x and y, i.e., result = x * y. </p> |
|
<p>(From GLSL 1.30.08 specification, section 8.4) </p> |
|
|
|
</div> |
|
</div> |
|
<a class="anchor" id="ad591e8f7b1a5e311d3439dda2bb82aea"></a><!-- doxytag: member="glm::core::function::geometric::faceforward" ref="ad591e8f7b1a5e311d3439dda2bb82aea" args="(genType const &N, genType const &I, genType const &Nref)" --> |
|
<div class="memitem"> |
|
<div class="memproto"> |
|
<table class="memname"> |
|
<tr> |
|
<td class="memname">genType glm::core::function::geometric::faceforward </td> |
|
<td>(</td> |
|
<td class="paramtype">genType const & </td> |
|
<td class="paramname"> <em>N</em>, </td> |
|
</tr> |
|
<tr> |
|
<td class="paramkey"></td> |
|
<td></td> |
|
<td class="paramtype">genType const & </td> |
|
<td class="paramname"> <em>I</em>, </td> |
|
</tr> |
|
<tr> |
|
<td class="paramkey"></td> |
|
<td></td> |
|
<td class="paramtype">genType const & </td> |
|
<td class="paramname"> <em>Nref</em></td><td> </td> |
|
</tr> |
|
<tr> |
|
<td></td> |
|
<td>)</td> |
|
<td></td><td></td><td></td> |
|
</tr> |
|
</table> |
|
</div> |
|
<div class="memdoc"> |
|
|
|
<p>If dot(Nref, I) < 0.0, return N, otherwise, return -N. </p> |
|
<p>(From GLSL 1.30.08 specification, section 8.4) </p> |
|
|
|
</div> |
|
</div> |
|
<a class="anchor" id="a10ee9a1d18c6da61cab61d8637d23847"></a><!-- doxytag: member="glm::core::function::geometric::length" ref="a10ee9a1d18c6da61cab61d8637d23847" args="(genType const &x)" --> |
|
<div class="memitem"> |
|
<div class="memproto"> |
|
<table class="memname"> |
|
<tr> |
|
<td class="memname">genType::value_type glm::core::function::geometric::length </td> |
|
<td>(</td> |
|
<td class="paramtype">genType const & </td> |
|
<td class="paramname"> <em>x</em></td> |
|
<td> ) </td> |
|
<td></td> |
|
</tr> |
|
</table> |
|
</div> |
|
<div class="memdoc"> |
|
|
|
<p>Returns the length of x, i.e., sqrt(x * x). </p> |
|
<p>(From GLSL 1.30.08 specification, section 8.4) </p> |
|
|
|
</div> |
|
</div> |
|
<a class="anchor" id="a07ff16965f11fa17122ac874ed492276"></a><!-- doxytag: member="glm::core::function::geometric::normalize" ref="a07ff16965f11fa17122ac874ed492276" args="(genType const &x)" --> |
|
<div class="memitem"> |
|
<div class="memproto"> |
|
<table class="memname"> |
|
<tr> |
|
<td class="memname">genType glm::core::function::geometric::normalize </td> |
|
<td>(</td> |
|
<td class="paramtype">genType const & </td> |
|
<td class="paramname"> <em>x</em></td> |
|
<td> ) </td> |
|
<td></td> |
|
</tr> |
|
</table> |
|
</div> |
|
<div class="memdoc"> |
|
|
|
<p>Returns a vector in the same direction as x but with length of 1. </p> |
|
<p>(From GLSL 1.30.08 specification, section 8.4) </p> |
|
|
|
</div> |
|
</div> |
|
<a class="anchor" id="a2863d2331eb3752a5a17244c604c1d07"></a><!-- doxytag: member="glm::core::function::geometric::reflect" ref="a2863d2331eb3752a5a17244c604c1d07" args="(genType const &I, genType const &N)" --> |
|
<div class="memitem"> |
|
<div class="memproto"> |
|
<table class="memname"> |
|
<tr> |
|
<td class="memname">genType glm::core::function::geometric::reflect </td> |
|
<td>(</td> |
|
<td class="paramtype">genType const & </td> |
|
<td class="paramname"> <em>I</em>, </td> |
|
</tr> |
|
<tr> |
|
<td class="paramkey"></td> |
|
<td></td> |
|
<td class="paramtype">genType const & </td> |
|
<td class="paramname"> <em>N</em></td><td> </td> |
|
</tr> |
|
<tr> |
|
<td></td> |
|
<td>)</td> |
|
<td></td><td></td><td></td> |
|
</tr> |
|
</table> |
|
</div> |
|
<div class="memdoc"> |
|
|
|
<p>For the incident vector I and surface orientation N, returns the reflection direction : result = I - 2.0 * dot(N, I) * N. </p> |
|
<p>(From GLSL 1.30.08 specification, section 8.4) </p> |
|
|
|
</div> |
|
</div> |
|
<a class="anchor" id="a895392ad98499a450e2cc8579d76a84d"></a><!-- doxytag: member="glm::core::function::geometric::refract" ref="a895392ad98499a450e2cc8579d76a84d" args="(genType const &I, genType const &N, typename genType::value_type const &eta)" --> |
|
<div class="memitem"> |
|
<div class="memproto"> |
|
<table class="memname"> |
|
<tr> |
|
<td class="memname">genType glm::core::function::geometric::refract </td> |
|
<td>(</td> |
|
<td class="paramtype">genType const & </td> |
|
<td class="paramname"> <em>I</em>, </td> |
|
</tr> |
|
<tr> |
|
<td class="paramkey"></td> |
|
<td></td> |
|
<td class="paramtype">genType const & </td> |
|
<td class="paramname"> <em>N</em>, </td> |
|
</tr> |
|
<tr> |
|
<td class="paramkey"></td> |
|
<td></td> |
|
<td class="paramtype">typename genType::value_type const & </td> |
|
<td class="paramname"> <em>eta</em></td><td> </td> |
|
</tr> |
|
<tr> |
|
<td></td> |
|
<td>)</td> |
|
<td></td><td></td><td></td> |
|
</tr> |
|
</table> |
|
</div> |
|
<div class="memdoc"> |
|
|
|
<p>For the incident vector I and surface normal N, and the ratio of indices of refraction eta, return the refraction vector. </p> |
|
<p>(From GLSL 1.30.08 specification, section 8.4) </p> |
|
|
|
</div> |
|
</div> |
|
</div> |
|
<hr size="1"/><address style="text-align: right;"><small>Generated on Mon Nov 16 11:23:23 2009 for GLM by |
|
<a href="http://www.doxygen.org/index.html"> |
|
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address> |
|
</body> |
|
</html>
|
|
|