| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381 |
- <!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/MotionProperties.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('_motion_properties_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">MotionProperties.inl</div></div>
- </div><!--header-->
- <div class="contents">
- <a href="_motion_properties_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_motion_properties.html#afc2471d63f11da6c88141a1adedf6149"> 9</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="class_motion_properties.html#afc2471d63f11da6c88141a1adedf6149">MotionProperties::MoveKinematic</a>(<a class="code hl_class" href="class_vec3.html">Vec3Arg</a> inDeltaPosition, <a class="code hl_class" href="class_quat.html">QuatArg</a> inDeltaRotation, <span class="keywordtype">float</span> inDeltaTime)</div>
- <div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</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::sVelocityAccess(), BodyAccess::EAccess::ReadWrite));</div>
- <div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</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="l00013" name="l00013"></a><span class="lineno"> 13</span> <a class="code hl_define" href="_issue_reporting_8h.html#aaf6b1df827e11b7ca5f6f8778bd8f8cd">JPH_ASSERT</a>(mCachedBodyType == <a class="code hl_enumvalue" href="_body_type_8h.html#ab494e27db6c263f9e31556ad388eb666a81db01c2775d4446d91c2caba27c53e8">EBodyType::RigidBody</a>);</div>
- <div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span> <a class="code hl_define" href="_issue_reporting_8h.html#aaf6b1df827e11b7ca5f6f8778bd8f8cd">JPH_ASSERT</a>(mCachedMotionType != <a class="code hl_enumvalue" href="_motion_type_8h.html#a328245ddbb758681fad3c44c9d488fd8a84a8921b25f505d0d2077aeb5db4bc16">EMotionType::Static</a>);</div>
- <div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span> </div>
- <div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span> <span class="comment">// Calculate required linear velocity</span></div>
- <div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span> mLinearVelocity = <a class="code hl_function" href="class_motion_properties.html#ab7168117a82829c137798ff843900104">LockTranslation</a>(inDeltaPosition / inDeltaTime);</div>
- <div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span> </div>
- <div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> <span class="comment">// Calculate required angular velocity</span></div>
- <div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> <a class="code hl_class" href="class_vec3.html">Vec3</a> axis;</div>
- <div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> <span class="keywordtype">float</span> angle;</div>
- <div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> inDeltaRotation.<a class="code hl_function" href="class_quat.html#a618a8eb64122263b8c64109f03ac47b5">GetAxisAngle</a>(axis, angle);</div>
- <div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> mAngularVelocity = <a class="code hl_function" href="class_motion_properties.html#a6bfec52a7ff3345d6fefd3f84faf6be7">LockAngular</a>(axis * (angle / inDeltaTime));</div>
- <div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span>}</div>
- </div>
- <div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> </div>
- <div class="foldopen" id="foldopen00026" data-start="{" data-end="}">
- <div class="line"><a id="l00026" name="l00026"></a><span class="lineno"><a class="line" href="class_motion_properties.html#a2cc70977a90ef8a3bed8a60902f3c2db"> 26</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="class_motion_properties.html#a2cc70977a90ef8a3bed8a60902f3c2db">MotionProperties::ClampLinearVelocity</a>()</div>
- <div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span>{</div>
- <div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> <a class="code hl_define" href="_issue_reporting_8h.html#aaf6b1df827e11b7ca5f6f8778bd8f8cd">JPH_ASSERT</a>(BodyAccess::sCheckRights(BodyAccess::sVelocityAccess(), BodyAccess::EAccess::ReadWrite));</div>
- <div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> </div>
- <div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> <span class="keywordtype">float</span> len_sq = mLinearVelocity.<a class="code hl_function" href="class_vec3.html#aba501a6a474028084799f871c9083dc1">LengthSq</a>();</div>
- <div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> <a class="code hl_define" href="_issue_reporting_8h.html#aaf6b1df827e11b7ca5f6f8778bd8f8cd">JPH_ASSERT</a>(isfinite(len_sq));</div>
- <div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> <span class="keywordflow">if</span> (len_sq > <a class="code hl_function" href="_math_8h.html#a61379b8b743a16fe823daeebc1482570">Square</a>(mMaxLinearVelocity))</div>
- <div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> mLinearVelocity *= mMaxLinearVelocity / sqrt(len_sq);</div>
- <div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span>}</div>
- </div>
- <div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> </div>
- <div class="foldopen" id="foldopen00036" data-start="{" data-end="}">
- <div class="line"><a id="l00036" name="l00036"></a><span class="lineno"><a class="line" href="class_motion_properties.html#a098c27b3679ec968b9400a64c53f90c9"> 36</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="class_motion_properties.html#a098c27b3679ec968b9400a64c53f90c9">MotionProperties::ClampAngularVelocity</a>()</div>
- <div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span>{</div>
- <div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> <a class="code hl_define" href="_issue_reporting_8h.html#aaf6b1df827e11b7ca5f6f8778bd8f8cd">JPH_ASSERT</a>(BodyAccess::sCheckRights(BodyAccess::sVelocityAccess(), BodyAccess::EAccess::ReadWrite));</div>
- <div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> </div>
- <div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> <span class="keywordtype">float</span> len_sq = mAngularVelocity.<a class="code hl_function" href="class_vec3.html#aba501a6a474028084799f871c9083dc1">LengthSq</a>();</div>
- <div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> <a class="code hl_define" href="_issue_reporting_8h.html#aaf6b1df827e11b7ca5f6f8778bd8f8cd">JPH_ASSERT</a>(isfinite(len_sq));</div>
- <div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> <span class="keywordflow">if</span> (len_sq > <a class="code hl_function" href="_math_8h.html#a61379b8b743a16fe823daeebc1482570">Square</a>(mMaxAngularVelocity))</div>
- <div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> mAngularVelocity *= mMaxAngularVelocity / sqrt(len_sq);</div>
- <div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span>}</div>
- </div>
- <div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> </div>
- <div class="foldopen" id="foldopen00046" data-start="{" data-end="}">
- <div class="line"><a id="l00046" name="l00046"></a><span class="lineno"><a class="line" href="class_motion_properties.html#a994dad1b2bf71b0f0394bec77fcb9b8e"> 46</a></span><span class="keyword">inline</span> <a class="code hl_class" href="class_mat44.html">Mat44</a> <a class="code hl_function" href="class_motion_properties.html#a994dad1b2bf71b0f0394bec77fcb9b8e">MotionProperties::GetLocalSpaceInverseInertiaUnchecked</a>()<span class="keyword"> const</span></div>
- <div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span><span class="keyword"></span>{</div>
- <div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</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>(mInertiaRotation);</div>
- <div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> <a class="code hl_class" href="class_mat44.html">Mat44</a> rotation_mul_scale_transposed(mInvInertiaDiagonal.<a class="code hl_function" href="class_vec3.html#a1b03f087ce2755a85ccba4ba56f1e64b">SplatX</a>() * rotation.<a class="code hl_function" href="class_mat44.html#a97c469ed78611039f85415381a67f312">GetColumn4</a>(0), mInvInertiaDiagonal.<a class="code hl_function" href="class_vec3.html#aad5b4211a6d98be56362559eefd9b029">SplatY</a>() * rotation.<a class="code hl_function" href="class_mat44.html#a97c469ed78611039f85415381a67f312">GetColumn4</a>(1), mInvInertiaDiagonal.<a class="code hl_function" href="class_vec3.html#a81f4448e17219aafda0e3b886709d1f4">SplatZ</a>() * rotation.<a class="code hl_function" href="class_mat44.html#a97c469ed78611039f85415381a67f312">GetColumn4</a>(2), <a class="code hl_class" href="class_vec4.html">Vec4</a>(0, 0, 0, 1));</div>
- <div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> <span class="keywordflow">return</span> rotation.<a class="code hl_function" href="class_mat44.html#a595ae3cf26d9fb87761e20b6b35d3d10">Multiply3x3RightTransposed</a>(rotation_mul_scale_transposed);</div>
- <div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span>}</div>
- </div>
- <div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> </div>
- <div class="foldopen" id="foldopen00053" data-start="{" data-end="}">
- <div class="line"><a id="l00053" name="l00053"></a><span class="lineno"><a class="line" href="class_motion_properties.html#a0c437b5479bd58417b50be0da6b852f7"> 53</a></span><span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="class_motion_properties.html#a0c437b5479bd58417b50be0da6b852f7">MotionProperties::ScaleToMass</a>(<span class="keywordtype">float</span> inMass)</div>
- <div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span>{</div>
- <div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> <a class="code hl_define" href="_issue_reporting_8h.html#aaf6b1df827e11b7ca5f6f8778bd8f8cd">JPH_ASSERT</a>(mInvMass > 0.0f, <span class="stringliteral">"Body must have finite mass"</span>);</div>
- <div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> <a class="code hl_define" href="_issue_reporting_8h.html#aaf6b1df827e11b7ca5f6f8778bd8f8cd">JPH_ASSERT</a>(inMass > 0.0f, <span class="stringliteral">"New mass cannot be zero"</span>);</div>
- <div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> </div>
- <div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> <span class="keywordtype">float</span> new_inv_mass = 1.0f / inMass;</div>
- <div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> mInvInertiaDiagonal *= new_inv_mass / mInvMass;</div>
- <div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> mInvMass = new_inv_mass;</div>
- <div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span>}</div>
- </div>
- <div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> </div>
- <div class="foldopen" id="foldopen00063" data-start="{" data-end="}">
- <div class="line"><a id="l00063" name="l00063"></a><span class="lineno"><a class="line" href="class_motion_properties.html#ad52e9ac8d614918a8dc9c80f22b4847e"> 63</a></span><span class="keyword">inline</span> <a class="code hl_class" href="class_mat44.html">Mat44</a> <a class="code hl_function" href="class_motion_properties.html#ad52e9ac8d614918a8dc9c80f22b4847e">MotionProperties::GetLocalSpaceInverseInertia</a>()<span class="keyword"> const</span></div>
- <div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span><span class="keyword"></span>{</div>
- <div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> <a class="code hl_define" href="_issue_reporting_8h.html#aaf6b1df827e11b7ca5f6f8778bd8f8cd">JPH_ASSERT</a>(mCachedMotionType == <a class="code hl_enumvalue" href="_motion_type_8h.html#a328245ddbb758681fad3c44c9d488fd8a971fd8cc345d8bd9f92e9f7d88fdf20c">EMotionType::Dynamic</a>);</div>
- <div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> <span class="keywordflow">return</span> <a class="code hl_function" href="class_motion_properties.html#a994dad1b2bf71b0f0394bec77fcb9b8e">GetLocalSpaceInverseInertiaUnchecked</a>();</div>
- <div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span>}</div>
- </div>
- <div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> </div>
- <div class="foldopen" id="foldopen00069" data-start="{" data-end="}">
- <div class="line"><a id="l00069" name="l00069"></a><span class="lineno"><a class="line" href="class_motion_properties.html#ab95f2b1c9b6bd9b6082f8cee8a7e1858"> 69</a></span><a class="code hl_class" href="class_mat44.html">Mat44</a> <a class="code hl_function" href="class_motion_properties.html#ab95f2b1c9b6bd9b6082f8cee8a7e1858">MotionProperties::GetInverseInertiaForRotation</a>(<a class="code hl_class" href="class_mat44.html">Mat44Arg</a> inRotation)<span class="keyword"> const</span></div>
- <div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span><span class="keyword"></span>{</div>
- <div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> <a class="code hl_define" href="_issue_reporting_8h.html#aaf6b1df827e11b7ca5f6f8778bd8f8cd">JPH_ASSERT</a>(mCachedMotionType == <a class="code hl_enumvalue" href="_motion_type_8h.html#a328245ddbb758681fad3c44c9d488fd8a971fd8cc345d8bd9f92e9f7d88fdf20c">EMotionType::Dynamic</a>);</div>
- <div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> </div>
- <div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> <a class="code hl_class" href="class_mat44.html">Mat44</a> rotation = inRotation.<a class="code hl_function" href="class_mat44.html#ab599aaeab3e4b832f7f4097816650b14">Multiply3x3</a>(<a class="code hl_function" href="class_mat44.html#ac3109f2d950061c0b4de57e76a132634">Mat44::sRotation</a>(mInertiaRotation));</div>
- <div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> <a class="code hl_class" href="class_mat44.html">Mat44</a> rotation_mul_scale_transposed(mInvInertiaDiagonal.<a class="code hl_function" href="class_vec3.html#a1b03f087ce2755a85ccba4ba56f1e64b">SplatX</a>() * rotation.<a class="code hl_function" href="class_mat44.html#a97c469ed78611039f85415381a67f312">GetColumn4</a>(0), mInvInertiaDiagonal.<a class="code hl_function" href="class_vec3.html#aad5b4211a6d98be56362559eefd9b029">SplatY</a>() * rotation.<a class="code hl_function" href="class_mat44.html#a97c469ed78611039f85415381a67f312">GetColumn4</a>(1), mInvInertiaDiagonal.<a class="code hl_function" href="class_vec3.html#a81f4448e17219aafda0e3b886709d1f4">SplatZ</a>() * rotation.<a class="code hl_function" href="class_mat44.html#a97c469ed78611039f85415381a67f312">GetColumn4</a>(2), <a class="code hl_class" href="class_vec4.html">Vec4</a>(0, 0, 0, 1));</div>
- <div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> <a class="code hl_class" href="class_mat44.html">Mat44</a> inverse_inertia = rotation.<a class="code hl_function" href="class_mat44.html#a595ae3cf26d9fb87761e20b6b35d3d10">Multiply3x3RightTransposed</a>(rotation_mul_scale_transposed);</div>
- <div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> </div>
- <div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> <span class="comment">// We need to mask out both the rows and columns of DOFs that are not allowed</span></div>
- <div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> <a class="code hl_class" href="class_vec4.html">Vec4</a> angular_dofs_mask = <a class="code hl_function" href="class_motion_properties.html#ae0c08282aaf3b1a38cd958c32840e329">GetAngularDOFsMask</a>().<a class="code hl_function" href="class_u_vec4.html#af399ef91439555b5264eec1790537547">ReinterpretAsFloat</a>();</div>
- <div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> inverse_inertia.<a class="code hl_function" href="class_mat44.html#ace29aeaafa5bbff8a159105fee78e2d2">SetColumn4</a>(0, <a class="code hl_function" href="class_vec4.html#a1b0f06643e493c801cdd07a18ff8b2dd">Vec4::sAnd</a>(inverse_inertia.<a class="code hl_function" href="class_mat44.html#a97c469ed78611039f85415381a67f312">GetColumn4</a>(0), <a class="code hl_function" href="class_vec4.html#a1b0f06643e493c801cdd07a18ff8b2dd">Vec4::sAnd</a>(angular_dofs_mask, angular_dofs_mask.<a class="code hl_function" href="class_vec4.html#a02525e7f8473c93268058324115eeb02">SplatX</a>())));</div>
- <div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> inverse_inertia.<a class="code hl_function" href="class_mat44.html#ace29aeaafa5bbff8a159105fee78e2d2">SetColumn4</a>(1, <a class="code hl_function" href="class_vec4.html#a1b0f06643e493c801cdd07a18ff8b2dd">Vec4::sAnd</a>(inverse_inertia.<a class="code hl_function" href="class_mat44.html#a97c469ed78611039f85415381a67f312">GetColumn4</a>(1), <a class="code hl_function" href="class_vec4.html#a1b0f06643e493c801cdd07a18ff8b2dd">Vec4::sAnd</a>(angular_dofs_mask, angular_dofs_mask.<a class="code hl_function" href="class_vec4.html#a7ea3bcf62a6055b45527f720a51d0005">SplatY</a>())));</div>
- <div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> inverse_inertia.<a class="code hl_function" href="class_mat44.html#ace29aeaafa5bbff8a159105fee78e2d2">SetColumn4</a>(2, <a class="code hl_function" href="class_vec4.html#a1b0f06643e493c801cdd07a18ff8b2dd">Vec4::sAnd</a>(inverse_inertia.<a class="code hl_function" href="class_mat44.html#a97c469ed78611039f85415381a67f312">GetColumn4</a>(2), <a class="code hl_function" href="class_vec4.html#a1b0f06643e493c801cdd07a18ff8b2dd">Vec4::sAnd</a>(angular_dofs_mask, angular_dofs_mask.<a class="code hl_function" href="class_vec4.html#a8fcd8e6ed1b4cf308656cca7cf68d5ee">SplatZ</a>())));</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> <span class="keywordflow">return</span> inverse_inertia;</div>
- <div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span>}</div>
- </div>
- <div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> </div>
- <div class="foldopen" id="foldopen00086" data-start="{" data-end="}">
- <div class="line"><a id="l00086" name="l00086"></a><span class="lineno"><a class="line" href="class_motion_properties.html#aa8a73ea7940a316151262ed9a28c4fbb"> 86</a></span><a class="code hl_class" href="class_vec3.html">Vec3</a> <a class="code hl_function" href="class_motion_properties.html#aa8a73ea7940a316151262ed9a28c4fbb">MotionProperties::MultiplyWorldSpaceInverseInertiaByVector</a>(<a class="code hl_class" href="class_quat.html">QuatArg</a> inBodyRotation, <a class="code hl_class" href="class_vec3.html">Vec3Arg</a> inV)<span class="keyword"> const</span></div>
- <div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span><span class="keyword"></span>{</div>
- <div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> <a class="code hl_define" href="_issue_reporting_8h.html#aaf6b1df827e11b7ca5f6f8778bd8f8cd">JPH_ASSERT</a>(mCachedMotionType == <a class="code hl_enumvalue" href="_motion_type_8h.html#a328245ddbb758681fad3c44c9d488fd8a971fd8cc345d8bd9f92e9f7d88fdf20c">EMotionType::Dynamic</a>);</div>
- <div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> </div>
- <div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> <span class="comment">// Mask out columns of DOFs that are not allowed</span></div>
- <div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> <a class="code hl_class" href="class_vec3.html">Vec3</a> angular_dofs_mask = <a class="code hl_class" href="class_vec3.html">Vec3</a>(<a class="code hl_function" href="class_motion_properties.html#ae0c08282aaf3b1a38cd958c32840e329">GetAngularDOFsMask</a>().ReinterpretAsFloat());</div>
- <div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> <a class="code hl_class" href="class_vec3.html">Vec3</a> v = <a class="code hl_function" href="class_vec3.html#a96e892074ac7e8638cb70ede768f08a8">Vec3::sAnd</a>(inV, angular_dofs_mask);</div>
- <div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> </div>
- <div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> <span class="comment">// Multiply vector by inverse inertia</span></div>
- <div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</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>(inBodyRotation * mInertiaRotation);</div>
- <div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> <a class="code hl_class" href="class_vec3.html">Vec3</a> result = rotation.<a class="code hl_function" href="class_mat44.html#ab599aaeab3e4b832f7f4097816650b14">Multiply3x3</a>(mInvInertiaDiagonal * rotation.<a class="code hl_function" href="class_mat44.html#a3ed66bc4c5e8e010657bd5bb109f1406">Multiply3x3Transposed</a>(v));</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> <span class="comment">// Mask out rows of DOFs that are not allowed</span></div>
- <div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> <span class="keywordflow">return</span> <a class="code hl_function" href="class_vec3.html#a96e892074ac7e8638cb70ede768f08a8">Vec3::sAnd</a>(result, angular_dofs_mask);</div>
- <div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span>}</div>
- </div>
- <div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span> </div>
- <div class="foldopen" id="foldopen00102" data-start="{" data-end="}">
- <div class="line"><a id="l00102" name="l00102"></a><span class="lineno"><a class="line" href="class_motion_properties.html#a78c58cb27772068a0aa3cbe286ddaf0b"> 102</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="class_motion_properties.html#a78c58cb27772068a0aa3cbe286ddaf0b">MotionProperties::ApplyGyroscopicForceInternal</a>(<a class="code hl_class" href="class_quat.html">QuatArg</a> inBodyRotation, <span class="keywordtype">float</span> inDeltaTime)</div>
- <div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span>{</div>
- <div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> <a class="code hl_define" href="_issue_reporting_8h.html#aaf6b1df827e11b7ca5f6f8778bd8f8cd">JPH_ASSERT</a>(BodyAccess::sCheckRights(BodyAccess::sVelocityAccess(), BodyAccess::EAccess::ReadWrite));</div>
- <div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> <a class="code hl_define" href="_issue_reporting_8h.html#aaf6b1df827e11b7ca5f6f8778bd8f8cd">JPH_ASSERT</a>(mCachedBodyType == <a class="code hl_enumvalue" href="_body_type_8h.html#ab494e27db6c263f9e31556ad388eb666a81db01c2775d4446d91c2caba27c53e8">EBodyType::RigidBody</a>);</div>
- <div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> <a class="code hl_define" href="_issue_reporting_8h.html#aaf6b1df827e11b7ca5f6f8778bd8f8cd">JPH_ASSERT</a>(mCachedMotionType == <a class="code hl_enumvalue" href="_motion_type_8h.html#a328245ddbb758681fad3c44c9d488fd8a971fd8cc345d8bd9f92e9f7d88fdf20c">EMotionType::Dynamic</a>);</div>
- <div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> </div>
- <div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span> <span class="comment">// Calculate local space inertia tensor (a diagonal in local space)</span></div>
- <div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> <a class="code hl_class" href="class_u_vec4.html">UVec4</a> is_zero = <a class="code hl_function" href="class_vec3.html#acd0e4130c1b2863b203812f4922b3642">Vec3::sEquals</a>(mInvInertiaDiagonal, <a class="code hl_function" href="class_vec3.html#ad03c52ab27761bc1e64e33c47632ba51">Vec3::sZero</a>());</div>
- <div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span> <a class="code hl_class" href="class_vec3.html">Vec3</a> denominator = <a class="code hl_function" href="class_vec3.html#ae0f4ab3438fe6b9782010ef8212a6d69">Vec3::sSelect</a>(mInvInertiaDiagonal, <a class="code hl_function" href="class_vec3.html#a6bc0731860c69d4e3151981d2dc24e93">Vec3::sOne</a>(), is_zero);</div>
- <div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span> <a class="code hl_class" href="class_vec3.html">Vec3</a> nominator = <a class="code hl_function" href="class_vec3.html#ae0f4ab3438fe6b9782010ef8212a6d69">Vec3::sSelect</a>(<a class="code hl_function" href="class_vec3.html#a6bc0731860c69d4e3151981d2dc24e93">Vec3::sOne</a>(), <a class="code hl_function" href="class_vec3.html#ad03c52ab27761bc1e64e33c47632ba51">Vec3::sZero</a>(), is_zero);</div>
- <div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span> <a class="code hl_class" href="class_vec3.html">Vec3</a> local_inertia = nominator / denominator; <span class="comment">// Avoid dividing by zero, inertia in this axis will be zero</span></div>
- <div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span> </div>
- <div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span> <span class="comment">// Calculate local space angular momentum</span></div>
- <div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span> <a class="code hl_class" href="class_quat.html">Quat</a> inertia_space_to_world_space = inBodyRotation * mInertiaRotation;</div>
- <div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span> <a class="code hl_class" href="class_vec3.html">Vec3</a> local_angular_velocity = inertia_space_to_world_space.<a class="code hl_function" href="class_quat.html#a108350bfce9aa53b1af87fbe2698f6f4">InverseRotate</a>(mAngularVelocity);</div>
- <div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span> <a class="code hl_class" href="class_vec3.html">Vec3</a> local_momentum = local_inertia * local_angular_velocity;</div>
- <div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span> </div>
- <div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span> <span class="comment">// The gyroscopic force applies a torque: T = -w x I w where w is angular velocity and I the inertia tensor</span></div>
- <div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span> <span class="comment">// Calculate the new angular momentum by applying the gyroscopic force and make sure the new magnitude is the same as the old one</span></div>
- <div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span> <span class="comment">// to avoid introducing energy into the system due to the Euler step</span></div>
- <div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span> <a class="code hl_class" href="class_vec3.html">Vec3</a> new_local_momentum = local_momentum - inDeltaTime * local_angular_velocity.<a class="code hl_function" href="class_vec3.html#a224811af391ccfd1e05282eda22d1de8">Cross</a>(local_momentum);</div>
- <div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span> <span class="keywordtype">float</span> new_local_momentum_len_sq = new_local_momentum.<a class="code hl_function" href="class_vec3.html#aba501a6a474028084799f871c9083dc1">LengthSq</a>();</div>
- <div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span> new_local_momentum = new_local_momentum_len_sq > 0.0f? new_local_momentum * sqrt(local_momentum.<a class="code hl_function" href="class_vec3.html#aba501a6a474028084799f871c9083dc1">LengthSq</a>() / new_local_momentum_len_sq) : <a class="code hl_function" href="class_vec3.html#ad03c52ab27761bc1e64e33c47632ba51">Vec3::sZero</a>();</div>
- <div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span> </div>
- <div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span> <span class="comment">// Convert back to world space angular velocity</span></div>
- <div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span> mAngularVelocity = inertia_space_to_world_space * (mInvInertiaDiagonal * new_local_momentum);</div>
- <div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span>}</div>
- </div>
- <div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span> </div>
- <div class="foldopen" id="foldopen00130" data-start="{" data-end="}">
- <div class="line"><a id="l00130" name="l00130"></a><span class="lineno"><a class="line" href="class_motion_properties.html#ae1d0e7670106211909852cd6844286d9"> 130</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="class_motion_properties.html#ae1d0e7670106211909852cd6844286d9">MotionProperties::ApplyForceTorqueAndDragInternal</a>(<a class="code hl_class" href="class_quat.html">QuatArg</a> inBodyRotation, <a class="code hl_class" href="class_vec3.html">Vec3Arg</a> inGravity, <span class="keywordtype">float</span> inDeltaTime)</div>
- <div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span>{</div>
- <div class="line"><a id="l00132" name="l00132"></a><span class="lineno"> 132</span> <a class="code hl_define" href="_issue_reporting_8h.html#aaf6b1df827e11b7ca5f6f8778bd8f8cd">JPH_ASSERT</a>(BodyAccess::sCheckRights(BodyAccess::sVelocityAccess(), BodyAccess::EAccess::ReadWrite));</div>
- <div class="line"><a id="l00133" name="l00133"></a><span class="lineno"> 133</span> <a class="code hl_define" href="_issue_reporting_8h.html#aaf6b1df827e11b7ca5f6f8778bd8f8cd">JPH_ASSERT</a>(mCachedBodyType == <a class="code hl_enumvalue" href="_body_type_8h.html#ab494e27db6c263f9e31556ad388eb666a81db01c2775d4446d91c2caba27c53e8">EBodyType::RigidBody</a>);</div>
- <div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span> <a class="code hl_define" href="_issue_reporting_8h.html#aaf6b1df827e11b7ca5f6f8778bd8f8cd">JPH_ASSERT</a>(mCachedMotionType == <a class="code hl_enumvalue" href="_motion_type_8h.html#a328245ddbb758681fad3c44c9d488fd8a971fd8cc345d8bd9f92e9f7d88fdf20c">EMotionType::Dynamic</a>);</div>
- <div class="line"><a id="l00135" name="l00135"></a><span class="lineno"> 135</span> </div>
- <div class="line"><a id="l00136" name="l00136"></a><span class="lineno"> 136</span> <span class="comment">// Update linear velocity</span></div>
- <div class="line"><a id="l00137" name="l00137"></a><span class="lineno"> 137</span> mLinearVelocity = <a class="code hl_function" href="class_motion_properties.html#ab7168117a82829c137798ff843900104">LockTranslation</a>(mLinearVelocity + inDeltaTime * (mGravityFactor * inGravity + mInvMass * <a class="code hl_function" href="class_motion_properties.html#ab2db20476c9ab24b796a9f5877caaea5">GetAccumulatedForce</a>()));</div>
- <div class="line"><a id="l00138" name="l00138"></a><span class="lineno"> 138</span> </div>
- <div class="line"><a id="l00139" name="l00139"></a><span class="lineno"> 139</span> <span class="comment">// Update angular velocity</span></div>
- <div class="line"><a id="l00140" name="l00140"></a><span class="lineno"> 140</span> mAngularVelocity += inDeltaTime * <a class="code hl_function" href="class_motion_properties.html#aa8a73ea7940a316151262ed9a28c4fbb">MultiplyWorldSpaceInverseInertiaByVector</a>(inBodyRotation, <a class="code hl_function" href="class_motion_properties.html#a73cef0ab26c9bc15a2908e632c953bc2">GetAccumulatedTorque</a>());</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> <span class="comment">// Linear damping: dv/dt = -c * v</span></div>
- <div class="line"><a id="l00143" name="l00143"></a><span class="lineno"> 143</span> <span class="comment">// Solution: v(t) = v(0) * e^(-c * t) or v2 = v1 * e^(-c * dt)</span></div>
- <div class="line"><a id="l00144" name="l00144"></a><span class="lineno"> 144</span> <span class="comment">// Taylor expansion of e^(-c * dt) = 1 - c * dt + ...</span></div>
- <div class="line"><a id="l00145" name="l00145"></a><span class="lineno"> 145</span> <span class="comment">// Since dt is usually in the order of 1/60 and c is a low number too this approximation is good enough</span></div>
- <div class="line"><a id="l00146" name="l00146"></a><span class="lineno"> 146</span> mLinearVelocity *= max(0.0f, 1.0f - mLinearDamping * inDeltaTime);</div>
- <div class="line"><a id="l00147" name="l00147"></a><span class="lineno"> 147</span> mAngularVelocity *= max(0.0f, 1.0f - mAngularDamping * inDeltaTime);</div>
- <div class="line"><a id="l00148" name="l00148"></a><span class="lineno"> 148</span> </div>
- <div class="line"><a id="l00149" name="l00149"></a><span class="lineno"> 149</span> <span class="comment">// Clamp velocities</span></div>
- <div class="line"><a id="l00150" name="l00150"></a><span class="lineno"> 150</span> <a class="code hl_function" href="class_motion_properties.html#a2cc70977a90ef8a3bed8a60902f3c2db">ClampLinearVelocity</a>();</div>
- <div class="line"><a id="l00151" name="l00151"></a><span class="lineno"> 151</span> <a class="code hl_function" href="class_motion_properties.html#a098c27b3679ec968b9400a64c53f90c9">ClampAngularVelocity</a>();</div>
- <div class="line"><a id="l00152" name="l00152"></a><span class="lineno"> 152</span>}</div>
- </div>
- <div class="line"><a id="l00153" name="l00153"></a><span class="lineno"> 153</span> </div>
- <div class="foldopen" id="foldopen00154" data-start="{" data-end="}">
- <div class="line"><a id="l00154" name="l00154"></a><span class="lineno"><a class="line" href="class_motion_properties.html#aad3b333b7af3e3b39be95edf9b69d133"> 154</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="class_motion_properties.html#aad3b333b7af3e3b39be95edf9b69d133">MotionProperties::ResetSleepTestSpheres</a>(<span class="keyword">const</span> <a class="code hl_class" href="class_vec3.html">RVec3</a> *inPoints)</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="preprocessor">#ifdef JPH_DOUBLE_PRECISION</span></div>
- <div class="line"><a id="l00157" name="l00157"></a><span class="lineno"> 157</span> <span class="comment">// Make spheres relative to the first point and initialize them to zero radius</span></div>
- <div class="line"><a id="l00158" name="l00158"></a><span class="lineno"> 158</span> <a class="code hl_class" href="class_d_vec3.html">DVec3</a> offset = inPoints[0];</div>
- <div class="line"><a id="l00159" name="l00159"></a><span class="lineno"> 159</span> offset.<a class="code hl_function" href="class_d_vec3.html#a660cd286454202510b44fa18c2283d4d">StoreDouble3</a>(&mSleepTestOffset);</div>
- <div class="line"><a id="l00160" name="l00160"></a><span class="lineno"> 160</span> mSleepTestSpheres[0] = <a class="code hl_enumvalue" href="_shape_8h.html#aa332e0529e75b83aad91881c8d32551bab7095f057db3fefa7325ad93a04e14fd">Sphere</a>(<a class="code hl_function" href="class_vec3.html#ad03c52ab27761bc1e64e33c47632ba51">Vec3::sZero</a>(), 0.0f);</div>
- <div class="line"><a id="l00161" name="l00161"></a><span class="lineno"> 161</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 1; i < 3; ++i)</div>
- <div class="line"><a id="l00162" name="l00162"></a><span class="lineno"> 162</span> mSleepTestSpheres[i] = <a class="code hl_enumvalue" href="_shape_8h.html#aa332e0529e75b83aad91881c8d32551bab7095f057db3fefa7325ad93a04e14fd">Sphere</a>(<a class="code hl_class" href="class_vec3.html">Vec3</a>(inPoints[i] - offset), 0.0f);</div>
- <div class="line"><a id="l00163" name="l00163"></a><span class="lineno"> 163</span><span class="preprocessor">#else</span></div>
- <div class="line"><a id="l00164" name="l00164"></a><span class="lineno"> 164</span> <span class="comment">// Initialize the spheres to zero radius around the supplied points</span></div>
- <div class="line"><a id="l00165" name="l00165"></a><span class="lineno"> 165</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < 3; ++i)</div>
- <div class="line"><a id="l00166" name="l00166"></a><span class="lineno"> 166</span> mSleepTestSpheres[i] = <a class="code hl_enumvalue" href="_shape_8h.html#aa332e0529e75b83aad91881c8d32551bab7095f057db3fefa7325ad93a04e14fd">Sphere</a>(inPoints[i], 0.0f);</div>
- <div class="line"><a id="l00167" name="l00167"></a><span class="lineno"> 167</span><span class="preprocessor">#endif</span></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> mSleepTestTimer = 0.0f;</div>
- <div class="line"><a id="l00170" name="l00170"></a><span class="lineno"> 170</span>}</div>
- </div>
- <div class="line"><a id="l00171" name="l00171"></a><span class="lineno"> 171</span> </div>
- <div class="foldopen" id="foldopen00172" data-start="{" data-end="}">
- <div class="line"><a id="l00172" name="l00172"></a><span class="lineno"><a class="line" href="class_motion_properties.html#a1342087f5bae51bc6d46542ae29bca66"> 172</a></span><a class="code hl_enumeration" href="_motion_properties_8h.html#a97f69c4b07965ef22ebe08465e1c3db0">ECanSleep</a> <a class="code hl_function" href="class_motion_properties.html#a1342087f5bae51bc6d46542ae29bca66">MotionProperties::AccumulateSleepTime</a>(<span class="keywordtype">float</span> inDeltaTime, <span class="keywordtype">float</span> inTimeBeforeSleep)</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> mSleepTestTimer += inDeltaTime;</div>
- <div class="line"><a id="l00175" name="l00175"></a><span class="lineno"> 175</span> <span class="keywordflow">return</span> mSleepTestTimer >= inTimeBeforeSleep? <a class="code hl_enumvalue" href="_motion_properties_8h.html#a97f69c4b07965ef22ebe08465e1c3db0a93264bf5e739b984ef79c2fbc76863c6">ECanSleep::CanSleep</a> : <a class="code hl_enumvalue" href="_motion_properties_8h.html#a97f69c4b07965ef22ebe08465e1c3db0af6565583dd53a537e5c7376048299104">ECanSleep::CannotSleep</a>;</div>
- <div class="line"><a id="l00176" name="l00176"></a><span class="lineno"> 176</span>}</div>
- </div>
- <div class="line"><a id="l00177" name="l00177"></a><span class="lineno"> 177</span> </div>
- <div class="line"><a id="l00178" name="l00178"></a><span class="lineno"> 178</span><a class="code hl_define" href="_core_8h.html#a73da8725998b00321a9db341202d650d">JPH_NAMESPACE_END</a></div>
- <div class="ttc" id="a_body_type_8h_html_ab494e27db6c263f9e31556ad388eb666a81db01c2775d4446d91c2caba27c53e8"><div class="ttname"><a href="_body_type_8h.html#ab494e27db6c263f9e31556ad388eb666a81db01c2775d4446d91c2caba27c53e8">EBodyType::RigidBody</a></div><div class="ttdeci">@ RigidBody</div><div class="ttdoc">Rigid body consisting of a rigid shape.</div></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_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="a_math_8h_html_a61379b8b743a16fe823daeebc1482570"><div class="ttname"><a href="_math_8h.html#a61379b8b743a16fe823daeebc1482570">Square</a></div><div class="ttdeci">JPH_INLINE constexpr T Square(T inV)</div><div class="ttdoc">Square a value.</div><div class="ttdef"><b>Definition</b> Math.h:55</div></div>
- <div class="ttc" id="a_motion_properties_8h_html_a97f69c4b07965ef22ebe08465e1c3db0"><div class="ttname"><a href="_motion_properties_8h.html#a97f69c4b07965ef22ebe08465e1c3db0">ECanSleep</a></div><div class="ttdeci">ECanSleep</div><div class="ttdoc">Enum that determines if an object can go to sleep.</div><div class="ttdef"><b>Definition</b> MotionProperties.h:22</div></div>
- <div class="ttc" id="a_motion_properties_8h_html_a97f69c4b07965ef22ebe08465e1c3db0a93264bf5e739b984ef79c2fbc76863c6"><div class="ttname"><a href="_motion_properties_8h.html#a97f69c4b07965ef22ebe08465e1c3db0a93264bf5e739b984ef79c2fbc76863c6">ECanSleep::CanSleep</a></div><div class="ttdeci">@ CanSleep</div><div class="ttdoc">Object can go to sleep.</div></div>
- <div class="ttc" id="a_motion_properties_8h_html_a97f69c4b07965ef22ebe08465e1c3db0af6565583dd53a537e5c7376048299104"><div class="ttname"><a href="_motion_properties_8h.html#a97f69c4b07965ef22ebe08465e1c3db0af6565583dd53a537e5c7376048299104">ECanSleep::CannotSleep</a></div><div class="ttdeci">@ CannotSleep</div><div class="ttdoc">Object cannot go to sleep.</div></div>
- <div class="ttc" id="a_motion_type_8h_html_a328245ddbb758681fad3c44c9d488fd8a84a8921b25f505d0d2077aeb5db4bc16"><div class="ttname"><a href="_motion_type_8h.html#a328245ddbb758681fad3c44c9d488fd8a84a8921b25f505d0d2077aeb5db4bc16">EMotionType::Static</a></div><div class="ttdeci">@ Static</div><div class="ttdoc">Non movable.</div></div>
- <div class="ttc" id="a_motion_type_8h_html_a328245ddbb758681fad3c44c9d488fd8a971fd8cc345d8bd9f92e9f7d88fdf20c"><div class="ttname"><a href="_motion_type_8h.html#a328245ddbb758681fad3c44c9d488fd8a971fd8cc345d8bd9f92e9f7d88fdf20c">EMotionType::Dynamic</a></div><div class="ttdeci">@ Dynamic</div><div class="ttdoc">Responds to forces as a normal physics object.</div></div>
- <div class="ttc" id="a_shape_8h_html_aa332e0529e75b83aad91881c8d32551bab7095f057db3fefa7325ad93a04e14fd"><div class="ttname"><a href="_shape_8h.html#aa332e0529e75b83aad91881c8d32551bab7095f057db3fefa7325ad93a04e14fd">EShapeSubType::Sphere</a></div><div class="ttdeci">@ Sphere</div></div>
- <div class="ttc" id="aclass_d_vec3_html"><div class="ttname"><a href="class_d_vec3.html">DVec3</a></div><div class="ttdef"><b>Definition</b> DVec3.h:14</div></div>
- <div class="ttc" id="aclass_d_vec3_html_a660cd286454202510b44fa18c2283d4d"><div class="ttname"><a href="class_d_vec3.html#a660cd286454202510b44fa18c2283d4d">DVec3::StoreDouble3</a></div><div class="ttdeci">JPH_INLINE void StoreDouble3(Double3 *outV) const</div><div class="ttdoc">Store 3 doubles to memory.</div><div class="ttdef"><b>Definition</b> DVec3.inl:176</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_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_a595ae3cf26d9fb87761e20b6b35d3d10"><div class="ttname"><a href="class_mat44.html#a595ae3cf26d9fb87761e20b6b35d3d10">Mat44::Multiply3x3RightTransposed</a></div><div class="ttdeci">JPH_INLINE Mat44 Multiply3x3RightTransposed(Mat44Arg inM) const</div><div class="ttdoc">Multiply 3x3 matrix by the transpose of a 3x3 matrix ( )</div><div class="ttdef"><b>Definition</b> Mat44.inl:397</div></div>
- <div class="ttc" id="aclass_mat44_html_a97c469ed78611039f85415381a67f312"><div class="ttname"><a href="class_mat44.html#a97c469ed78611039f85415381a67f312">Mat44::GetColumn4</a></div><div class="ttdeci">JPH_INLINE Vec4 GetColumn4(uint inCol) const</div><div class="ttdef"><b>Definition</b> Mat44.h:160</div></div>
- <div class="ttc" id="aclass_mat44_html_ab599aaeab3e4b832f7f4097816650b14"><div class="ttname"><a href="class_mat44.html#ab599aaeab3e4b832f7f4097816650b14">Mat44::Multiply3x3</a></div><div class="ttdeci">JPH_INLINE Vec3 Multiply3x3(Vec3Arg inV) const</div><div class="ttdoc">Multiply vector by only 3x3 part of the matrix.</div><div class="ttdef"><b>Definition</b> Mat44.inl:316</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_ace29aeaafa5bbff8a159105fee78e2d2"><div class="ttname"><a href="class_mat44.html#ace29aeaafa5bbff8a159105fee78e2d2">Mat44::SetColumn4</a></div><div class="ttdeci">JPH_INLINE void SetColumn4(uint inCol, Vec4Arg inV)</div><div class="ttdef"><b>Definition</b> Mat44.h:161</div></div>
- <div class="ttc" id="aclass_motion_properties_html_a098c27b3679ec968b9400a64c53f90c9"><div class="ttname"><a href="class_motion_properties.html#a098c27b3679ec968b9400a64c53f90c9">MotionProperties::ClampAngularVelocity</a></div><div class="ttdeci">void ClampAngularVelocity()</div><div class="ttdef"><b>Definition</b> MotionProperties.inl:36</div></div>
- <div class="ttc" id="aclass_motion_properties_html_a0c437b5479bd58417b50be0da6b852f7"><div class="ttname"><a href="class_motion_properties.html#a0c437b5479bd58417b50be0da6b852f7">MotionProperties::ScaleToMass</a></div><div class="ttdeci">void ScaleToMass(float inMass)</div><div class="ttdef"><b>Definition</b> MotionProperties.inl:53</div></div>
- <div class="ttc" id="aclass_motion_properties_html_a1342087f5bae51bc6d46542ae29bca66"><div class="ttname"><a href="class_motion_properties.html#a1342087f5bae51bc6d46542ae29bca66">MotionProperties::AccumulateSleepTime</a></div><div class="ttdeci">ECanSleep AccumulateSleepTime(float inDeltaTime, float inTimeBeforeSleep)</div><div class="ttdoc">Accumulate sleep time and return if a body can go to sleep.</div><div class="ttdef"><b>Definition</b> MotionProperties.inl:172</div></div>
- <div class="ttc" id="aclass_motion_properties_html_a2cc70977a90ef8a3bed8a60902f3c2db"><div class="ttname"><a href="class_motion_properties.html#a2cc70977a90ef8a3bed8a60902f3c2db">MotionProperties::ClampLinearVelocity</a></div><div class="ttdeci">void ClampLinearVelocity()</div><div class="ttdoc">Clamp velocity according to limit.</div><div class="ttdef"><b>Definition</b> MotionProperties.inl:26</div></div>
- <div class="ttc" id="aclass_motion_properties_html_a6bfec52a7ff3345d6fefd3f84faf6be7"><div class="ttname"><a href="class_motion_properties.html#a6bfec52a7ff3345d6fefd3f84faf6be7">MotionProperties::LockAngular</a></div><div class="ttdeci">JPH_INLINE Vec3 LockAngular(Vec3Arg inV) const</div><div class="ttdoc">Takes an angular velocity / torque vector inV and returns a vector where the components that are not ...</div><div class="ttdef"><b>Definition</b> MotionProperties.h:176</div></div>
- <div class="ttc" id="aclass_motion_properties_html_a73cef0ab26c9bc15a2908e632c953bc2"><div class="ttname"><a href="class_motion_properties.html#a73cef0ab26c9bc15a2908e632c953bc2">MotionProperties::GetAccumulatedTorque</a></div><div class="ttdeci">JPH_INLINE Vec3 GetAccumulatedTorque() const</div><div class="ttdef"><b>Definition</b> MotionProperties.h:139</div></div>
- <div class="ttc" id="aclass_motion_properties_html_a78c58cb27772068a0aa3cbe286ddaf0b"><div class="ttname"><a href="class_motion_properties.html#a78c58cb27772068a0aa3cbe286ddaf0b">MotionProperties::ApplyGyroscopicForceInternal</a></div><div class="ttdeci">void ApplyGyroscopicForceInternal(QuatArg inBodyRotation, float inDeltaTime)</div><div class="ttdoc">Apply the gyroscopic force (aka Dzhanibekov effect, see https://en.wikipedia.org/wiki/Tennis_racket_t...</div><div class="ttdef"><b>Definition</b> MotionProperties.inl:102</div></div>
- <div class="ttc" id="aclass_motion_properties_html_a994dad1b2bf71b0f0394bec77fcb9b8e"><div class="ttname"><a href="class_motion_properties.html#a994dad1b2bf71b0f0394bec77fcb9b8e">MotionProperties::GetLocalSpaceInverseInertiaUnchecked</a></div><div class="ttdeci">Mat44 GetLocalSpaceInverseInertiaUnchecked() const</div><div class="ttdoc">Same as GetLocalSpaceInverseInertia() but doesn't check if the body is dynamic.</div><div class="ttdef"><b>Definition</b> MotionProperties.inl:46</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_ab2db20476c9ab24b796a9f5877caaea5"><div class="ttname"><a href="class_motion_properties.html#ab2db20476c9ab24b796a9f5877caaea5">MotionProperties::GetAccumulatedForce</a></div><div class="ttdeci">JPH_INLINE Vec3 GetAccumulatedForce() const</div><div class="ttdef"><b>Definition</b> MotionProperties.h:136</div></div>
- <div class="ttc" id="aclass_motion_properties_html_ab7168117a82829c137798ff843900104"><div class="ttname"><a href="class_motion_properties.html#ab7168117a82829c137798ff843900104">MotionProperties::LockTranslation</a></div><div class="ttdeci">JPH_INLINE Vec3 LockTranslation(Vec3Arg inV) const</div><div class="ttdoc">Takes a translation vector inV and returns a vector where the components that are not allowed by mAll...</div><div class="ttdef"><b>Definition</b> MotionProperties.h:163</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_motion_properties_html_ad52e9ac8d614918a8dc9c80f22b4847e"><div class="ttname"><a href="class_motion_properties.html#ad52e9ac8d614918a8dc9c80f22b4847e">MotionProperties::GetLocalSpaceInverseInertia</a></div><div class="ttdeci">Mat44 GetLocalSpaceInverseInertia() const</div><div class="ttdoc">Get inverse inertia matrix ( ). Will be a matrix of zeros for a static or kinematic object.</div><div class="ttdef"><b>Definition</b> MotionProperties.inl:63</div></div>
- <div class="ttc" id="aclass_motion_properties_html_ae0c08282aaf3b1a38cd958c32840e329"><div class="ttname"><a href="class_motion_properties.html#ae0c08282aaf3b1a38cd958c32840e329">MotionProperties::GetAngularDOFsMask</a></div><div class="ttdeci">JPH_INLINE UVec4 GetAngularDOFsMask() const</div><div class="ttdoc">Returns a vector where the angular components that are not allowed by mAllowedDOFs are set to 0 and t...</div><div class="ttdef"><b>Definition</b> MotionProperties.h:169</div></div>
- <div class="ttc" id="aclass_motion_properties_html_ae1d0e7670106211909852cd6844286d9"><div class="ttname"><a href="class_motion_properties.html#ae1d0e7670106211909852cd6844286d9">MotionProperties::ApplyForceTorqueAndDragInternal</a></div><div class="ttdeci">void ApplyForceTorqueAndDragInternal(QuatArg inBodyRotation, Vec3Arg inGravity, float inDeltaTime)</div><div class="ttdoc">Apply all accumulated forces, torques and drag (should only be called by the PhysicsSystem)</div><div class="ttdef"><b>Definition</b> MotionProperties.inl:130</div></div>
- <div class="ttc" id="aclass_motion_properties_html_afc2471d63f11da6c88141a1adedf6149"><div class="ttname"><a href="class_motion_properties.html#afc2471d63f11da6c88141a1adedf6149">MotionProperties::MoveKinematic</a></div><div class="ttdeci">void MoveKinematic(Vec3Arg inDeltaPosition, QuatArg inDeltaRotation, float inDeltaTime)</div><div class="ttdoc">Set velocity of body such that it will be rotate/translate by inDeltaPosition/Rotation in inDeltaTime...</div><div class="ttdef"><b>Definition</b> MotionProperties.inl:9</div></div>
- <div class="ttc" id="aclass_quat_html"><div class="ttname"><a href="class_quat.html">Quat</a></div><div class="ttdef"><b>Definition</b> Quat.h:33</div></div>
- <div class="ttc" id="aclass_quat_html_a108350bfce9aa53b1af87fbe2698f6f4"><div class="ttname"><a href="class_quat.html#a108350bfce9aa53b1af87fbe2698f6f4">Quat::InverseRotate</a></div><div class="ttdeci">JPH_INLINE Vec3 InverseRotate(Vec3Arg inValue) const</div><div class="ttdoc">Rotate a vector by the inverse of this quaternion.</div><div class="ttdef"><b>Definition</b> Quat.inl:353</div></div>
- <div class="ttc" id="aclass_quat_html_a618a8eb64122263b8c64109f03ac47b5"><div class="ttname"><a href="class_quat.html#a618a8eb64122263b8c64109f03ac47b5">Quat::GetAxisAngle</a></div><div class="ttdeci">JPH_INLINE void GetAxisAngle(Vec3 &outAxis, float &outAngle) const</div><div class="ttdoc">Get axis and angle that represents this quaternion, outAngle will always be in the range .</div><div class="ttdef"><b>Definition</b> Quat.inl:137</div></div>
- <div class="ttc" id="aclass_u_vec4_html"><div class="ttname"><a href="class_u_vec4.html">UVec4</a></div><div class="ttdef"><b>Definition</b> UVec4.h:12</div></div>
- <div class="ttc" id="aclass_u_vec4_html_af399ef91439555b5264eec1790537547"><div class="ttname"><a href="class_u_vec4.html#af399ef91439555b5264eec1790537547">UVec4::ReinterpretAsFloat</a></div><div class="ttdeci">JPH_INLINE Vec4 ReinterpretAsFloat() const</div><div class="ttdoc">Reinterpret UVec4 as a Vec4 (doesn't change the bits)</div><div class="ttdef"><b>Definition</b> UVec4.inl:367</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_a1b03f087ce2755a85ccba4ba56f1e64b"><div class="ttname"><a href="class_vec3.html#a1b03f087ce2755a85ccba4ba56f1e64b">Vec3::SplatX</a></div><div class="ttdeci">JPH_INLINE Vec4 SplatX() const</div><div class="ttdoc">Replicate the X component to all components.</div><div class="ttdef"><b>Definition</b> Vec3.inl:534</div></div>
- <div class="ttc" id="aclass_vec3_html_a224811af391ccfd1e05282eda22d1de8"><div class="ttname"><a href="class_vec3.html#a224811af391ccfd1e05282eda22d1de8">Vec3::Cross</a></div><div class="ttdeci">JPH_INLINE Vec3 Cross(Vec3Arg inV2) const</div><div class="ttdoc">Cross product.</div><div class="ttdef"><b>Definition</b> Vec3.inl:595</div></div>
- <div class="ttc" id="aclass_vec3_html_a6bc0731860c69d4e3151981d2dc24e93"><div class="ttname"><a href="class_vec3.html#a6bc0731860c69d4e3151981d2dc24e93">Vec3::sOne</a></div><div class="ttdeci">static JPH_INLINE Vec3 sOne()</div><div class="ttdoc">Vector with all ones.</div><div class="ttdef"><b>Definition</b> Vec3.inl:125</div></div>
- <div class="ttc" id="aclass_vec3_html_a81f4448e17219aafda0e3b886709d1f4"><div class="ttname"><a href="class_vec3.html#a81f4448e17219aafda0e3b886709d1f4">Vec3::SplatZ</a></div><div class="ttdeci">JPH_INLINE Vec4 SplatZ() const</div><div class="ttdoc">Replicate the Z component to all components.</div><div class="ttdef"><b>Definition</b> Vec3.inl:556</div></div>
- <div class="ttc" id="aclass_vec3_html_a96e892074ac7e8638cb70ede768f08a8"><div class="ttname"><a href="class_vec3.html#a96e892074ac7e8638cb70ede768f08a8">Vec3::sAnd</a></div><div class="ttdeci">static JPH_INLINE Vec3 sAnd(Vec3Arg inV1, Vec3Arg inV2)</div><div class="ttdoc">Logical and (component wise)</div><div class="ttdef"><b>Definition</b> Vec3.inl:315</div></div>
- <div class="ttc" id="aclass_vec3_html_aad5b4211a6d98be56362559eefd9b029"><div class="ttname"><a href="class_vec3.html#aad5b4211a6d98be56362559eefd9b029">Vec3::SplatY</a></div><div class="ttdeci">JPH_INLINE Vec4 SplatY() const</div><div class="ttdoc">Replicate the Y component to all components.</div><div class="ttdef"><b>Definition</b> Vec3.inl:545</div></div>
- <div class="ttc" id="aclass_vec3_html_aba501a6a474028084799f871c9083dc1"><div class="ttname"><a href="class_vec3.html#aba501a6a474028084799f871c9083dc1">Vec3::LengthSq</a></div><div class="ttdeci">JPH_INLINE float LengthSq() const</div><div class="ttdoc">Squared length of vector.</div><div class="ttdef"><b>Definition</b> Vec3.inl:666</div></div>
- <div class="ttc" id="aclass_vec3_html_acd0e4130c1b2863b203812f4922b3642"><div class="ttname"><a href="class_vec3.html#acd0e4130c1b2863b203812f4922b3642">Vec3::sEquals</a></div><div class="ttdeci">static JPH_INLINE UVec4 sEquals(Vec3Arg inV1, Vec3Arg inV2)</div><div class="ttdoc">Equals (component wise)</div><div class="ttdef"><b>Definition</b> Vec3.inl:178</div></div>
- <div class="ttc" id="aclass_vec3_html_ad03c52ab27761bc1e64e33c47632ba51"><div class="ttname"><a href="class_vec3.html#ad03c52ab27761bc1e64e33c47632ba51">Vec3::sZero</a></div><div class="ttdeci">static JPH_INLINE Vec3 sZero()</div><div class="ttdoc">Vector with all zeros.</div><div class="ttdef"><b>Definition</b> Vec3.inl:103</div></div>
- <div class="ttc" id="aclass_vec3_html_ae0f4ab3438fe6b9782010ef8212a6d69"><div class="ttname"><a href="class_vec3.html#ae0f4ab3438fe6b9782010ef8212a6d69">Vec3::sSelect</a></div><div class="ttdeci">static JPH_INLINE Vec3 sSelect(Vec3Arg inNotSet, Vec3Arg inSet, UVec4Arg inControl)</div><div class="ttdoc">Component wise select, returns inNotSet when highest bit of inControl = 0 and inSet when highest bit ...</div><div class="ttdef"><b>Definition</b> Vec3.inl:270</div></div>
- <div class="ttc" id="aclass_vec4_html"><div class="ttname"><a href="class_vec4.html">Vec4</a></div><div class="ttdef"><b>Definition</b> Vec4.h:14</div></div>
- <div class="ttc" id="aclass_vec4_html_a02525e7f8473c93268058324115eeb02"><div class="ttname"><a href="class_vec4.html#a02525e7f8473c93268058324115eeb02">Vec4::SplatX</a></div><div class="ttdeci">JPH_INLINE Vec4 SplatX() const</div><div class="ttdoc">Replicate the X component to all components.</div><div class="ttdef"><b>Definition</b> Vec4.inl:573</div></div>
- <div class="ttc" id="aclass_vec4_html_a1b0f06643e493c801cdd07a18ff8b2dd"><div class="ttname"><a href="class_vec4.html#a1b0f06643e493c801cdd07a18ff8b2dd">Vec4::sAnd</a></div><div class="ttdeci">static JPH_INLINE Vec4 sAnd(Vec4Arg inV1, Vec4Arg inV2)</div><div class="ttdoc">Logical and (component wise)</div><div class="ttdef"><b>Definition</b> Vec4.inl:303</div></div>
- <div class="ttc" id="aclass_vec4_html_a7ea3bcf62a6055b45527f720a51d0005"><div class="ttname"><a href="class_vec4.html#a7ea3bcf62a6055b45527f720a51d0005">Vec4::SplatY</a></div><div class="ttdeci">JPH_INLINE Vec4 SplatY() const</div><div class="ttdoc">Replicate the Y component to all components.</div><div class="ttdef"><b>Definition</b> Vec4.inl:584</div></div>
- <div class="ttc" id="aclass_vec4_html_a8fcd8e6ed1b4cf308656cca7cf68d5ee"><div class="ttname"><a href="class_vec4.html#a8fcd8e6ed1b4cf308656cca7cf68d5ee">Vec4::SplatZ</a></div><div class="ttdeci">JPH_INLINE Vec4 SplatZ() const</div><div class="ttdoc">Replicate the Z component to all components.</div><div class="ttdef"><b>Definition</b> Vec4.inl:595</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="_motion_properties_8inl.html">MotionProperties.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>
|