namespace_closest_point.html 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
  5. <meta http-equiv="X-UA-Compatible" content="IE=11"/>
  6. <meta name="generator" content="Doxygen 1.12.0"/>
  7. <meta name="viewport" content="width=device-width, initial-scale=1"/>
  8. <title>Jolt Physics: ClosestPoint Namespace Reference</title>
  9. <link href="tabs.css" rel="stylesheet" type="text/css"/>
  10. <script type="text/javascript" src="jquery.js"></script>
  11. <script type="text/javascript" src="dynsections.js"></script>
  12. <script type="text/javascript" src="clipboard.js"></script>
  13. <link href="navtree.css" rel="stylesheet" type="text/css"/>
  14. <script type="text/javascript" src="navtreedata.js"></script>
  15. <script type="text/javascript" src="navtree.js"></script>
  16. <script type="text/javascript" src="resize.js"></script>
  17. <script type="text/javascript" src="cookie.js"></script>
  18. <link href="search/search.css" rel="stylesheet" type="text/css"/>
  19. <script type="text/javascript" src="search/searchdata.js"></script>
  20. <script type="text/javascript" src="search/search.js"></script>
  21. <script type="text/x-mathjax-config">
  22. MathJax.Hub.Config({
  23. extensions: ["tex2jax.js"],
  24. jax: ["input/TeX","output/HTML-CSS"],
  25. });
  26. </script>
  27. <script type="text/javascript" async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js"></script>
  28. <link href="doxygen.css" rel="stylesheet" type="text/css" />
  29. </head>
  30. <body>
  31. <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
  32. <div id="titlearea">
  33. <table cellspacing="0" cellpadding="0">
  34. <tbody>
  35. <tr id="projectrow">
  36. <td id="projectlogo"><img alt="Logo" src="LogoSmall.png"/></td>
  37. <td id="projectalign">
  38. <div id="projectname">Jolt Physics
  39. </div>
  40. <div id="projectbrief">A multi core friendly Game Physics Engine</div>
  41. </td>
  42. </tr>
  43. </tbody>
  44. </table>
  45. </div>
  46. <!-- end header part -->
  47. <!-- Generated by Doxygen 1.12.0 -->
  48. <script type="text/javascript">
  49. /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
  50. var searchBox = new SearchBox("searchBox", "search/",'.html');
  51. /* @license-end */
  52. </script>
  53. <script type="text/javascript">
  54. /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
  55. $(function() { codefold.init(0); });
  56. /* @license-end */
  57. </script>
  58. <script type="text/javascript" src="menudata.js"></script>
  59. <script type="text/javascript" src="menu.js"></script>
  60. <script type="text/javascript">
  61. /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
  62. $(function() {
  63. initMenu('',true,false,'search.php','Search',true);
  64. $(function() { init_search(); });
  65. });
  66. /* @license-end */
  67. </script>
  68. <div id="main-nav"></div>
  69. </div><!-- top -->
  70. <div id="side-nav" class="ui-resizable side-nav-resizable">
  71. <div id="nav-tree">
  72. <div id="nav-tree-contents">
  73. <div id="nav-sync" class="sync"></div>
  74. </div>
  75. </div>
  76. <div id="splitbar" style="-moz-user-select:none;"
  77. class="ui-resizable-handle">
  78. </div>
  79. </div>
  80. <script type="text/javascript">
  81. /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
  82. $(function(){initNavTree('namespace_closest_point.html',''); initResizable(true); });
  83. /* @license-end */
  84. </script>
  85. <div id="doc-content">
  86. <!-- window showing the filter options -->
  87. <div id="MSearchSelectWindow"
  88. onmouseover="return searchBox.OnSearchSelectShow()"
  89. onmouseout="return searchBox.OnSearchSelectHide()"
  90. onkeydown="return searchBox.OnSearchSelectKey(event)">
  91. </div>
  92. <!-- iframe showing the search results (closed by default) -->
  93. <div id="MSearchResultsWindow">
  94. <div id="MSearchResults">
  95. <div class="SRPage">
  96. <div id="SRIndex">
  97. <div id="SRResults"></div>
  98. <div class="SRStatus" id="Loading">Loading...</div>
  99. <div class="SRStatus" id="Searching">Searching...</div>
  100. <div class="SRStatus" id="NoMatches">No Matches</div>
  101. </div>
  102. </div>
  103. </div>
  104. </div>
  105. <div class="header">
  106. <div class="summary">
  107. <a href="#func-members">Functions</a> </div>
  108. <div class="headertitle"><div class="title">ClosestPoint Namespace Reference</div></div>
  109. </div><!--header-->
  110. <div class="contents">
  111. <p>Helper utils to find the closest point to a line segment, triangle or tetrahedron.
  112. <a href="#details">More...</a></p>
  113. <table class="memberdecls">
  114. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
  115. Functions</h2></td></tr>
  116. <tr class="memitem:a194f91c80641bfd1071c5316705a2c85" id="r_a194f91c80641bfd1071c5316705a2c85"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a194f91c80641bfd1071c5316705a2c85">GetBaryCentricCoordinates</a> (<a class="el" href="_math_types_8h.html#a6bc57c31f15cea47640b580d03737c68">Vec3Arg</a> inA, <a class="el" href="_math_types_8h.html#a6bc57c31f15cea47640b580d03737c68">Vec3Arg</a> inB, float &amp;outU, float &amp;outV)</td></tr>
  117. <tr class="separator:a194f91c80641bfd1071c5316705a2c85"><td class="memSeparator" colspan="2">&#160;</td></tr>
  118. <tr class="memitem:ae01251b466c3944d7c9cc6a9e01ce915" id="r_ae01251b466c3944d7c9cc6a9e01ce915"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ae01251b466c3944d7c9cc6a9e01ce915">GetBaryCentricCoordinates</a> (<a class="el" href="_math_types_8h.html#a6bc57c31f15cea47640b580d03737c68">Vec3Arg</a> inA, <a class="el" href="_math_types_8h.html#a6bc57c31f15cea47640b580d03737c68">Vec3Arg</a> inB, <a class="el" href="_math_types_8h.html#a6bc57c31f15cea47640b580d03737c68">Vec3Arg</a> inC, float &amp;outU, float &amp;outV, float &amp;outW)</td></tr>
  119. <tr class="separator:ae01251b466c3944d7c9cc6a9e01ce915"><td class="memSeparator" colspan="2">&#160;</td></tr>
  120. <tr class="memitem:ad687ef98922a03b7128a5d3a5a64ab39" id="r_ad687ef98922a03b7128a5d3a5a64ab39"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_vec3.html">Vec3</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ad687ef98922a03b7128a5d3a5a64ab39">GetClosestPointOnLine</a> (<a class="el" href="_math_types_8h.html#a6bc57c31f15cea47640b580d03737c68">Vec3Arg</a> inA, <a class="el" href="_math_types_8h.html#a6bc57c31f15cea47640b580d03737c68">Vec3Arg</a> inB, <a class="el" href="_core_8h.html#a8f95e75e58492e87412191fabadd8ca8">uint32</a> &amp;outSet)</td></tr>
  121. <tr class="separator:ad687ef98922a03b7128a5d3a5a64ab39"><td class="memSeparator" colspan="2">&#160;</td></tr>
  122. <tr class="memitem:a25fcaaf786d8724b11d02406ab74e0bc" id="r_a25fcaaf786d8724b11d02406ab74e0bc"><td class="memTemplParams" colspan="2">template&lt;bool MustIncludeC = false&gt; </td></tr>
  123. <tr class="memitem:a25fcaaf786d8724b11d02406ab74e0bc"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="class_vec3.html">Vec3</a>&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="#a25fcaaf786d8724b11d02406ab74e0bc">GetClosestPointOnTriangle</a> (<a class="el" href="_math_types_8h.html#a6bc57c31f15cea47640b580d03737c68">Vec3Arg</a> inA, <a class="el" href="_math_types_8h.html#a6bc57c31f15cea47640b580d03737c68">Vec3Arg</a> inB, <a class="el" href="_math_types_8h.html#a6bc57c31f15cea47640b580d03737c68">Vec3Arg</a> inC, <a class="el" href="_core_8h.html#a8f95e75e58492e87412191fabadd8ca8">uint32</a> &amp;outSet)</td></tr>
  124. <tr class="separator:a25fcaaf786d8724b11d02406ab74e0bc"><td class="memSeparator" colspan="2">&#160;</td></tr>
  125. <tr class="memitem:ad4bc500e8c3ea1bc2b2bc1a289408f1b" id="r_ad4bc500e8c3ea1bc2b2bc1a289408f1b"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ad4bc500e8c3ea1bc2b2bc1a289408f1b">OriginOutsideOfPlane</a> (<a class="el" href="_math_types_8h.html#a6bc57c31f15cea47640b580d03737c68">Vec3Arg</a> inA, <a class="el" href="_math_types_8h.html#a6bc57c31f15cea47640b580d03737c68">Vec3Arg</a> inB, <a class="el" href="_math_types_8h.html#a6bc57c31f15cea47640b580d03737c68">Vec3Arg</a> inC, <a class="el" href="_math_types_8h.html#a6bc57c31f15cea47640b580d03737c68">Vec3Arg</a> inD)</td></tr>
  126. <tr class="memdesc:ad4bc500e8c3ea1bc2b2bc1a289408f1b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check if the origin is outside the plane of triangle (inA, inB, inC). inD specifies the front side of the plane. <br /></td></tr>
  127. <tr class="separator:ad4bc500e8c3ea1bc2b2bc1a289408f1b"><td class="memSeparator" colspan="2">&#160;</td></tr>
  128. <tr class="memitem:a7221bb45d1aec01527f66683bf2611e0" id="r_a7221bb45d1aec01527f66683bf2611e0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_u_vec4.html">UVec4</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a7221bb45d1aec01527f66683bf2611e0">OriginOutsideOfTetrahedronPlanes</a> (<a class="el" href="_math_types_8h.html#a6bc57c31f15cea47640b580d03737c68">Vec3Arg</a> inA, <a class="el" href="_math_types_8h.html#a6bc57c31f15cea47640b580d03737c68">Vec3Arg</a> inB, <a class="el" href="_math_types_8h.html#a6bc57c31f15cea47640b580d03737c68">Vec3Arg</a> inC, <a class="el" href="_math_types_8h.html#a6bc57c31f15cea47640b580d03737c68">Vec3Arg</a> inD)</td></tr>
  129. <tr class="separator:a7221bb45d1aec01527f66683bf2611e0"><td class="memSeparator" colspan="2">&#160;</td></tr>
  130. <tr class="memitem:abafebdbe3dea0fe6674c20fc9ccc8540" id="r_abafebdbe3dea0fe6674c20fc9ccc8540"><td class="memTemplParams" colspan="2">template&lt;bool MustIncludeD = false&gt; </td></tr>
  131. <tr class="memitem:abafebdbe3dea0fe6674c20fc9ccc8540"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="class_vec3.html">Vec3</a>&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="#abafebdbe3dea0fe6674c20fc9ccc8540">GetClosestPointOnTetrahedron</a> (<a class="el" href="_math_types_8h.html#a6bc57c31f15cea47640b580d03737c68">Vec3Arg</a> inA, <a class="el" href="_math_types_8h.html#a6bc57c31f15cea47640b580d03737c68">Vec3Arg</a> inB, <a class="el" href="_math_types_8h.html#a6bc57c31f15cea47640b580d03737c68">Vec3Arg</a> inC, <a class="el" href="_math_types_8h.html#a6bc57c31f15cea47640b580d03737c68">Vec3Arg</a> inD, <a class="el" href="_core_8h.html#a8f95e75e58492e87412191fabadd8ca8">uint32</a> &amp;outSet)</td></tr>
  132. <tr class="separator:abafebdbe3dea0fe6674c20fc9ccc8540"><td class="memSeparator" colspan="2">&#160;</td></tr>
  133. </table>
  134. <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
  135. <div class="textblock"><p>Helper utils to find the closest point to a line segment, triangle or tetrahedron. </p>
  136. </div><h2 class="groupheader">Function Documentation</h2>
  137. <a id="a194f91c80641bfd1071c5316705a2c85" name="a194f91c80641bfd1071c5316705a2c85"></a>
  138. <h2 class="memtitle"><span class="permalink"><a href="#a194f91c80641bfd1071c5316705a2c85">&#9670;&#160;</a></span>GetBaryCentricCoordinates() <span class="overload">[1/2]</span></h2>
  139. <div class="memitem">
  140. <div class="memproto">
  141. <table class="mlabels">
  142. <tr>
  143. <td class="mlabels-left">
  144. <table class="memname">
  145. <tr>
  146. <td class="memname">bool ClosestPoint::GetBaryCentricCoordinates </td>
  147. <td>(</td>
  148. <td class="paramtype"><a class="el" href="_math_types_8h.html#a6bc57c31f15cea47640b580d03737c68">Vec3Arg</a></td> <td class="paramname"><span class="paramname"><em>inA</em></span>, </td>
  149. </tr>
  150. <tr>
  151. <td class="paramkey"></td>
  152. <td></td>
  153. <td class="paramtype"><a class="el" href="_math_types_8h.html#a6bc57c31f15cea47640b580d03737c68">Vec3Arg</a></td> <td class="paramname"><span class="paramname"><em>inB</em></span>, </td>
  154. </tr>
  155. <tr>
  156. <td class="paramkey"></td>
  157. <td></td>
  158. <td class="paramtype">float &amp;</td> <td class="paramname"><span class="paramname"><em>outU</em></span>, </td>
  159. </tr>
  160. <tr>
  161. <td class="paramkey"></td>
  162. <td></td>
  163. <td class="paramtype">float &amp;</td> <td class="paramname"><span class="paramname"><em>outV</em></span>&#160;)</td>
  164. </tr>
  165. </table>
  166. </td>
  167. <td class="mlabels-right">
  168. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  169. </tr>
  170. </table>
  171. </div><div class="memdoc">
  172. <p>Compute barycentric coordinates of closest point to origin for infinite line defined by (inA, inB) Point can then be computed as inA * outU + inB * outV Returns false if the points inA, inB do not form a line (are at the same point) </p>
  173. </div>
  174. </div>
  175. <a id="ae01251b466c3944d7c9cc6a9e01ce915" name="ae01251b466c3944d7c9cc6a9e01ce915"></a>
  176. <h2 class="memtitle"><span class="permalink"><a href="#ae01251b466c3944d7c9cc6a9e01ce915">&#9670;&#160;</a></span>GetBaryCentricCoordinates() <span class="overload">[2/2]</span></h2>
  177. <div class="memitem">
  178. <div class="memproto">
  179. <table class="mlabels">
  180. <tr>
  181. <td class="mlabels-left">
  182. <table class="memname">
  183. <tr>
  184. <td class="memname">bool ClosestPoint::GetBaryCentricCoordinates </td>
  185. <td>(</td>
  186. <td class="paramtype"><a class="el" href="_math_types_8h.html#a6bc57c31f15cea47640b580d03737c68">Vec3Arg</a></td> <td class="paramname"><span class="paramname"><em>inA</em></span>, </td>
  187. </tr>
  188. <tr>
  189. <td class="paramkey"></td>
  190. <td></td>
  191. <td class="paramtype"><a class="el" href="_math_types_8h.html#a6bc57c31f15cea47640b580d03737c68">Vec3Arg</a></td> <td class="paramname"><span class="paramname"><em>inB</em></span>, </td>
  192. </tr>
  193. <tr>
  194. <td class="paramkey"></td>
  195. <td></td>
  196. <td class="paramtype"><a class="el" href="_math_types_8h.html#a6bc57c31f15cea47640b580d03737c68">Vec3Arg</a></td> <td class="paramname"><span class="paramname"><em>inC</em></span>, </td>
  197. </tr>
  198. <tr>
  199. <td class="paramkey"></td>
  200. <td></td>
  201. <td class="paramtype">float &amp;</td> <td class="paramname"><span class="paramname"><em>outU</em></span>, </td>
  202. </tr>
  203. <tr>
  204. <td class="paramkey"></td>
  205. <td></td>
  206. <td class="paramtype">float &amp;</td> <td class="paramname"><span class="paramname"><em>outV</em></span>, </td>
  207. </tr>
  208. <tr>
  209. <td class="paramkey"></td>
  210. <td></td>
  211. <td class="paramtype">float &amp;</td> <td class="paramname"><span class="paramname"><em>outW</em></span>&#160;)</td>
  212. </tr>
  213. </table>
  214. </td>
  215. <td class="mlabels-right">
  216. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  217. </tr>
  218. </table>
  219. </div><div class="memdoc">
  220. <p>Compute barycentric coordinates of closest point to origin for plane defined by (inA, inB, inC) Point can then be computed as inA * outU + inB * outV + inC * outW Returns false if the points inA, inB, inC do not form a plane (are on the same line or at the same point) </p>
  221. </div>
  222. </div>
  223. <a id="ad687ef98922a03b7128a5d3a5a64ab39" name="ad687ef98922a03b7128a5d3a5a64ab39"></a>
  224. <h2 class="memtitle"><span class="permalink"><a href="#ad687ef98922a03b7128a5d3a5a64ab39">&#9670;&#160;</a></span>GetClosestPointOnLine()</h2>
  225. <div class="memitem">
  226. <div class="memproto">
  227. <table class="mlabels">
  228. <tr>
  229. <td class="mlabels-left">
  230. <table class="memname">
  231. <tr>
  232. <td class="memname"><a class="el" href="class_vec3.html">Vec3</a> ClosestPoint::GetClosestPointOnLine </td>
  233. <td>(</td>
  234. <td class="paramtype"><a class="el" href="_math_types_8h.html#a6bc57c31f15cea47640b580d03737c68">Vec3Arg</a></td> <td class="paramname"><span class="paramname"><em>inA</em></span>, </td>
  235. </tr>
  236. <tr>
  237. <td class="paramkey"></td>
  238. <td></td>
  239. <td class="paramtype"><a class="el" href="_math_types_8h.html#a6bc57c31f15cea47640b580d03737c68">Vec3Arg</a></td> <td class="paramname"><span class="paramname"><em>inB</em></span>, </td>
  240. </tr>
  241. <tr>
  242. <td class="paramkey"></td>
  243. <td></td>
  244. <td class="paramtype"><a class="el" href="_core_8h.html#a8f95e75e58492e87412191fabadd8ca8">uint32</a> &amp;</td> <td class="paramname"><span class="paramname"><em>outSet</em></span>&#160;)</td>
  245. </tr>
  246. </table>
  247. </td>
  248. <td class="mlabels-right">
  249. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  250. </tr>
  251. </table>
  252. </div><div class="memdoc">
  253. <p>Get the closest point to the origin of line (inA, inB) outSet describes which features are closest: 1 = a, 2 = b, 3 = line segment ab </p>
  254. </div>
  255. </div>
  256. <a id="abafebdbe3dea0fe6674c20fc9ccc8540" name="abafebdbe3dea0fe6674c20fc9ccc8540"></a>
  257. <h2 class="memtitle"><span class="permalink"><a href="#abafebdbe3dea0fe6674c20fc9ccc8540">&#9670;&#160;</a></span>GetClosestPointOnTetrahedron()</h2>
  258. <div class="memitem">
  259. <div class="memproto">
  260. <div class="memtemplate">
  261. template&lt;bool MustIncludeD = false&gt; </div>
  262. <table class="mlabels">
  263. <tr>
  264. <td class="mlabels-left">
  265. <table class="memname">
  266. <tr>
  267. <td class="memname"><a class="el" href="class_vec3.html">Vec3</a> ClosestPoint::GetClosestPointOnTetrahedron </td>
  268. <td>(</td>
  269. <td class="paramtype"><a class="el" href="_math_types_8h.html#a6bc57c31f15cea47640b580d03737c68">Vec3Arg</a></td> <td class="paramname"><span class="paramname"><em>inA</em></span>, </td>
  270. </tr>
  271. <tr>
  272. <td class="paramkey"></td>
  273. <td></td>
  274. <td class="paramtype"><a class="el" href="_math_types_8h.html#a6bc57c31f15cea47640b580d03737c68">Vec3Arg</a></td> <td class="paramname"><span class="paramname"><em>inB</em></span>, </td>
  275. </tr>
  276. <tr>
  277. <td class="paramkey"></td>
  278. <td></td>
  279. <td class="paramtype"><a class="el" href="_math_types_8h.html#a6bc57c31f15cea47640b580d03737c68">Vec3Arg</a></td> <td class="paramname"><span class="paramname"><em>inC</em></span>, </td>
  280. </tr>
  281. <tr>
  282. <td class="paramkey"></td>
  283. <td></td>
  284. <td class="paramtype"><a class="el" href="_math_types_8h.html#a6bc57c31f15cea47640b580d03737c68">Vec3Arg</a></td> <td class="paramname"><span class="paramname"><em>inD</em></span>, </td>
  285. </tr>
  286. <tr>
  287. <td class="paramkey"></td>
  288. <td></td>
  289. <td class="paramtype"><a class="el" href="_core_8h.html#a8f95e75e58492e87412191fabadd8ca8">uint32</a> &amp;</td> <td class="paramname"><span class="paramname"><em>outSet</em></span>&#160;)</td>
  290. </tr>
  291. </table>
  292. </td>
  293. <td class="mlabels-right">
  294. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  295. </tr>
  296. </table>
  297. </div><div class="memdoc">
  298. <p>Get the closest point between tetrahedron (inA, inB, inC, inD) to the origin outSet specifies which feature was closest, 1 = a, 2 = b, 4 = c, 8 = d. Edges have 2 bits set, triangles 3 and if the point is in the interior 4 bits are set. If MustIncludeD is true, the function assumes that D is part of the closest feature (vertex, edge, face, tetrahedron) and does less work, if the assumption is not true then a closest point to the other features is returned. </p>
  299. </div>
  300. </div>
  301. <a id="a25fcaaf786d8724b11d02406ab74e0bc" name="a25fcaaf786d8724b11d02406ab74e0bc"></a>
  302. <h2 class="memtitle"><span class="permalink"><a href="#a25fcaaf786d8724b11d02406ab74e0bc">&#9670;&#160;</a></span>GetClosestPointOnTriangle()</h2>
  303. <div class="memitem">
  304. <div class="memproto">
  305. <div class="memtemplate">
  306. template&lt;bool MustIncludeC = false&gt; </div>
  307. <table class="mlabels">
  308. <tr>
  309. <td class="mlabels-left">
  310. <table class="memname">
  311. <tr>
  312. <td class="memname"><a class="el" href="class_vec3.html">Vec3</a> ClosestPoint::GetClosestPointOnTriangle </td>
  313. <td>(</td>
  314. <td class="paramtype"><a class="el" href="_math_types_8h.html#a6bc57c31f15cea47640b580d03737c68">Vec3Arg</a></td> <td class="paramname"><span class="paramname"><em>inA</em></span>, </td>
  315. </tr>
  316. <tr>
  317. <td class="paramkey"></td>
  318. <td></td>
  319. <td class="paramtype"><a class="el" href="_math_types_8h.html#a6bc57c31f15cea47640b580d03737c68">Vec3Arg</a></td> <td class="paramname"><span class="paramname"><em>inB</em></span>, </td>
  320. </tr>
  321. <tr>
  322. <td class="paramkey"></td>
  323. <td></td>
  324. <td class="paramtype"><a class="el" href="_math_types_8h.html#a6bc57c31f15cea47640b580d03737c68">Vec3Arg</a></td> <td class="paramname"><span class="paramname"><em>inC</em></span>, </td>
  325. </tr>
  326. <tr>
  327. <td class="paramkey"></td>
  328. <td></td>
  329. <td class="paramtype"><a class="el" href="_core_8h.html#a8f95e75e58492e87412191fabadd8ca8">uint32</a> &amp;</td> <td class="paramname"><span class="paramname"><em>outSet</em></span>&#160;)</td>
  330. </tr>
  331. </table>
  332. </td>
  333. <td class="mlabels-right">
  334. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  335. </tr>
  336. </table>
  337. </div><div class="memdoc">
  338. <p>Get the closest point to the origin of triangle (inA, inB, inC) outSet describes which features are closest: 1 = a, 2 = b, 4 = c, 5 = line segment ac, 7 = triangle interior etc. If MustIncludeC is true, the function assumes that C is part of the closest feature (vertex, edge, face) and does less work, if the assumption is not true then a closest point to the other features is returned. </p>
  339. </div>
  340. </div>
  341. <a id="ad4bc500e8c3ea1bc2b2bc1a289408f1b" name="ad4bc500e8c3ea1bc2b2bc1a289408f1b"></a>
  342. <h2 class="memtitle"><span class="permalink"><a href="#ad4bc500e8c3ea1bc2b2bc1a289408f1b">&#9670;&#160;</a></span>OriginOutsideOfPlane()</h2>
  343. <div class="memitem">
  344. <div class="memproto">
  345. <table class="mlabels">
  346. <tr>
  347. <td class="mlabels-left">
  348. <table class="memname">
  349. <tr>
  350. <td class="memname">bool ClosestPoint::OriginOutsideOfPlane </td>
  351. <td>(</td>
  352. <td class="paramtype"><a class="el" href="_math_types_8h.html#a6bc57c31f15cea47640b580d03737c68">Vec3Arg</a></td> <td class="paramname"><span class="paramname"><em>inA</em></span>, </td>
  353. </tr>
  354. <tr>
  355. <td class="paramkey"></td>
  356. <td></td>
  357. <td class="paramtype"><a class="el" href="_math_types_8h.html#a6bc57c31f15cea47640b580d03737c68">Vec3Arg</a></td> <td class="paramname"><span class="paramname"><em>inB</em></span>, </td>
  358. </tr>
  359. <tr>
  360. <td class="paramkey"></td>
  361. <td></td>
  362. <td class="paramtype"><a class="el" href="_math_types_8h.html#a6bc57c31f15cea47640b580d03737c68">Vec3Arg</a></td> <td class="paramname"><span class="paramname"><em>inC</em></span>, </td>
  363. </tr>
  364. <tr>
  365. <td class="paramkey"></td>
  366. <td></td>
  367. <td class="paramtype"><a class="el" href="_math_types_8h.html#a6bc57c31f15cea47640b580d03737c68">Vec3Arg</a></td> <td class="paramname"><span class="paramname"><em>inD</em></span>&#160;)</td>
  368. </tr>
  369. </table>
  370. </td>
  371. <td class="mlabels-right">
  372. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  373. </tr>
  374. </table>
  375. </div><div class="memdoc">
  376. <p>Check if the origin is outside the plane of triangle (inA, inB, inC). inD specifies the front side of the plane. </p>
  377. </div>
  378. </div>
  379. <a id="a7221bb45d1aec01527f66683bf2611e0" name="a7221bb45d1aec01527f66683bf2611e0"></a>
  380. <h2 class="memtitle"><span class="permalink"><a href="#a7221bb45d1aec01527f66683bf2611e0">&#9670;&#160;</a></span>OriginOutsideOfTetrahedronPlanes()</h2>
  381. <div class="memitem">
  382. <div class="memproto">
  383. <table class="mlabels">
  384. <tr>
  385. <td class="mlabels-left">
  386. <table class="memname">
  387. <tr>
  388. <td class="memname"><a class="el" href="class_u_vec4.html">UVec4</a> ClosestPoint::OriginOutsideOfTetrahedronPlanes </td>
  389. <td>(</td>
  390. <td class="paramtype"><a class="el" href="_math_types_8h.html#a6bc57c31f15cea47640b580d03737c68">Vec3Arg</a></td> <td class="paramname"><span class="paramname"><em>inA</em></span>, </td>
  391. </tr>
  392. <tr>
  393. <td class="paramkey"></td>
  394. <td></td>
  395. <td class="paramtype"><a class="el" href="_math_types_8h.html#a6bc57c31f15cea47640b580d03737c68">Vec3Arg</a></td> <td class="paramname"><span class="paramname"><em>inB</em></span>, </td>
  396. </tr>
  397. <tr>
  398. <td class="paramkey"></td>
  399. <td></td>
  400. <td class="paramtype"><a class="el" href="_math_types_8h.html#a6bc57c31f15cea47640b580d03737c68">Vec3Arg</a></td> <td class="paramname"><span class="paramname"><em>inC</em></span>, </td>
  401. </tr>
  402. <tr>
  403. <td class="paramkey"></td>
  404. <td></td>
  405. <td class="paramtype"><a class="el" href="_math_types_8h.html#a6bc57c31f15cea47640b580d03737c68">Vec3Arg</a></td> <td class="paramname"><span class="paramname"><em>inD</em></span>&#160;)</td>
  406. </tr>
  407. </table>
  408. </td>
  409. <td class="mlabels-right">
  410. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  411. </tr>
  412. </table>
  413. </div><div class="memdoc">
  414. <p>Returns for each of the planes of the tetrahedron if the origin is inside it Roughly equivalent to: [OriginOutsideOfPlane(inA, inB, inC, inD), OriginOutsideOfPlane(inA, inC, inD, inB), OriginOutsideOfPlane(inA, inD, inB, inC), OriginOutsideOfPlane(inB, inD, inC, inA)] </p>
  415. </div>
  416. </div>
  417. </div><!-- contents -->
  418. </div><!-- doc-content -->
  419. <!-- start footer part -->
  420. <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  421. <ul>
  422. <li class="navelem"><a class="el" href="namespace_closest_point.html">ClosestPoint</a></li>
  423. <li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.12.0 </li>
  424. </ul>
  425. </div>
  426. </body>
  427. </html>