| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404 |
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
- <head>
- <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
- <meta http-equiv="X-UA-Compatible" content="IE=11"/>
- <meta name="generator" content="Doxygen 1.12.0"/>
- <meta name="viewport" content="width=device-width, initial-scale=1"/>
- <title>Jolt Physics: Jolt/Physics/Body/Body.inl Source File</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>
- <script type="text/javascript" src="clipboard.js"></script>
- <link href="navtree.css" rel="stylesheet" type="text/css"/>
- <script type="text/javascript" src="navtreedata.js"></script>
- <script type="text/javascript" src="navtree.js"></script>
- <script type="text/javascript" src="resize.js"></script>
- <script type="text/javascript" src="cookie.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>
- <script type="text/x-mathjax-config">
- MathJax.Hub.Config({
- extensions: ["tex2jax.js"],
- jax: ["input/TeX","output/HTML-CSS"],
- });
- </script>
- <script type="text/javascript" async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.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 id="projectrow">
- <td id="projectlogo"><img alt="Logo" src="LogoSmall.png"/></td>
- <td id="projectalign">
- <div id="projectname">Jolt Physics
- </div>
- <div id="projectbrief">A multi core friendly Game Physics Engine</div>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <!-- end header part -->
- <!-- Generated by Doxygen 1.12.0 -->
- <script type="text/javascript">
- /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
- var searchBox = new SearchBox("searchBox", "search/",'.html');
- /* @license-end */
- </script>
- <script type="text/javascript">
- /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
- $(function() { codefold.init(0); });
- /* @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:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
- $(function() {
- initMenu('',true,false,'search.php','Search',true);
- $(function() { init_search(); });
- });
- /* @license-end */
- </script>
- <div id="main-nav"></div>
- </div><!-- top -->
- <div id="side-nav" class="ui-resizable side-nav-resizable">
- <div id="nav-tree">
- <div id="nav-tree-contents">
- <div id="nav-sync" class="sync"></div>
- </div>
- </div>
- <div id="splitbar" style="-moz-user-select:none;"
- class="ui-resizable-handle">
- </div>
- </div>
- <script type="text/javascript">
- /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
- $(function(){initNavTree('_body_8inl_source.html',''); initResizable(true); });
- /* @license-end */
- </script>
- <div id="doc-content">
- <!-- 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">
- <div id="MSearchResults">
- <div class="SRPage">
- <div id="SRIndex">
- <div id="SRResults"></div>
- <div class="SRStatus" id="Loading">Loading...</div>
- <div class="SRStatus" id="Searching">Searching...</div>
- <div class="SRStatus" id="NoMatches">No Matches</div>
- </div>
- </div>
- </div>
- </div>
- <div class="header">
- <div class="headertitle"><div class="title">Body.inl</div></div>
- </div><!--header-->
- <div class="contents">
- <a href="_body_8inl.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="comment">// Jolt Physics Library (https://github.com/jrouwe/JoltPhysics)</span></div>
- <div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="comment">// SPDX-FileCopyrightText: 2021 Jorrit Rouwe</span></div>
- <div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span><span class="comment">// SPDX-License-Identifier: MIT</span></div>
- <div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span> </div>
- <div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="preprocessor">#pragma once</span></div>
- <div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span> </div>
- <div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><a class="code hl_define" href="_core_8h.html#ad14098b68b8c44ea6112601031268405">JPH_NAMESPACE_BEGIN</a></div>
- <div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span> </div>
- <div class="foldopen" id="foldopen00009" data-start="{" data-end="}">
- <div class="line"><a id="l00009" name="l00009"></a><span class="lineno"><a class="line" href="class_body.html#a4bab5d07f84d5a9d38119a1923298b5c"> 9</a></span><a class="code hl_class" href="class_mat44.html">RMat44</a> <a class="code hl_function" href="class_body.html#a4bab5d07f84d5a9d38119a1923298b5c">Body::GetWorldTransform</a>()<span class="keyword"> const</span></div>
- <div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span><span class="keyword"></span>{</div>
- <div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span> <a class="code hl_define" href="_issue_reporting_8h.html#aaf6b1df827e11b7ca5f6f8778bd8f8cd">JPH_ASSERT</a>(BodyAccess::sCheckRights(BodyAccess::sPositionAccess(), BodyAccess::EAccess::Read));</div>
- <div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span> </div>
- <div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span> <span class="keywordflow">return</span> <a class="code hl_function" href="class_mat44.html#aba5427f45393b40263d52ec614cfa985">RMat44::sRotationTranslation</a>(mRotation, mPosition).<a class="code hl_function" href="class_mat44.html#a16f19b423139db52503bb8d6526d947f">PreTranslated</a>(-mShape-><a class="code hl_function" href="class_shape.html#a7e34b0626a40c31db0b2a761922adb1a">GetCenterOfMass</a>());</div>
- <div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span>}</div>
- </div>
- <div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span> </div>
- <div class="foldopen" id="foldopen00016" data-start="{" data-end="}">
- <div class="line"><a id="l00016" name="l00016"></a><span class="lineno"><a class="line" href="class_body.html#a9431bfa66a018714074fe149c7a65ac5"> 16</a></span><a class="code hl_class" href="class_mat44.html">RMat44</a> <a class="code hl_function" href="class_body.html#a9431bfa66a018714074fe149c7a65ac5">Body::GetCenterOfMassTransform</a>()<span class="keyword"> const</span></div>
- <div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span><span class="keyword"></span>{</div>
- <div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span> <a class="code hl_define" href="_issue_reporting_8h.html#aaf6b1df827e11b7ca5f6f8778bd8f8cd">JPH_ASSERT</a>(BodyAccess::sCheckRights(BodyAccess::sPositionAccess(), BodyAccess::EAccess::Read));</div>
- <div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> </div>
- <div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> <span class="keywordflow">return</span> <a class="code hl_function" href="class_mat44.html#aba5427f45393b40263d52ec614cfa985">RMat44::sRotationTranslation</a>(mRotation, mPosition);</div>
- <div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span>}</div>
- </div>
- <div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> </div>
- <div class="foldopen" id="foldopen00023" data-start="{" data-end="}">
- <div class="line"><a id="l00023" name="l00023"></a><span class="lineno"><a class="line" href="class_body.html#a9c317394889f2064a20693935036eeb3"> 23</a></span><a class="code hl_class" href="class_mat44.html">RMat44</a> <a class="code hl_function" href="class_body.html#a9c317394889f2064a20693935036eeb3">Body::GetInverseCenterOfMassTransform</a>()<span class="keyword"> const</span></div>
- <div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span><span class="keyword"></span>{</div>
- <div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> <a class="code hl_define" href="_issue_reporting_8h.html#aaf6b1df827e11b7ca5f6f8778bd8f8cd">JPH_ASSERT</a>(BodyAccess::sCheckRights(BodyAccess::sPositionAccess(), BodyAccess::EAccess::Read));</div>
- <div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> </div>
- <div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> <span class="keywordflow">return</span> <a class="code hl_function" href="class_mat44.html#ac8be820a7eeb44bf570abb8dc01f4c59">RMat44::sInverseRotationTranslation</a>(mRotation, mPosition);</div>
- <div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span>}</div>
- </div>
- <div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> </div>
- <div class="foldopen" id="foldopen00030" data-start="{" data-end="}">
- <div class="line"><a id="l00030" name="l00030"></a><span class="lineno"><a class="line" href="class_body.html#a68c64581b2698ec41f1bbb50913bb48d"> 30</a></span><span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="class_body.html#a68c64581b2698ec41f1bbb50913bb48d">Body::sFindCollidingPairsCanCollide</a>(<span class="keyword">const</span> <a class="code hl_class" href="class_body.html">Body</a> &inBody1, <span class="keyword">const</span> <a class="code hl_class" href="class_body.html">Body</a> &inBody2)</div>
- <div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span>{</div>
- <div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> <span class="comment">// First body should never be a soft body</span></div>
- <div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> <a class="code hl_define" href="_issue_reporting_8h.html#aaf6b1df827e11b7ca5f6f8778bd8f8cd">JPH_ASSERT</a>(!inBody1.<a class="code hl_function" href="class_body.html#a454781f1340576ad7f752b51dd8a179d">IsSoftBody</a>());</div>
- <div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> </div>
- <div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> <span class="comment">// One of these conditions must be true</span></div>
- <div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> <span class="comment">// - We always allow detecting collisions between kinematic and non-dynamic bodies</span></div>
- <div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> <span class="comment">// - One of the bodies must be dynamic to collide</span></div>
- <div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> <span class="comment">// - A kinematic object can collide with a sensor</span></div>
- <div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> <span class="keywordflow">if</span> (!inBody1.<a class="code hl_function" href="class_body.html#a8bb48012c114b300a9bfdd296cfe0546">GetCollideKinematicVsNonDynamic</a>()</div>
- <div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> && !inBody2.<a class="code hl_function" href="class_body.html#a8bb48012c114b300a9bfdd296cfe0546">GetCollideKinematicVsNonDynamic</a>()</div>
- <div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> && (!inBody1.<a class="code hl_function" href="class_body.html#a1b21c30907c8c9ce30c176a054057bef">IsDynamic</a>() && !inBody2.<a class="code hl_function" href="class_body.html#a1b21c30907c8c9ce30c176a054057bef">IsDynamic</a>())</div>
- <div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> && !(inBody1.<a class="code hl_function" href="class_body.html#ab49045bc1738e110dea9cbc020528338">IsKinematic</a>() && inBody2.<a class="code hl_function" href="class_body.html#a251e1c9d8c9c7e40ddabc73420ac9ab1">IsSensor</a>())</div>
- <div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> && !(inBody2.<a class="code hl_function" href="class_body.html#ab49045bc1738e110dea9cbc020528338">IsKinematic</a>() && inBody1.<a class="code hl_function" href="class_body.html#a251e1c9d8c9c7e40ddabc73420ac9ab1">IsSensor</a>()))</div>
- <div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
- <div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> </div>
- <div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> <span class="comment">// Check that body 1 is active</span></div>
- <div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> <a class="code hl_typedef" href="_core_8h.html#a8f95e75e58492e87412191fabadd8ca8">uint32</a> body1_index_in_active_bodies = inBody1.<a class="code hl_function" href="class_body.html#a5ffba4cea6db6696fff3db87999bdf42">GetIndexInActiveBodiesInternal</a>();</div>
- <div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> <a class="code hl_define" href="_issue_reporting_8h.html#aaf6b1df827e11b7ca5f6f8778bd8f8cd">JPH_ASSERT</a>(!inBody1.<a class="code hl_function" href="class_body.html#a83748a3d5a5b0a5b0242ba91875b8e13">IsStatic</a>() && body1_index_in_active_bodies != <a class="code hl_variable" href="class_body.html#a636e301ffa9150e9df74895863394ee4">Body::cInactiveIndex</a>, <span class="stringliteral">"This function assumes that Body 1 is active"</span>);</div>
- <div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> </div>
- <div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> <span class="comment">// If the pair A, B collides we need to ensure that the pair B, A does not collide or else we will handle the collision twice.</span></div>
- <div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> <span class="comment">// If A is the same body as B we don't want to collide (1)</span></div>
- <div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> <span class="comment">// If A is dynamic / kinematic and B is static we should collide (2)</span></div>
- <div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> <span class="comment">// If A is dynamic / kinematic and B is dynamic / kinematic we should only collide if</span></div>
- <div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> <span class="comment">// - A is active and B is not active (3)</span></div>
- <div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> <span class="comment">// - A is active and B will become active during this simulation step (4)</span></div>
- <div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> <span class="comment">// - A is active and B is active, we require a condition that makes A, B collide and B, A not (5)</span></div>
- <div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> <span class="comment">//</span></div>
- <div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> <span class="comment">// In order to implement this we use the index in the active body list and make use of the fact that</span></div>
- <div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> <span class="comment">// a body not in the active list has Body.Index = 0xffffffff which is the highest possible value for an uint32.</span></div>
- <div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> <span class="comment">//</span></div>
- <div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> <span class="comment">// Because we know that A is active we know that A.Index != 0xffffffff:</span></div>
- <div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> <span class="comment">// (1) Because A.Index != 0xffffffff, if A.Index = B.Index then A = B, so to collide A.Index != B.Index</span></div>
- <div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> <span class="comment">// (2) A.Index != 0xffffffff, B.Index = 0xffffffff (because it's static and cannot be in the active list), so to collide A.Index != B.Index</span></div>
- <div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> <span class="comment">// (3) A.Index != 0xffffffff, B.Index = 0xffffffff (because it's not yet active), so to collide A.Index != B.Index</span></div>
- <div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> <span class="comment">// (4) A.Index != 0xffffffff, B.Index = 0xffffffff currently. But it can activate during the Broad/NarrowPhase step at which point it</span></div>
- <div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> <span class="comment">// will be added to the end of the active list which will make B.Index > A.Index (this holds only true when we don't deactivate</span></div>
- <div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> <span class="comment">// bodies during the Broad/NarrowPhase step), so to collide A.Index < B.Index.</span></div>
- <div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> <span class="comment">// (5) As tie breaker we can use the same condition A.Index < B.Index to collide, this means that if A, B collides then B, A won't</span></div>
- <div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> <span class="keyword">static_assert</span>(<a class="code hl_variable" href="class_body.html#a636e301ffa9150e9df74895863394ee4">Body::cInactiveIndex</a> == 0xffffffff, <span class="stringliteral">"The algorithm below uses this value"</span>);</div>
- <div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> <span class="keywordflow">if</span> (!inBody2.<a class="code hl_function" href="class_body.html#a454781f1340576ad7f752b51dd8a179d">IsSoftBody</a>() && body1_index_in_active_bodies >= inBody2.<a class="code hl_function" href="class_body.html#a5ffba4cea6db6696fff3db87999bdf42">GetIndexInActiveBodiesInternal</a>())</div>
- <div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
- <div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> <a class="code hl_define" href="_issue_reporting_8h.html#aaf6b1df827e11b7ca5f6f8778bd8f8cd">JPH_ASSERT</a>(inBody1.<a class="code hl_function" href="class_body.html#acbcb599679bb6a330a7ea3427fe90604">GetID</a>() != inBody2.<a class="code hl_function" href="class_body.html#acbcb599679bb6a330a7ea3427fe90604">GetID</a>(), <span class="stringliteral">"Read the comment above, A and B are the same body which should not be possible!"</span>);</div>
- <div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> </div>
- <div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> <span class="comment">// Check collision group filter</span></div>
- <div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> <span class="keywordflow">if</span> (!inBody1.<a class="code hl_function" href="class_body.html#a5865492b92c7c2e321c6916e80f5b7cb">GetCollisionGroup</a>().<a class="code hl_function" href="class_collision_group.html#aa7e60aa0b9f6e5563ab4ca690c8e2b56">CanCollide</a>(inBody2.<a class="code hl_function" href="class_body.html#a5865492b92c7c2e321c6916e80f5b7cb">GetCollisionGroup</a>()))</div>
- <div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
- <div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> </div>
- <div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
- <div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span>}</div>
- </div>
- <div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> </div>
- <div class="foldopen" id="foldopen00081" data-start="{" data-end="}">
- <div class="line"><a id="l00081" name="l00081"></a><span class="lineno"><a class="line" href="class_body.html#a3385650a73d75c7d9c16d13ea2d5519f"> 81</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="class_body.html#a3385650a73d75c7d9c16d13ea2d5519f">Body::AddRotationStep</a>(<a class="code hl_class" href="class_vec3.html">Vec3Arg</a> inAngularVelocityTimesDeltaTime)</div>
- <div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span>{</div>
- <div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> <a class="code hl_define" href="_issue_reporting_8h.html#aaf6b1df827e11b7ca5f6f8778bd8f8cd">JPH_ASSERT</a>(<a class="code hl_function" href="class_body.html#a8365154663e94343e1045893ee3b4c16">IsRigidBody</a>());</div>
- <div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> <a class="code hl_define" href="_issue_reporting_8h.html#aaf6b1df827e11b7ca5f6f8778bd8f8cd">JPH_ASSERT</a>(BodyAccess::sCheckRights(BodyAccess::sPositionAccess(), BodyAccess::EAccess::ReadWrite));</div>
- <div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> </div>
- <div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> <span class="comment">// This used to use the equation: d/dt R(t) = 1/2 * w(t) * R(t) so that R(t + dt) = R(t) + 1/2 * w(t) * R(t) * dt</span></div>
- <div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> <span class="comment">// See: Appendix B of An Introduction to Physically Based Modeling: Rigid Body Simulation II-Nonpenetration Constraints</span></div>
- <div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> <span class="comment">// URL: https://www.cs.cmu.edu/~baraff/sigcourse/notesd2.pdf</span></div>
- <div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> <span class="comment">// But this is a first order approximation and does not work well for kinematic ragdolls that are driven to a new</span></div>
- <div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> <span class="comment">// pose if the poses differ enough. So now we split w(t) * dt into an axis and angle part and create a quaternion with it.</span></div>
- <div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> <span class="comment">// Note that the resulting quaternion is normalized since otherwise numerical drift will eventually make the rotation non-normalized.</span></div>
- <div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> <span class="keywordtype">float</span> len = inAngularVelocityTimesDeltaTime.<a class="code hl_function" href="class_vec3.html#a38a9efffc3f9413f3dd702abc73eb9a2">Length</a>();</div>
- <div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> <span class="keywordflow">if</span> (len > 1.0e-6f)</div>
- <div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> {</div>
- <div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> mRotation = (<a class="code hl_function" href="class_quat.html#a3ac594bf7be610138e90735ae99ff8e9">Quat::sRotation</a>(inAngularVelocityTimesDeltaTime / len, len) * mRotation).Normalized();</div>
- <div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> <a class="code hl_define" href="_issue_reporting_8h.html#aaf6b1df827e11b7ca5f6f8778bd8f8cd">JPH_ASSERT</a>(!mRotation.<a class="code hl_function" href="class_quat.html#a62b95b1c1d36ecbd6f9732ca4789a7bf">IsNaN</a>());</div>
- <div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> }</div>
- <div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span>}</div>
- </div>
- <div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> </div>
- <div class="foldopen" id="foldopen00100" data-start="{" data-end="}">
- <div class="line"><a id="l00100" name="l00100"></a><span class="lineno"><a class="line" href="class_body.html#ab0df53d82e3a8356fac91d178b30c369"> 100</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="class_body.html#ab0df53d82e3a8356fac91d178b30c369">Body::SubRotationStep</a>(<a class="code hl_class" href="class_vec3.html">Vec3Arg</a> inAngularVelocityTimesDeltaTime)</div>
- <div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span>{</div>
- <div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> <a class="code hl_define" href="_issue_reporting_8h.html#aaf6b1df827e11b7ca5f6f8778bd8f8cd">JPH_ASSERT</a>(<a class="code hl_function" href="class_body.html#a8365154663e94343e1045893ee3b4c16">IsRigidBody</a>());</div>
- <div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> <a class="code hl_define" href="_issue_reporting_8h.html#aaf6b1df827e11b7ca5f6f8778bd8f8cd">JPH_ASSERT</a>(BodyAccess::sCheckRights(BodyAccess::sPositionAccess(), BodyAccess::EAccess::ReadWrite));</div>
- <div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> </div>
- <div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> <span class="comment">// See comment at Body::AddRotationStep</span></div>
- <div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> <span class="keywordtype">float</span> len = inAngularVelocityTimesDeltaTime.<a class="code hl_function" href="class_vec3.html#a38a9efffc3f9413f3dd702abc73eb9a2">Length</a>();</div>
- <div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> <span class="keywordflow">if</span> (len > 1.0e-6f)</div>
- <div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span> {</div>
- <div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> mRotation = (<a class="code hl_function" href="class_quat.html#a3ac594bf7be610138e90735ae99ff8e9">Quat::sRotation</a>(inAngularVelocityTimesDeltaTime / len, -len) * mRotation).Normalized();</div>
- <div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span> <a class="code hl_define" href="_issue_reporting_8h.html#aaf6b1df827e11b7ca5f6f8778bd8f8cd">JPH_ASSERT</a>(!mRotation.<a class="code hl_function" href="class_quat.html#a62b95b1c1d36ecbd6f9732ca4789a7bf">IsNaN</a>());</div>
- <div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span> }</div>
- <div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span>}</div>
- </div>
- <div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span> </div>
- <div class="foldopen" id="foldopen00114" data-start="{" data-end="}">
- <div class="line"><a id="l00114" name="l00114"></a><span class="lineno"><a class="line" href="class_body.html#a12422310c7aa9ec72e2376d08fbee6b5"> 114</a></span><a class="code hl_class" href="class_vec3.html">Vec3</a> <a class="code hl_function" href="class_body.html#a12422310c7aa9ec72e2376d08fbee6b5">Body::GetWorldSpaceSurfaceNormal</a>(<span class="keyword">const</span> <a class="code hl_class" href="class_sub_shape_i_d.html">SubShapeID</a> &inSubShapeID, <a class="code hl_class" href="class_vec3.html">RVec3Arg</a> inPosition)<span class="keyword"> const</span></div>
- <div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span><span class="keyword"></span>{</div>
- <div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span> <a class="code hl_class" href="class_mat44.html">RMat44</a> inv_com = <a class="code hl_function" href="class_body.html#a9c317394889f2064a20693935036eeb3">GetInverseCenterOfMassTransform</a>();</div>
- <div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span> <span class="keywordflow">return</span> inv_com.<a class="code hl_function" href="class_mat44.html#a3ed66bc4c5e8e010657bd5bb109f1406">Multiply3x3Transposed</a>(mShape-><a class="code hl_function" href="class_shape.html#adc7c6aeed1cde2ae1be099a4a5a4bd0c">GetSurfaceNormal</a>(inSubShapeID, <a class="code hl_class" href="class_vec3.html">Vec3</a>(inv_com * inPosition))).<a class="code hl_function" href="class_vec3.html#a0f7559f2691ad67826f42ca19916b7a9">Normalized</a>();</div>
- <div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span>}</div>
- </div>
- <div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span> </div>
- <div class="foldopen" id="foldopen00120" data-start="{" data-end="}">
- <div class="line"><a id="l00120" name="l00120"></a><span class="lineno"><a class="line" href="class_body.html#a731f2a92e9e215ff87efc831999e0e6e"> 120</a></span><a class="code hl_class" href="class_mat44.html">Mat44</a> <a class="code hl_function" href="class_body.html#a731f2a92e9e215ff87efc831999e0e6e">Body::GetInverseInertia</a>()<span class="keyword"> const</span></div>
- <div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span><span class="keyword"></span>{</div>
- <div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span> <a class="code hl_define" href="_issue_reporting_8h.html#aaf6b1df827e11b7ca5f6f8778bd8f8cd">JPH_ASSERT</a>(<a class="code hl_function" href="class_body.html#a1b21c30907c8c9ce30c176a054057bef">IsDynamic</a>());</div>
- <div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span> </div>
- <div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span> <span class="keywordflow">return</span> <a class="code hl_function" href="class_body.html#a0d39987255227c4221fcea66cb1fc041">GetMotionProperties</a>()-><a class="code hl_function" href="class_motion_properties.html#ab95f2b1c9b6bd9b6082f8cee8a7e1858">GetInverseInertiaForRotation</a>(<a class="code hl_function" href="class_mat44.html#ac3109f2d950061c0b4de57e76a132634">Mat44::sRotation</a>(mRotation));</div>
- <div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span>}</div>
- </div>
- <div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span> </div>
- <div class="foldopen" id="foldopen00127" data-start="{" data-end="}">
- <div class="line"><a id="l00127" name="l00127"></a><span class="lineno"><a class="line" href="class_body.html#a330c986c992c3fdc142194e870e3b8d3"> 127</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="class_body.html#add8352d484a2805f114400159151185b">Body::AddForce</a>(<a class="code hl_class" href="class_vec3.html">Vec3Arg</a> inForce, <a class="code hl_class" href="class_vec3.html">RVec3Arg</a> inPosition)</div>
- <div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span>{</div>
- <div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span> <a class="code hl_function" href="class_body.html#add8352d484a2805f114400159151185b">AddForce</a>(inForce);</div>
- <div class="line"><a id="l00130" name="l00130"></a><span class="lineno"> 130</span> <a class="code hl_function" href="class_body.html#aec30d437f934327d261e8ebdc23a2c8c">AddTorque</a>(<a class="code hl_class" href="class_vec3.html">Vec3</a>(inPosition - mPosition).Cross(inForce));</div>
- <div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span>}</div>
- </div>
- <div class="line"><a id="l00132" name="l00132"></a><span class="lineno"> 132</span> </div>
- <div class="foldopen" id="foldopen00133" data-start="{" data-end="}">
- <div class="line"><a id="l00133" name="l00133"></a><span class="lineno"><a class="line" href="class_body.html#af4e42e6ae915ca4fcaee1c988eeba0f7"> 133</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="class_body.html#af4e42e6ae915ca4fcaee1c988eeba0f7">Body::AddImpulse</a>(<a class="code hl_class" href="class_vec3.html">Vec3Arg</a> inImpulse)</div>
- <div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span>{</div>
- <div class="line"><a id="l00135" name="l00135"></a><span class="lineno"> 135</span> <a class="code hl_define" href="_issue_reporting_8h.html#aaf6b1df827e11b7ca5f6f8778bd8f8cd">JPH_ASSERT</a>(<a class="code hl_function" href="class_body.html#a1b21c30907c8c9ce30c176a054057bef">IsDynamic</a>());</div>
- <div class="line"><a id="l00136" name="l00136"></a><span class="lineno"> 136</span> </div>
- <div class="line"><a id="l00137" name="l00137"></a><span class="lineno"> 137</span> <a class="code hl_function" href="class_body.html#a5e1e46dac04eaf5fbaed87d6d781480d">SetLinearVelocityClamped</a>(mMotionProperties-><a class="code hl_function" href="class_motion_properties.html#a6478c1ccabfc23ee9ce98faa0643c080">GetLinearVelocity</a>() + inImpulse * mMotionProperties-><a class="code hl_function" href="class_motion_properties.html#a8a959bd2f7d8eb581d999e3b01920aa8">GetInverseMass</a>());</div>
- <div class="line"><a id="l00138" name="l00138"></a><span class="lineno"> 138</span>}</div>
- </div>
- <div class="line"><a id="l00139" name="l00139"></a><span class="lineno"> 139</span> </div>
- <div class="foldopen" id="foldopen00140" data-start="{" data-end="}">
- <div class="line"><a id="l00140" name="l00140"></a><span class="lineno"><a class="line" href="class_body.html#aca6076501cd66dedd2618166fdf1750a"> 140</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="class_body.html#af4e42e6ae915ca4fcaee1c988eeba0f7">Body::AddImpulse</a>(<a class="code hl_class" href="class_vec3.html">Vec3Arg</a> inImpulse, <a class="code hl_class" href="class_vec3.html">RVec3Arg</a> inPosition)</div>
- <div class="line"><a id="l00141" name="l00141"></a><span class="lineno"> 141</span>{</div>
- <div class="line"><a id="l00142" name="l00142"></a><span class="lineno"> 142</span> <a class="code hl_define" href="_issue_reporting_8h.html#aaf6b1df827e11b7ca5f6f8778bd8f8cd">JPH_ASSERT</a>(<a class="code hl_function" href="class_body.html#a1b21c30907c8c9ce30c176a054057bef">IsDynamic</a>());</div>
- <div class="line"><a id="l00143" name="l00143"></a><span class="lineno"> 143</span> </div>
- <div class="line"><a id="l00144" name="l00144"></a><span class="lineno"> 144</span> <a class="code hl_function" href="class_body.html#a5e1e46dac04eaf5fbaed87d6d781480d">SetLinearVelocityClamped</a>(mMotionProperties-><a class="code hl_function" href="class_motion_properties.html#a6478c1ccabfc23ee9ce98faa0643c080">GetLinearVelocity</a>() + inImpulse * mMotionProperties-><a class="code hl_function" href="class_motion_properties.html#a8a959bd2f7d8eb581d999e3b01920aa8">GetInverseMass</a>());</div>
- <div class="line"><a id="l00145" name="l00145"></a><span class="lineno"> 145</span> </div>
- <div class="line"><a id="l00146" name="l00146"></a><span class="lineno"> 146</span> <a class="code hl_function" href="class_body.html#a9033b203f8511c35dca0dfc8ca1c25ca">SetAngularVelocityClamped</a>(mMotionProperties-><a class="code hl_function" href="class_motion_properties.html#a66348339a05a43b730e1591273aace18">GetAngularVelocity</a>() + mMotionProperties-><a class="code hl_function" href="class_motion_properties.html#aa8a73ea7940a316151262ed9a28c4fbb">MultiplyWorldSpaceInverseInertiaByVector</a>(mRotation, <a class="code hl_class" href="class_vec3.html">Vec3</a>(inPosition - mPosition).Cross(inImpulse)));</div>
- <div class="line"><a id="l00147" name="l00147"></a><span class="lineno"> 147</span>}</div>
- </div>
- <div class="line"><a id="l00148" name="l00148"></a><span class="lineno"> 148</span> </div>
- <div class="foldopen" id="foldopen00149" data-start="{" data-end="}">
- <div class="line"><a id="l00149" name="l00149"></a><span class="lineno"><a class="line" href="class_body.html#aa797042eec783ed27333f529b66221a3"> 149</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="class_body.html#aa797042eec783ed27333f529b66221a3">Body::AddAngularImpulse</a>(<a class="code hl_class" href="class_vec3.html">Vec3Arg</a> inAngularImpulse)</div>
- <div class="line"><a id="l00150" name="l00150"></a><span class="lineno"> 150</span>{</div>
- <div class="line"><a id="l00151" name="l00151"></a><span class="lineno"> 151</span> <a class="code hl_define" href="_issue_reporting_8h.html#aaf6b1df827e11b7ca5f6f8778bd8f8cd">JPH_ASSERT</a>(<a class="code hl_function" href="class_body.html#a1b21c30907c8c9ce30c176a054057bef">IsDynamic</a>());</div>
- <div class="line"><a id="l00152" name="l00152"></a><span class="lineno"> 152</span> </div>
- <div class="line"><a id="l00153" name="l00153"></a><span class="lineno"> 153</span> <a class="code hl_function" href="class_body.html#a9033b203f8511c35dca0dfc8ca1c25ca">SetAngularVelocityClamped</a>(mMotionProperties-><a class="code hl_function" href="class_motion_properties.html#a66348339a05a43b730e1591273aace18">GetAngularVelocity</a>() + mMotionProperties-><a class="code hl_function" href="class_motion_properties.html#aa8a73ea7940a316151262ed9a28c4fbb">MultiplyWorldSpaceInverseInertiaByVector</a>(mRotation, inAngularImpulse));</div>
- <div class="line"><a id="l00154" name="l00154"></a><span class="lineno"> 154</span>}</div>
- </div>
- <div class="line"><a id="l00155" name="l00155"></a><span class="lineno"> 155</span> </div>
- <div class="line"><a id="l00156" name="l00156"></a><span class="lineno"> 156</span><span class="keywordtype">void</span> Body::GetSleepTestPoints(<a class="code hl_class" href="class_vec3.html">RVec3</a> *outPoints)<span class="keyword"> const</span></div>
- <div class="line"><a id="l00157" name="l00157"></a><span class="lineno"> 157</span><span class="keyword"></span>{</div>
- <div class="line"><a id="l00158" name="l00158"></a><span class="lineno"> 158</span> <a class="code hl_define" href="_issue_reporting_8h.html#aaf6b1df827e11b7ca5f6f8778bd8f8cd">JPH_ASSERT</a>(BodyAccess::sCheckRights(BodyAccess::sPositionAccess(), BodyAccess::EAccess::Read));</div>
- <div class="line"><a id="l00159" name="l00159"></a><span class="lineno"> 159</span> </div>
- <div class="line"><a id="l00160" name="l00160"></a><span class="lineno"> 160</span> <span class="comment">// Center of mass is the first position</span></div>
- <div class="line"><a id="l00161" name="l00161"></a><span class="lineno"> 161</span> outPoints[0] = mPosition;</div>
- <div class="line"><a id="l00162" name="l00162"></a><span class="lineno"> 162</span> </div>
- <div class="line"><a id="l00163" name="l00163"></a><span class="lineno"> 163</span> <span class="comment">// The second and third position are on the largest axis of the bounding box</span></div>
- <div class="line"><a id="l00164" name="l00164"></a><span class="lineno"> 164</span> <a class="code hl_class" href="class_vec3.html">Vec3</a> extent = mShape-><a class="code hl_function" href="class_shape.html#a30ea165596e01df087f6e4980ed6b0cb">GetLocalBounds</a>().<a class="code hl_function" href="class_a_a_box.html#a094a8548424826014024349fd7b96766">GetExtent</a>();</div>
- <div class="line"><a id="l00165" name="l00165"></a><span class="lineno"> 165</span> <span class="keywordtype">int</span> lowest_component = extent.<a class="code hl_function" href="class_vec3.html#a502453ae3005d5b84a221adf80721f92">GetLowestComponentIndex</a>();</div>
- <div class="line"><a id="l00166" name="l00166"></a><span class="lineno"> 166</span> <a class="code hl_class" href="class_mat44.html">Mat44</a> rotation = <a class="code hl_function" href="class_mat44.html#ac3109f2d950061c0b4de57e76a132634">Mat44::sRotation</a>(mRotation);</div>
- <div class="line"><a id="l00167" name="l00167"></a><span class="lineno"> 167</span> <span class="keywordflow">switch</span> (lowest_component)</div>
- <div class="line"><a id="l00168" name="l00168"></a><span class="lineno"> 168</span> {</div>
- <div class="line"><a id="l00169" name="l00169"></a><span class="lineno"> 169</span> <span class="keywordflow">case</span> 0:</div>
- <div class="line"><a id="l00170" name="l00170"></a><span class="lineno"> 170</span> outPoints[1] = mPosition + extent.<a class="code hl_function" href="class_vec3.html#aac08ebd63b9ab4fa089a5ed3224a8679">GetY</a>() * rotation.<a class="code hl_function" href="class_mat44.html#a4d34298d2040673cfd9b86c5cb83a5b9">GetColumn3</a>(1);</div>
- <div class="line"><a id="l00171" name="l00171"></a><span class="lineno"> 171</span> outPoints[2] = mPosition + extent.<a class="code hl_function" href="class_vec3.html#aeca36d050a7c2b41d3ac0438874d8c60">GetZ</a>() * rotation.<a class="code hl_function" href="class_mat44.html#a4d34298d2040673cfd9b86c5cb83a5b9">GetColumn3</a>(2);</div>
- <div class="line"><a id="l00172" name="l00172"></a><span class="lineno"> 172</span> <span class="keywordflow">break</span>;</div>
- <div class="line"><a id="l00173" name="l00173"></a><span class="lineno"> 173</span> </div>
- <div class="line"><a id="l00174" name="l00174"></a><span class="lineno"> 174</span> <span class="keywordflow">case</span> 1:</div>
- <div class="line"><a id="l00175" name="l00175"></a><span class="lineno"> 175</span> outPoints[1] = mPosition + extent.<a class="code hl_function" href="class_vec3.html#a284e29f161ae7709a934f402bd2a848c">GetX</a>() * rotation.<a class="code hl_function" href="class_mat44.html#a4d34298d2040673cfd9b86c5cb83a5b9">GetColumn3</a>(0);</div>
- <div class="line"><a id="l00176" name="l00176"></a><span class="lineno"> 176</span> outPoints[2] = mPosition + extent.<a class="code hl_function" href="class_vec3.html#aeca36d050a7c2b41d3ac0438874d8c60">GetZ</a>() * rotation.<a class="code hl_function" href="class_mat44.html#a4d34298d2040673cfd9b86c5cb83a5b9">GetColumn3</a>(2);</div>
- <div class="line"><a id="l00177" name="l00177"></a><span class="lineno"> 177</span> <span class="keywordflow">break</span>;</div>
- <div class="line"><a id="l00178" name="l00178"></a><span class="lineno"> 178</span> </div>
- <div class="line"><a id="l00179" name="l00179"></a><span class="lineno"> 179</span> <span class="keywordflow">case</span> 2:</div>
- <div class="line"><a id="l00180" name="l00180"></a><span class="lineno"> 180</span> outPoints[1] = mPosition + extent.<a class="code hl_function" href="class_vec3.html#a284e29f161ae7709a934f402bd2a848c">GetX</a>() * rotation.<a class="code hl_function" href="class_mat44.html#a4d34298d2040673cfd9b86c5cb83a5b9">GetColumn3</a>(0);</div>
- <div class="line"><a id="l00181" name="l00181"></a><span class="lineno"> 181</span> outPoints[2] = mPosition + extent.<a class="code hl_function" href="class_vec3.html#aac08ebd63b9ab4fa089a5ed3224a8679">GetY</a>() * rotation.<a class="code hl_function" href="class_mat44.html#a4d34298d2040673cfd9b86c5cb83a5b9">GetColumn3</a>(1);</div>
- <div class="line"><a id="l00182" name="l00182"></a><span class="lineno"> 182</span> <span class="keywordflow">break</span>;</div>
- <div class="line"><a id="l00183" name="l00183"></a><span class="lineno"> 183</span> </div>
- <div class="line"><a id="l00184" name="l00184"></a><span class="lineno"> 184</span> <span class="keywordflow">default</span>:</div>
- <div class="line"><a id="l00185" name="l00185"></a><span class="lineno"> 185</span> <a class="code hl_define" href="_issue_reporting_8h.html#aaf6b1df827e11b7ca5f6f8778bd8f8cd">JPH_ASSERT</a>(<span class="keyword">false</span>);</div>
- <div class="line"><a id="l00186" name="l00186"></a><span class="lineno"> 186</span> <span class="keywordflow">break</span>;</div>
- <div class="line"><a id="l00187" name="l00187"></a><span class="lineno"> 187</span> }</div>
- <div class="line"><a id="l00188" name="l00188"></a><span class="lineno"> 188</span>}</div>
- <div class="line"><a id="l00189" name="l00189"></a><span class="lineno"> 189</span> </div>
- <div class="foldopen" id="foldopen00190" data-start="{" data-end="}">
- <div class="line"><a id="l00190" name="l00190"></a><span class="lineno"><a class="line" href="class_body.html#a95efc4cbe40bfab41c74b2add880fa04"> 190</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="class_body.html#a95efc4cbe40bfab41c74b2add880fa04">Body::ResetSleepTimer</a>()</div>
- <div class="line"><a id="l00191" name="l00191"></a><span class="lineno"> 191</span>{</div>
- <div class="line"><a id="l00192" name="l00192"></a><span class="lineno"> 192</span> <a class="code hl_class" href="class_vec3.html">RVec3</a> points[3];</div>
- <div class="line"><a id="l00193" name="l00193"></a><span class="lineno"> 193</span> GetSleepTestPoints(points);</div>
- <div class="line"><a id="l00194" name="l00194"></a><span class="lineno"> 194</span> mMotionProperties-><a class="code hl_function" href="class_motion_properties.html#aad3b333b7af3e3b39be95edf9b69d133">ResetSleepTestSpheres</a>(points);</div>
- <div class="line"><a id="l00195" name="l00195"></a><span class="lineno"> 195</span>}</div>
- </div>
- <div class="line"><a id="l00196" name="l00196"></a><span class="lineno"> 196</span> </div>
- <div class="line"><a id="l00197" name="l00197"></a><span class="lineno"> 197</span><a class="code hl_define" href="_core_8h.html#a73da8725998b00321a9db341202d650d">JPH_NAMESPACE_END</a></div>
- <div class="ttc" id="a_core_8h_html_a73da8725998b00321a9db341202d650d"><div class="ttname"><a href="_core_8h.html#a73da8725998b00321a9db341202d650d">JPH_NAMESPACE_END</a></div><div class="ttdeci">#define JPH_NAMESPACE_END</div><div class="ttdef"><b>Definition</b> Core.h:425</div></div>
- <div class="ttc" id="a_core_8h_html_a8f95e75e58492e87412191fabadd8ca8"><div class="ttname"><a href="_core_8h.html#a8f95e75e58492e87412191fabadd8ca8">uint32</a></div><div class="ttdeci">std::uint32_t uint32</div><div class="ttdef"><b>Definition</b> Core.h:503</div></div>
- <div class="ttc" id="a_core_8h_html_ad14098b68b8c44ea6112601031268405"><div class="ttname"><a href="_core_8h.html#ad14098b68b8c44ea6112601031268405">JPH_NAMESPACE_BEGIN</a></div><div class="ttdeci">#define JPH_NAMESPACE_BEGIN</div><div class="ttdef"><b>Definition</b> Core.h:419</div></div>
- <div class="ttc" id="a_issue_reporting_8h_html_aaf6b1df827e11b7ca5f6f8778bd8f8cd"><div class="ttname"><a href="_issue_reporting_8h.html#aaf6b1df827e11b7ca5f6f8778bd8f8cd">JPH_ASSERT</a></div><div class="ttdeci">#define JPH_ASSERT(...)</div><div class="ttdef"><b>Definition</b> IssueReporting.h:33</div></div>
- <div class="ttc" id="aclass_a_a_box_html_a094a8548424826014024349fd7b96766"><div class="ttname"><a href="class_a_a_box.html#a094a8548424826014024349fd7b96766">AABox::GetExtent</a></div><div class="ttdeci">Vec3 GetExtent() const</div><div class="ttdoc">Get extent of bounding box (half of the size)</div><div class="ttdef"><b>Definition</b> AABox.h:120</div></div>
- <div class="ttc" id="aclass_body_html"><div class="ttname"><a href="class_body.html">Body</a></div><div class="ttdef"><b>Definition</b> Body.h:39</div></div>
- <div class="ttc" id="aclass_body_html_a0d39987255227c4221fcea66cb1fc041"><div class="ttname"><a href="class_body.html#a0d39987255227c4221fcea66cb1fc041">Body::GetMotionProperties</a></div><div class="ttdeci">const MotionProperties * GetMotionProperties() const</div><div class="ttdoc">Access to the motion properties.</div><div class="ttdef"><b>Definition</b> Body.h:308</div></div>
- <div class="ttc" id="aclass_body_html_a12422310c7aa9ec72e2376d08fbee6b5"><div class="ttname"><a href="class_body.html#a12422310c7aa9ec72e2376d08fbee6b5">Body::GetWorldSpaceSurfaceNormal</a></div><div class="ttdeci">Vec3 GetWorldSpaceSurfaceNormal(const SubShapeID &inSubShapeID, RVec3Arg inPosition) const</div><div class="ttdoc">Get surface normal of a particular sub shape and its world space surface position on this body.</div><div class="ttdef"><b>Definition</b> Body.inl:114</div></div>
- <div class="ttc" id="aclass_body_html_a1b21c30907c8c9ce30c176a054057bef"><div class="ttname"><a href="class_body.html#a1b21c30907c8c9ce30c176a054057bef">Body::IsDynamic</a></div><div class="ttdeci">bool IsDynamic() const</div><div class="ttdoc">Check if this body is dynamic, which means that it moves and forces can act on it.</div><div class="ttdef"><b>Definition</b> Body.h:67</div></div>
- <div class="ttc" id="aclass_body_html_a251e1c9d8c9c7e40ddabc73420ac9ab1"><div class="ttname"><a href="class_body.html#a251e1c9d8c9c7e40ddabc73420ac9ab1">Body::IsSensor</a></div><div class="ttdeci">bool IsSensor() const</div><div class="ttdoc">Check if this body is a sensor.</div><div class="ttdef"><b>Definition</b> Body.h:80</div></div>
- <div class="ttc" id="aclass_body_html_a3385650a73d75c7d9c16d13ea2d5519f"><div class="ttname"><a href="class_body.html#a3385650a73d75c7d9c16d13ea2d5519f">Body::AddRotationStep</a></div><div class="ttdeci">void AddRotationStep(Vec3Arg inAngularVelocityTimesDeltaTime)</div><div class="ttdoc">Update rotation using an Euler step (used during position integrate & constraint solving)</div><div class="ttdef"><b>Definition</b> Body.inl:81</div></div>
- <div class="ttc" id="aclass_body_html_a454781f1340576ad7f752b51dd8a179d"><div class="ttname"><a href="class_body.html#a454781f1340576ad7f752b51dd8a179d">Body::IsSoftBody</a></div><div class="ttdeci">bool IsSoftBody() const</div><div class="ttdoc">Check if this body is a soft body.</div><div class="ttdef"><b>Definition</b> Body.h:53</div></div>
- <div class="ttc" id="aclass_body_html_a4bab5d07f84d5a9d38119a1923298b5c"><div class="ttname"><a href="class_body.html#a4bab5d07f84d5a9d38119a1923298b5c">Body::GetWorldTransform</a></div><div class="ttdeci">RMat44 GetWorldTransform() const</div><div class="ttdoc">Calculates the transform of this body.</div><div class="ttdef"><b>Definition</b> Body.inl:9</div></div>
- <div class="ttc" id="aclass_body_html_a5865492b92c7c2e321c6916e80f5b7cb"><div class="ttname"><a href="class_body.html#a5865492b92c7c2e321c6916e80f5b7cb">Body::GetCollisionGroup</a></div><div class="ttdeci">const CollisionGroup & GetCollisionGroup() const</div><div class="ttdoc">Collision group and sub-group ID, determines which other objects it collides with.</div><div class="ttdef"><b>Definition</b> Body.h:130</div></div>
- <div class="ttc" id="aclass_body_html_a5e1e46dac04eaf5fbaed87d6d781480d"><div class="ttname"><a href="class_body.html#a5e1e46dac04eaf5fbaed87d6d781480d">Body::SetLinearVelocityClamped</a></div><div class="ttdeci">void SetLinearVelocityClamped(Vec3Arg inLinearVelocity)</div><div class="ttdef"><b>Definition</b> Body.h:158</div></div>
- <div class="ttc" id="aclass_body_html_a5ffba4cea6db6696fff3db87999bdf42"><div class="ttname"><a href="class_body.html#a5ffba4cea6db6696fff3db87999bdf42">Body::GetIndexInActiveBodiesInternal</a></div><div class="ttdeci">JPH_TSAN_NO_SANITIZE uint32 GetIndexInActiveBodiesInternal() const</div><div class="ttdoc">Access to the index in the BodyManager::mActiveBodies list.</div><div class="ttdef"><b>Definition</b> Body.h:380</div></div>
- <div class="ttc" id="aclass_body_html_a636e301ffa9150e9df74895863394ee4"><div class="ttname"><a href="class_body.html#a636e301ffa9150e9df74895863394ee4">Body::cInactiveIndex</a></div><div class="ttdeci">static constexpr uint32 cInactiveIndex</div><div class="ttdoc">Constant indicating that body is not active.</div><div class="ttdef"><b>Definition</b> Body.h:393</div></div>
- <div class="ttc" id="aclass_body_html_a68c64581b2698ec41f1bbb50913bb48d"><div class="ttname"><a href="class_body.html#a68c64581b2698ec41f1bbb50913bb48d">Body::sFindCollidingPairsCanCollide</a></div><div class="ttdeci">static bool sFindCollidingPairsCanCollide(const Body &inBody1, const Body &inBody2)</div><div class="ttdef"><b>Definition</b> Body.inl:30</div></div>
- <div class="ttc" id="aclass_body_html_a731f2a92e9e215ff87efc831999e0e6e"><div class="ttname"><a href="class_body.html#a731f2a92e9e215ff87efc831999e0e6e">Body::GetInverseInertia</a></div><div class="ttdeci">Mat44 GetInverseInertia() const</div><div class="ttdoc">Get inverse inertia tensor in world space.</div><div class="ttdef"><b>Definition</b> Body.inl:120</div></div>
- <div class="ttc" id="aclass_body_html_a8365154663e94343e1045893ee3b4c16"><div class="ttname"><a href="class_body.html#a8365154663e94343e1045893ee3b4c16">Body::IsRigidBody</a></div><div class="ttdeci">bool IsRigidBody() const</div><div class="ttdoc">Check if this body is a rigid body.</div><div class="ttdef"><b>Definition</b> Body.h:50</div></div>
- <div class="ttc" id="aclass_body_html_a83748a3d5a5b0a5b0242ba91875b8e13"><div class="ttname"><a href="class_body.html#a83748a3d5a5b0a5b0242ba91875b8e13">Body::IsStatic</a></div><div class="ttdeci">bool IsStatic() const</div><div class="ttdoc">Check if this body is static (not movable)</div><div class="ttdef"><b>Definition</b> Body.h:61</div></div>
- <div class="ttc" id="aclass_body_html_a8bb48012c114b300a9bfdd296cfe0546"><div class="ttname"><a href="class_body.html#a8bb48012c114b300a9bfdd296cfe0546">Body::GetCollideKinematicVsNonDynamic</a></div><div class="ttdeci">bool GetCollideKinematicVsNonDynamic() const</div><div class="ttdoc">Check if kinematic objects can generate contact points against other kinematic or static objects.</div><div class="ttdef"><b>Definition</b> Body.h:88</div></div>
- <div class="ttc" id="aclass_body_html_a9033b203f8511c35dca0dfc8ca1c25ca"><div class="ttname"><a href="class_body.html#a9033b203f8511c35dca0dfc8ca1c25ca">Body::SetAngularVelocityClamped</a></div><div class="ttdeci">void SetAngularVelocityClamped(Vec3Arg inAngularVelocity)</div><div class="ttdef"><b>Definition</b> Body.h:169</div></div>
- <div class="ttc" id="aclass_body_html_a9431bfa66a018714074fe149c7a65ac5"><div class="ttname"><a href="class_body.html#a9431bfa66a018714074fe149c7a65ac5">Body::GetCenterOfMassTransform</a></div><div class="ttdeci">RMat44 GetCenterOfMassTransform() const</div><div class="ttdoc">Calculates the transform for this body's center of mass.</div><div class="ttdef"><b>Definition</b> Body.inl:16</div></div>
- <div class="ttc" id="aclass_body_html_a95efc4cbe40bfab41c74b2add880fa04"><div class="ttname"><a href="class_body.html#a95efc4cbe40bfab41c74b2add880fa04">Body::ResetSleepTimer</a></div><div class="ttdeci">void ResetSleepTimer()</div><div class="ttdoc">Resets the sleep timer. This does not wake up the body if it is sleeping, but allows resetting the sy...</div><div class="ttdef"><b>Definition</b> Body.inl:190</div></div>
- <div class="ttc" id="aclass_body_html_a9c317394889f2064a20693935036eeb3"><div class="ttname"><a href="class_body.html#a9c317394889f2064a20693935036eeb3">Body::GetInverseCenterOfMassTransform</a></div><div class="ttdeci">RMat44 GetInverseCenterOfMassTransform() const</div><div class="ttdoc">Calculates the inverse of the transform for this body's center of mass.</div><div class="ttdef"><b>Definition</b> Body.inl:23</div></div>
- <div class="ttc" id="aclass_body_html_aa797042eec783ed27333f529b66221a3"><div class="ttname"><a href="class_body.html#aa797042eec783ed27333f529b66221a3">Body::AddAngularImpulse</a></div><div class="ttdeci">void AddAngularImpulse(Vec3Arg inAngularImpulse)</div><div class="ttdef"><b>Definition</b> Body.inl:149</div></div>
- <div class="ttc" id="aclass_body_html_ab0df53d82e3a8356fac91d178b30c369"><div class="ttname"><a href="class_body.html#ab0df53d82e3a8356fac91d178b30c369">Body::SubRotationStep</a></div><div class="ttdeci">void SubRotationStep(Vec3Arg inAngularVelocityTimesDeltaTime)</div><div class="ttdef"><b>Definition</b> Body.inl:100</div></div>
- <div class="ttc" id="aclass_body_html_ab49045bc1738e110dea9cbc020528338"><div class="ttname"><a href="class_body.html#ab49045bc1738e110dea9cbc020528338">Body::IsKinematic</a></div><div class="ttdeci">bool IsKinematic() const</div><div class="ttdoc">Check if this body is kinematic (keyframed), which means that it will move according to its current v...</div><div class="ttdef"><b>Definition</b> Body.h:64</div></div>
- <div class="ttc" id="aclass_body_html_acbcb599679bb6a330a7ea3427fe90604"><div class="ttname"><a href="class_body.html#acbcb599679bb6a330a7ea3427fe90604">Body::GetID</a></div><div class="ttdeci">JPH_OVERRIDE_NEW_DELETE const BodyID & GetID() const</div><div class="ttdoc">Get the id of this body.</div><div class="ttdef"><b>Definition</b> Body.h:44</div></div>
- <div class="ttc" id="aclass_body_html_add8352d484a2805f114400159151185b"><div class="ttname"><a href="class_body.html#add8352d484a2805f114400159151185b">Body::AddForce</a></div><div class="ttdeci">void AddForce(Vec3Arg inForce)</div><div class="ttdef"><b>Definition</b> Body.h:179</div></div>
- <div class="ttc" id="aclass_body_html_aec30d437f934327d261e8ebdc23a2c8c"><div class="ttname"><a href="class_body.html#aec30d437f934327d261e8ebdc23a2c8c">Body::AddTorque</a></div><div class="ttdeci">void AddTorque(Vec3Arg inTorque)</div><div class="ttdef"><b>Definition</b> Body.h:187</div></div>
- <div class="ttc" id="aclass_body_html_af4e42e6ae915ca4fcaee1c988eeba0f7"><div class="ttname"><a href="class_body.html#af4e42e6ae915ca4fcaee1c988eeba0f7">Body::AddImpulse</a></div><div class="ttdeci">void AddImpulse(Vec3Arg inImpulse)</div><div class="ttdef"><b>Definition</b> Body.inl:133</div></div>
- <div class="ttc" id="aclass_collision_group_html_aa7e60aa0b9f6e5563ab4ca690c8e2b56"><div class="ttname"><a href="class_collision_group.html#aa7e60aa0b9f6e5563ab4ca690c8e2b56">CollisionGroup::CanCollide</a></div><div class="ttdeci">bool CanCollide(const CollisionGroup &inOther) const</div><div class="ttdoc">Check if this object collides with another object.</div><div class="ttdef"><b>Definition</b> CollisionGroup.h:71</div></div>
- <div class="ttc" id="aclass_mat44_html"><div class="ttname"><a href="class_mat44.html">Mat44</a></div><div class="ttdoc">Holds a 4x4 matrix of floats, but supports also operations on the 3x3 upper left part of the matrix.</div><div class="ttdef"><b>Definition</b> Mat44.h:13</div></div>
- <div class="ttc" id="aclass_mat44_html_a16f19b423139db52503bb8d6526d947f"><div class="ttname"><a href="class_mat44.html#a16f19b423139db52503bb8d6526d947f">Mat44::PreTranslated</a></div><div class="ttdeci">JPH_INLINE Mat44 PreTranslated(Vec3Arg inTranslation) const</div><div class="ttdoc">Pre multiply by translation matrix: result = this * Mat44::sTranslation(inTranslation)</div><div class="ttdef"><b>Definition</b> Mat44.inl:898</div></div>
- <div class="ttc" id="aclass_mat44_html_a3ed66bc4c5e8e010657bd5bb109f1406"><div class="ttname"><a href="class_mat44.html#a3ed66bc4c5e8e010657bd5bb109f1406">Mat44::Multiply3x3Transposed</a></div><div class="ttdeci">JPH_INLINE Vec3 Multiply3x3Transposed(Vec3Arg inV) const</div><div class="ttdoc">Multiply vector by only 3x3 part of the transpose of the matrix ( )</div><div class="ttdef"><b>Definition</b> Mat44.inl:336</div></div>
- <div class="ttc" id="aclass_mat44_html_a4d34298d2040673cfd9b86c5cb83a5b9"><div class="ttname"><a href="class_mat44.html#a4d34298d2040673cfd9b86c5cb83a5b9">Mat44::GetColumn3</a></div><div class="ttdeci">JPH_INLINE Vec3 GetColumn3(uint inCol) const</div><div class="ttdef"><b>Definition</b> Mat44.h:158</div></div>
- <div class="ttc" id="aclass_mat44_html_aba5427f45393b40263d52ec614cfa985"><div class="ttname"><a href="class_mat44.html#aba5427f45393b40263d52ec614cfa985">Mat44::sRotationTranslation</a></div><div class="ttdeci">static JPH_INLINE Mat44 sRotationTranslation(QuatArg inR, Vec3Arg inT)</div><div class="ttdoc">Get matrix that rotates and translates.</div><div class="ttdef"><b>Definition</b> Mat44.inl:149</div></div>
- <div class="ttc" id="aclass_mat44_html_ac3109f2d950061c0b4de57e76a132634"><div class="ttname"><a href="class_mat44.html#ac3109f2d950061c0b4de57e76a132634">Mat44::sRotation</a></div><div class="ttdeci">static JPH_INLINE Mat44 sRotation(Vec3Arg inAxis, float inAngle)</div><div class="ttdoc">Rotate around arbitrary axis.</div><div class="ttdef"><b>Definition</b> Mat44.inl:139</div></div>
- <div class="ttc" id="aclass_mat44_html_ac8be820a7eeb44bf570abb8dc01f4c59"><div class="ttname"><a href="class_mat44.html#ac8be820a7eeb44bf570abb8dc01f4c59">Mat44::sInverseRotationTranslation</a></div><div class="ttdeci">static JPH_INLINE Mat44 sInverseRotationTranslation(QuatArg inR, Vec3Arg inT)</div><div class="ttdoc">Get inverse matrix of sRotationTranslation.</div><div class="ttdef"><b>Definition</b> Mat44.inl:156</div></div>
- <div class="ttc" id="aclass_motion_properties_html_a6478c1ccabfc23ee9ce98faa0643c080"><div class="ttname"><a href="class_motion_properties.html#a6478c1ccabfc23ee9ce98faa0643c080">MotionProperties::GetLinearVelocity</a></div><div class="ttdeci">Vec3 GetLinearVelocity() const</div><div class="ttdoc">Get world space linear velocity of the center of mass.</div><div class="ttdef"><b>Definition</b> MotionProperties.h:43</div></div>
- <div class="ttc" id="aclass_motion_properties_html_a66348339a05a43b730e1591273aace18"><div class="ttname"><a href="class_motion_properties.html#a66348339a05a43b730e1591273aace18">MotionProperties::GetAngularVelocity</a></div><div class="ttdeci">Vec3 GetAngularVelocity() const</div><div class="ttdoc">Get world space angular velocity of the center of mass.</div><div class="ttdef"><b>Definition</b> MotionProperties.h:52</div></div>
- <div class="ttc" id="aclass_motion_properties_html_a8a959bd2f7d8eb581d999e3b01920aa8"><div class="ttname"><a href="class_motion_properties.html#a8a959bd2f7d8eb581d999e3b01920aa8">MotionProperties::GetInverseMass</a></div><div class="ttdeci">float GetInverseMass() const</div><div class="ttdoc">Get inverse mass (1 / mass). Should only be called on a dynamic object (static or kinematic bodies ha...</div><div class="ttdef"><b>Definition</b> MotionProperties.h:95</div></div>
- <div class="ttc" id="aclass_motion_properties_html_aa8a73ea7940a316151262ed9a28c4fbb"><div class="ttname"><a href="class_motion_properties.html#aa8a73ea7940a316151262ed9a28c4fbb">MotionProperties::MultiplyWorldSpaceInverseInertiaByVector</a></div><div class="ttdeci">JPH_INLINE Vec3 MultiplyWorldSpaceInverseInertiaByVector(QuatArg inBodyRotation, Vec3Arg inV) const</div><div class="ttdoc">Multiply a vector with the inverse world space inertia tensor ( ). Zero if object is static or kinema...</div><div class="ttdef"><b>Definition</b> MotionProperties.inl:86</div></div>
- <div class="ttc" id="aclass_motion_properties_html_aad3b333b7af3e3b39be95edf9b69d133"><div class="ttname"><a href="class_motion_properties.html#aad3b333b7af3e3b39be95edf9b69d133">MotionProperties::ResetSleepTestSpheres</a></div><div class="ttdeci">void ResetSleepTestSpheres(const RVec3 *inPoints)</div><div class="ttdoc">Reset spheres to center around inPoints with radius 0.</div><div class="ttdef"><b>Definition</b> MotionProperties.inl:154</div></div>
- <div class="ttc" id="aclass_motion_properties_html_ab95f2b1c9b6bd9b6082f8cee8a7e1858"><div class="ttname"><a href="class_motion_properties.html#ab95f2b1c9b6bd9b6082f8cee8a7e1858">MotionProperties::GetInverseInertiaForRotation</a></div><div class="ttdeci">Mat44 GetInverseInertiaForRotation(Mat44Arg inRotation) const</div><div class="ttdoc">Get inverse inertia matrix ( ) for a given object rotation (translation will be ignored)....</div><div class="ttdef"><b>Definition</b> MotionProperties.inl:69</div></div>
- <div class="ttc" id="aclass_quat_html_a3ac594bf7be610138e90735ae99ff8e9"><div class="ttname"><a href="class_quat.html#a3ac594bf7be610138e90735ae99ff8e9">Quat::sRotation</a></div><div class="ttdeci">static JPH_INLINE Quat sRotation(Vec3Arg inAxis, float inAngle)</div><div class="ttdoc">Rotation from axis and angle.</div><div class="ttdef"><b>Definition</b> Quat.inl:128</div></div>
- <div class="ttc" id="aclass_quat_html_a62b95b1c1d36ecbd6f9732ca4789a7bf"><div class="ttname"><a href="class_quat.html#a62b95b1c1d36ecbd6f9732ca4789a7bf">Quat::IsNaN</a></div><div class="ttdeci">bool IsNaN() const</div><div class="ttdoc">If any component of this quaternion is a NaN (not a number)</div><div class="ttdef"><b>Definition</b> Quat.h:63</div></div>
- <div class="ttc" id="aclass_shape_html_a30ea165596e01df087f6e4980ed6b0cb"><div class="ttname"><a href="class_shape.html#a30ea165596e01df087f6e4980ed6b0cb">Shape::GetLocalBounds</a></div><div class="ttdeci">virtual AABox GetLocalBounds() const =0</div><div class="ttdoc">Get local bounding box including convex radius, this box is centered around the center of mass rather...</div></div>
- <div class="ttc" id="aclass_shape_html_a7e34b0626a40c31db0b2a761922adb1a"><div class="ttname"><a href="class_shape.html#a7e34b0626a40c31db0b2a761922adb1a">Shape::GetCenterOfMass</a></div><div class="ttdeci">virtual Vec3 GetCenterOfMass() const</div><div class="ttdoc">All shapes are centered around their center of mass. This function returns the center of mass positio...</div><div class="ttdef"><b>Definition</b> Shape.h:211</div></div>
- <div class="ttc" id="aclass_shape_html_adc7c6aeed1cde2ae1be099a4a5a4bd0c"><div class="ttname"><a href="class_shape.html#adc7c6aeed1cde2ae1be099a4a5a4bd0c">Shape::GetSurfaceNormal</a></div><div class="ttdeci">virtual Vec3 GetSurfaceNormal(const SubShapeID &inSubShapeID, Vec3Arg inLocalSurfacePosition) const =0</div></div>
- <div class="ttc" id="aclass_sub_shape_i_d_html"><div class="ttname"><a href="class_sub_shape_i_d.html">SubShapeID</a></div><div class="ttdoc">A sub shape id contains a path to an element (usually a triangle or other primitive type) of a compou...</div><div class="ttdef"><b>Definition</b> SubShapeID.h:23</div></div>
- <div class="ttc" id="aclass_vec3_html"><div class="ttname"><a href="class_vec3.html">Vec3</a></div><div class="ttdef"><b>Definition</b> Vec3.h:17</div></div>
- <div class="ttc" id="aclass_vec3_html_a0f7559f2691ad67826f42ca19916b7a9"><div class="ttname"><a href="class_vec3.html#a0f7559f2691ad67826f42ca19916b7a9">Vec3::Normalized</a></div><div class="ttdeci">JPH_INLINE Vec3 Normalized() const</div><div class="ttdoc">Normalize vector.</div><div class="ttdef"><b>Definition</b> Vec3.inl:707</div></div>
- <div class="ttc" id="aclass_vec3_html_a284e29f161ae7709a934f402bd2a848c"><div class="ttname"><a href="class_vec3.html#a284e29f161ae7709a934f402bd2a848c">Vec3::GetX</a></div><div class="ttdeci">JPH_INLINE float GetX() const</div><div class="ttdoc">Get individual components.</div><div class="ttdef"><b>Definition</b> Vec3.h:127</div></div>
- <div class="ttc" id="aclass_vec3_html_a38a9efffc3f9413f3dd702abc73eb9a2"><div class="ttname"><a href="class_vec3.html#a38a9efffc3f9413f3dd702abc73eb9a2">Vec3::Length</a></div><div class="ttdeci">JPH_INLINE float Length() const</div><div class="ttdoc">Length of vector.</div><div class="ttdef"><b>Definition</b> Vec3.inl:682</div></div>
- <div class="ttc" id="aclass_vec3_html_a502453ae3005d5b84a221adf80721f92"><div class="ttname"><a href="class_vec3.html#a502453ae3005d5b84a221adf80721f92">Vec3::GetLowestComponentIndex</a></div><div class="ttdeci">JPH_INLINE int GetLowestComponentIndex() const</div><div class="ttdoc">Get index of component with lowest value.</div><div class="ttdef"><b>Definition</b> Vec3.inl:567</div></div>
- <div class="ttc" id="aclass_vec3_html_aac08ebd63b9ab4fa089a5ed3224a8679"><div class="ttname"><a href="class_vec3.html#aac08ebd63b9ab4fa089a5ed3224a8679">Vec3::GetY</a></div><div class="ttdeci">JPH_INLINE float GetY() const</div><div class="ttdef"><b>Definition</b> Vec3.h:128</div></div>
- <div class="ttc" id="aclass_vec3_html_aeca36d050a7c2b41d3ac0438874d8c60"><div class="ttname"><a href="class_vec3.html#aeca36d050a7c2b41d3ac0438874d8c60">Vec3::GetZ</a></div><div class="ttdeci">JPH_INLINE float GetZ() const</div><div class="ttdef"><b>Definition</b> Vec3.h:129</div></div>
- </div><!-- fragment --></div><!-- contents -->
- </div><!-- doc-content -->
- <!-- start footer part -->
- <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
- <ul>
- <li class="navelem"><a class="el" href="dir_d99289a5d3c46cf26f14ff6c90658d9f.html">Jolt</a></li><li class="navelem"><a class="el" href="dir_a0f33af92addde396fc27b064c5eb8a9.html">Physics</a></li><li class="navelem"><a class="el" href="dir_a240ac3d525f21f79994f1dc1d19664e.html">Body</a></li><li class="navelem"><a class="el" href="_body_8inl.html">Body.inl</a></li>
- <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>
- </ul>
- </div>
- </body>
- </html>
|