_compound_shape_8h_source.html 115 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
  5. <meta http-equiv="X-UA-Compatible" content="IE=11"/>
  6. <meta name="generator" content="Doxygen 1.12.0"/>
  7. <meta name="viewport" content="width=device-width, initial-scale=1"/>
  8. <title>Jolt Physics: Jolt/Physics/Collision/Shape/CompoundShape.h Source File</title>
  9. <link href="tabs.css" rel="stylesheet" type="text/css"/>
  10. <script type="text/javascript" src="jquery.js"></script>
  11. <script type="text/javascript" src="dynsections.js"></script>
  12. <script type="text/javascript" src="clipboard.js"></script>
  13. <link href="navtree.css" rel="stylesheet" type="text/css"/>
  14. <script type="text/javascript" src="navtreedata.js"></script>
  15. <script type="text/javascript" src="navtree.js"></script>
  16. <script type="text/javascript" src="resize.js"></script>
  17. <script type="text/javascript" src="cookie.js"></script>
  18. <link href="search/search.css" rel="stylesheet" type="text/css"/>
  19. <script type="text/javascript" src="search/searchdata.js"></script>
  20. <script type="text/javascript" src="search/search.js"></script>
  21. <script type="text/x-mathjax-config">
  22. MathJax.Hub.Config({
  23. extensions: ["tex2jax.js"],
  24. jax: ["input/TeX","output/HTML-CSS"],
  25. });
  26. </script>
  27. <script type="text/javascript" async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js"></script>
  28. <link href="doxygen.css" rel="stylesheet" type="text/css" />
  29. </head>
  30. <body>
  31. <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
  32. <div id="titlearea">
  33. <table cellspacing="0" cellpadding="0">
  34. <tbody>
  35. <tr id="projectrow">
  36. <td id="projectlogo"><img alt="Logo" src="LogoSmall.png"/></td>
  37. <td id="projectalign">
  38. <div id="projectname">Jolt Physics
  39. </div>
  40. <div id="projectbrief">A multi core friendly Game Physics Engine</div>
  41. </td>
  42. </tr>
  43. </tbody>
  44. </table>
  45. </div>
  46. <!-- end header part -->
  47. <!-- Generated by Doxygen 1.12.0 -->
  48. <script type="text/javascript">
  49. /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
  50. var searchBox = new SearchBox("searchBox", "search/",'.html');
  51. /* @license-end */
  52. </script>
  53. <script type="text/javascript">
  54. /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
  55. $(function() { codefold.init(0); });
  56. /* @license-end */
  57. </script>
  58. <script type="text/javascript" src="menudata.js"></script>
  59. <script type="text/javascript" src="menu.js"></script>
  60. <script type="text/javascript">
  61. /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
  62. $(function() {
  63. initMenu('',true,false,'search.php','Search',true);
  64. $(function() { init_search(); });
  65. });
  66. /* @license-end */
  67. </script>
  68. <div id="main-nav"></div>
  69. </div><!-- top -->
  70. <div id="side-nav" class="ui-resizable side-nav-resizable">
  71. <div id="nav-tree">
  72. <div id="nav-tree-contents">
  73. <div id="nav-sync" class="sync"></div>
  74. </div>
  75. </div>
  76. <div id="splitbar" style="-moz-user-select:none;"
  77. class="ui-resizable-handle">
  78. </div>
  79. </div>
  80. <script type="text/javascript">
  81. /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
  82. $(function(){initNavTree('_compound_shape_8h_source.html',''); initResizable(true); });
  83. /* @license-end */
  84. </script>
  85. <div id="doc-content">
  86. <!-- window showing the filter options -->
  87. <div id="MSearchSelectWindow"
  88. onmouseover="return searchBox.OnSearchSelectShow()"
  89. onmouseout="return searchBox.OnSearchSelectHide()"
  90. onkeydown="return searchBox.OnSearchSelectKey(event)">
  91. </div>
  92. <!-- iframe showing the search results (closed by default) -->
  93. <div id="MSearchResultsWindow">
  94. <div id="MSearchResults">
  95. <div class="SRPage">
  96. <div id="SRIndex">
  97. <div id="SRResults"></div>
  98. <div class="SRStatus" id="Loading">Loading...</div>
  99. <div class="SRStatus" id="Searching">Searching...</div>
  100. <div class="SRStatus" id="NoMatches">No Matches</div>
  101. </div>
  102. </div>
  103. </div>
  104. </div>
  105. <div class="header">
  106. <div class="headertitle"><div class="title">CompoundShape.h</div></div>
  107. </div><!--header-->
  108. <div class="contents">
  109. <a href="_compound_shape_8h.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>
  110. <div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="comment">// SPDX-FileCopyrightText: 2021 Jorrit Rouwe</span></div>
  111. <div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span><span class="comment">// SPDX-License-Identifier: MIT</span></div>
  112. <div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span> </div>
  113. <div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="preprocessor">#pragma once</span></div>
  114. <div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span> </div>
  115. <div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="preprocessor">#include &lt;<a class="code" href="_shape_8h.html">Jolt/Physics/Collision/Shape/Shape.h</a>&gt;</span></div>
  116. <div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="preprocessor">#include &lt;<a class="code" href="_scale_helpers_8h.html">Jolt/Physics/Collision/Shape/ScaleHelpers.h</a>&gt;</span></div>
  117. <div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span><span class="preprocessor">#include &lt;<a class="code" href="_sub_shape_i_d_8h.html">Jolt/Physics/Collision/Shape/SubShapeID.h</a>&gt;</span></div>
  118. <div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span> </div>
  119. <div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span><a class="code hl_define" href="_core_8h.html#ad14098b68b8c44ea6112601031268405">JPH_NAMESPACE_BEGIN</a></div>
  120. <div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span> </div>
  121. <div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="keyword">class </span><a class="code hl_class" href="class_collide_shape_settings.html">CollideShapeSettings</a>;</div>
  122. <div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="keyword">class </span><a class="code hl_class" href="class_oriented_box.html">OrientedBox</a>;</div>
  123. <div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span> </div>
  124. <div class="foldopen" id="foldopen00017" data-start="{" data-end="};">
  125. <div class="line"><a id="l00017" name="l00017"></a><span class="lineno"><a class="line" href="class_compound_shape_settings.html"> 17</a></span><span class="keyword">class </span><a class="code hl_define" href="_core_8h.html#a2712a9b0f778ab9d1aa5118b4e8e6bd8">JPH_EXPORT</a> <a class="code hl_class" href="class_compound_shape_settings.html">CompoundShapeSettings</a> : <span class="keyword">public</span> <a class="code hl_class" href="class_shape_settings.html">ShapeSettings</a></div>
  126. <div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span>{</div>
  127. <div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> <a class="code hl_define" href="_serializable_object_8h.html#ac317eaf55d6ffd3bc0c67521bc33d617">JPH_DECLARE_SERIALIZABLE_ABSTRACT</a>(<a class="code hl_define" href="_core_8h.html#a2712a9b0f778ab9d1aa5118b4e8e6bd8">JPH_EXPORT</a>, <a class="code hl_class" href="class_compound_shape_settings.html">CompoundShapeSettings</a>)</div>
  128. <div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> </div>
  129. <div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span><span class="keyword">public</span>:</div>
  130. <div class="line"><a id="l00023" name="l00023"></a><span class="lineno"><a class="line" href="class_compound_shape_settings.html#a203d5072fa51f2c61b999cfb76ed9867"> 23</a></span> <a class="code hl_function" href="class_compound_shape_settings.html#a203d5072fa51f2c61b999cfb76ed9867">CompoundShapeSettings</a>() = <span class="keywordflow">default</span>;</div>
  131. <div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> </div>
  132. <div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> <span class="keywordtype">void</span> AddShape(<a class="code hl_class" href="class_vec3.html">Vec3Arg</a> inPosition, <a class="code hl_class" href="class_quat.html">QuatArg</a> inRotation, <span class="keyword">const</span> <a class="code hl_class" href="class_shape_settings.html">ShapeSettings</a> *inShape, <a class="code hl_typedef" href="_core_8h.html#a8f95e75e58492e87412191fabadd8ca8">uint32</a> inUserData = 0);</div>
  133. <div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> </div>
  134. <div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> <span class="keywordtype">void</span> AddShape(<a class="code hl_class" href="class_vec3.html">Vec3Arg</a> inPosition, <a class="code hl_class" href="class_quat.html">QuatArg</a> inRotation, <span class="keyword">const</span> <a class="code hl_class" href="class_shape.html">Shape</a> *inShape, <a class="code hl_typedef" href="_core_8h.html#a8f95e75e58492e87412191fabadd8ca8">uint32</a> inUserData = 0);</div>
  135. <div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> </div>
  136. <div class="foldopen" id="foldopen00031" data-start="{" data-end="};">
  137. <div class="line"><a id="l00031" name="l00031"></a><span class="lineno"><a class="line" href="struct_compound_shape_settings_1_1_sub_shape_settings.html"> 31</a></span> <span class="keyword">struct </span><a class="code hl_struct" href="struct_compound_shape_settings_1_1_sub_shape_settings.html">SubShapeSettings</a></div>
  138. <div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> {</div>
  139. <div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> <a class="code hl_define" href="_serializable_object_8h.html#accc27ff8b37777018bc2d93207412b71">JPH_DECLARE_SERIALIZABLE_NON_VIRTUAL</a>(<a class="code hl_define" href="_core_8h.html#a2712a9b0f778ab9d1aa5118b4e8e6bd8">JPH_EXPORT</a>, <a class="code hl_struct" href="struct_compound_shape_settings_1_1_sub_shape_settings.html">SubShapeSettings</a>)</div>
  140. <div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> </div>
  141. <div class="line"><a id="l00035" name="l00035"></a><span class="lineno"><a class="line" href="struct_compound_shape_settings_1_1_sub_shape_settings.html#aa79a4e31ee31e2d2760a15e01de76a71"> 35</a></span> <a class="code hl_class" href="class_ref_const.html">RefConst</a>&lt;<a class="code hl_class" href="class_shape_settings.html">ShapeSettings</a>&gt; mShape; </div>
  142. <div class="line"><a id="l00036" name="l00036"></a><span class="lineno"><a class="line" href="struct_compound_shape_settings_1_1_sub_shape_settings.html#ae1a012a16565000879fbe836e22c5a07"> 36</a></span> <a class="code hl_class" href="class_ref_const.html">RefConst</a>&lt;<a class="code hl_class" href="class_shape.html">Shape</a>&gt; mShapePtr; </div>
  143. <div class="line"><a id="l00037" name="l00037"></a><span class="lineno"><a class="line" href="struct_compound_shape_settings_1_1_sub_shape_settings.html#aaf84c1bfaed3898a81e184c11d05988d"> 37</a></span> <a class="code hl_class" href="class_vec3.html">Vec3</a> mPosition; </div>
  144. <div class="line"><a id="l00038" name="l00038"></a><span class="lineno"><a class="line" href="struct_compound_shape_settings_1_1_sub_shape_settings.html#a865bfef885778f2221f8a4dccf0e941e"> 38</a></span> <a class="code hl_class" href="class_quat.html">Quat</a> mRotation; </div>
  145. <div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> </div>
  146. <div class="line"><a id="l00043" name="l00043"></a><span class="lineno"><a class="line" href="struct_compound_shape_settings_1_1_sub_shape_settings.html#a05791518abbef530de3bc631efa4d8dc"> 43</a></span> <a class="code hl_typedef" href="_core_8h.html#a8f95e75e58492e87412191fabadd8ca8">uint32</a> mUserData = 0;</div>
  147. <div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> };</div>
  148. </div>
  149. <div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> </div>
  150. <div class="line"><a id="l00046" name="l00046"></a><span class="lineno"><a class="line" href="class_compound_shape_settings.html#ac4842f25ad3eada96183eb8a0e1efdac"> 46</a></span> using <a class="code hl_class" href="class_array.html">SubShapes</a> = <a class="code hl_class" href="class_array.html">Array</a>&lt;<a class="code hl_struct" href="struct_compound_shape_settings_1_1_sub_shape_settings.html">SubShapeSettings</a>&gt;;</div>
  151. <div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> </div>
  152. <div class="line"><a id="l00048" name="l00048"></a><span class="lineno"><a class="line" href="class_compound_shape_settings.html#a1fcf910b218527bcd856bf017b8ea6f3"> 48</a></span> <a class="code hl_class" href="class_array.html">SubShapes</a> mSubShapes;</div>
  153. <div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span>};</div>
  154. </div>
  155. <div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> </div>
  156. <div class="foldopen" id="foldopen00052" data-start="{" data-end="};">
  157. <div class="line"><a id="l00052" name="l00052"></a><span class="lineno"><a class="line" href="class_compound_shape.html"> 52</a></span>class <a class="code hl_define" href="_core_8h.html#a2712a9b0f778ab9d1aa5118b4e8e6bd8">JPH_EXPORT</a> <a class="code hl_class" href="class_compound_shape.html">CompoundShape</a> : public <a class="code hl_class" href="class_shape.html">Shape</a></div>
  158. <div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span>{</div>
  159. <div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span><span class="keyword">public</span>:</div>
  160. <div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> <a class="code hl_define" href="_memory_8h.html#a91074fb218fe28954a0938c099ddd9e0">JPH_OVERRIDE_NEW_DELETE</a></div>
  161. <div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> </div>
  162. <div class="line"><a id="l00058" name="l00058"></a><span class="lineno"><a class="line" href="class_compound_shape.html#a6e087096097e738d9cb0547d1be060c9"> 58</a></span> <span class="keyword">explicit</span> <a class="code hl_function" href="class_compound_shape.html#a6e087096097e738d9cb0547d1be060c9">CompoundShape</a>(<a class="code hl_enumeration" href="_shape_8h.html#aa332e0529e75b83aad91881c8d32551b">EShapeSubType</a> inSubType) : <a class="code hl_class" href="class_shape.html">Shape</a>(<a class="code hl_enumeration" href="_shape_8h.html#ad64a1c665070a3100e456e54073554a5">EShapeType</a>::<a class="code hl_enumvalue" href="_shape_8h.html#ad64a1c665070a3100e456e54073554a5a26154ea007c65f860de5333a555a56cf">Compound</a>, inSubType) { }</div>
  163. <div class="line"><a id="l00059" name="l00059"></a><span class="lineno"><a class="line" href="class_compound_shape.html#ac6d8a7e5c9f6758682f1a85437b09014"> 59</a></span> <a class="code hl_function" href="class_compound_shape.html#ac6d8a7e5c9f6758682f1a85437b09014">CompoundShape</a>(<a class="code hl_enumeration" href="_shape_8h.html#aa332e0529e75b83aad91881c8d32551b">EShapeSubType</a> inSubType, <span class="keyword">const</span> <a class="code hl_class" href="class_shape_settings.html">ShapeSettings</a> &amp;inSettings, <a class="code hl_class" href="class_result.html">ShapeResult</a> &amp;outResult) : <a class="code hl_class" href="class_shape.html">Shape</a>(<a class="code hl_enumeration" href="_shape_8h.html#ad64a1c665070a3100e456e54073554a5">EShapeType</a>::<a class="code hl_enumvalue" href="_shape_8h.html#ad64a1c665070a3100e456e54073554a5a26154ea007c65f860de5333a555a56cf">Compound</a>, inSubType, inSettings, outResult) { }</div>
  164. <div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> </div>
  165. <div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> <span class="comment">// See Shape::GetCenterOfMass</span></div>
  166. <div class="line"><a id="l00062" name="l00062"></a><span class="lineno"><a class="line" href="class_compound_shape.html#aeec4b7c1a31225a01b314f2528f27b24"> 62</a></span> <span class="keyword">virtual</span> <a class="code hl_class" href="class_vec3.html">Vec3</a> <a class="code hl_function" href="class_compound_shape.html#aeec4b7c1a31225a01b314f2528f27b24">GetCenterOfMass</a>()<span class="keyword"> const override </span>{ <span class="keywordflow">return</span> mCenterOfMass; }</div>
  167. <div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> </div>
  168. <div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> <span class="comment">// See Shape::MustBeStatic</span></div>
  169. <div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> <span class="keyword">virtual</span> <span class="keywordtype">bool</span> MustBeStatic() <span class="keyword">const override</span>;</div>
  170. <div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> </div>
  171. <div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> <span class="comment">// See Shape::GetLocalBounds</span></div>
  172. <div class="line"><a id="l00068" name="l00068"></a><span class="lineno"><a class="line" href="class_compound_shape.html#aed1247824e7919d8a948293f586b15dc"> 68</a></span> <span class="keyword">virtual</span> <a class="code hl_class" href="class_a_a_box.html">AABox</a> <a class="code hl_function" href="class_compound_shape.html#aed1247824e7919d8a948293f586b15dc">GetLocalBounds</a>()<span class="keyword"> const override </span>{ <span class="keywordflow">return</span> mLocalBounds; }</div>
  173. <div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> </div>
  174. <div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> <span class="comment">// See Shape::GetSubShapeIDBitsRecursive</span></div>
  175. <div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> <span class="keyword">virtual</span> <a class="code hl_typedef" href="_core_8h.html#a69aa29b598b851b0640aa225a9e5d61d">uint</a> GetSubShapeIDBitsRecursive() <span class="keyword">const override</span>;</div>
  176. <div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> </div>
  177. <div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> <span class="comment">// See Shape::GetWorldSpaceBounds</span></div>
  178. <div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> <span class="keyword">virtual</span> <a class="code hl_class" href="class_a_a_box.html">AABox</a> GetWorldSpaceBounds(<a class="code hl_class" href="class_mat44.html">Mat44Arg</a> inCenterOfMassTransform, <a class="code hl_class" href="class_vec3.html">Vec3Arg</a> inScale) <span class="keyword">const override</span>;</div>
  179. <div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> <span class="keyword">using </span><a class="code hl_function" href="class_shape.html#a9f8379fa338802436700b86a07fab3be">Shape::GetWorldSpaceBounds</a>;</div>
  180. <div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> </div>
  181. <div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> <span class="comment">// See Shape::GetInnerRadius</span></div>
  182. <div class="line"><a id="l00078" name="l00078"></a><span class="lineno"><a class="line" href="class_compound_shape.html#ae17025f3ed04cdf063dc0f3b180468a4"> 78</a></span> <span class="keyword">virtual</span> <span class="keywordtype">float</span> <a class="code hl_function" href="class_compound_shape.html#ae17025f3ed04cdf063dc0f3b180468a4">GetInnerRadius</a>()<span class="keyword"> const override </span>{ <span class="keywordflow">return</span> mInnerRadius; }</div>
  183. <div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> </div>
  184. <div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> <span class="comment">// See Shape::GetMassProperties</span></div>
  185. <div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> <span class="keyword">virtual</span> <a class="code hl_class" href="class_mass_properties.html">MassProperties</a> GetMassProperties() <span class="keyword">const override</span>;</div>
  186. <div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> </div>
  187. <div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> <span class="comment">// See Shape::GetMaterial</span></div>
  188. <div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code hl_class" href="class_physics_material.html">PhysicsMaterial</a> * GetMaterial(<span class="keyword">const</span> <a class="code hl_class" href="class_sub_shape_i_d.html">SubShapeID</a> &amp;inSubShapeID) <span class="keyword">const override</span>;</div>
  189. <div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> </div>
  190. <div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> <span class="comment">// See Shape::GetLeafShape</span></div>
  191. <div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code hl_class" href="class_shape.html">Shape</a> * GetLeafShape(<span class="keyword">const</span> <a class="code hl_class" href="class_sub_shape_i_d.html">SubShapeID</a> &amp;inSubShapeID, <a class="code hl_class" href="class_sub_shape_i_d.html">SubShapeID</a> &amp;outRemainder) <span class="keyword">const override</span>;</div>
  192. <div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> </div>
  193. <div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> <span class="comment">// See Shape::GetSubShapeUserData</span></div>
  194. <div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> <span class="keyword">virtual</span> <a class="code hl_typedef" href="_core_8h.html#a60e8696a4678cd348e991a1f172e53f7">uint64</a> GetSubShapeUserData(<span class="keyword">const</span> <a class="code hl_class" href="class_sub_shape_i_d.html">SubShapeID</a> &amp;inSubShapeID) <span class="keyword">const override</span>;</div>
  195. <div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> </div>
  196. <div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> <span class="comment">// See Shape::GetSubShapeTransformedShape</span></div>
  197. <div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> <span class="keyword">virtual</span> <a class="code hl_class" href="class_transformed_shape.html">TransformedShape</a> GetSubShapeTransformedShape(<span class="keyword">const</span> <a class="code hl_class" href="class_sub_shape_i_d.html">SubShapeID</a> &amp;inSubShapeID, <a class="code hl_class" href="class_vec3.html">Vec3Arg</a> inPositionCOM, <a class="code hl_class" href="class_quat.html">QuatArg</a> inRotation, <a class="code hl_class" href="class_vec3.html">Vec3Arg</a> inScale, <a class="code hl_class" href="class_sub_shape_i_d.html">SubShapeID</a> &amp;outRemainder) <span class="keyword">const override</span>;</div>
  198. <div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> </div>
  199. <div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> <span class="comment">// See Shape::GetSurfaceNormal</span></div>
  200. <div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> <span class="keyword">virtual</span> <a class="code hl_class" href="class_vec3.html">Vec3</a> GetSurfaceNormal(<span class="keyword">const</span> <a class="code hl_class" href="class_sub_shape_i_d.html">SubShapeID</a> &amp;inSubShapeID, <a class="code hl_class" href="class_vec3.html">Vec3Arg</a> inLocalSurfacePosition) <span class="keyword">const override</span>;</div>
  201. <div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> </div>
  202. <div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> <span class="comment">// See Shape::GetSupportingFace</span></div>
  203. <div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> GetSupportingFace(<span class="keyword">const</span> <a class="code hl_class" href="class_sub_shape_i_d.html">SubShapeID</a> &amp;inSubShapeID, <a class="code hl_class" href="class_vec3.html">Vec3Arg</a> inDirection, <a class="code hl_class" href="class_vec3.html">Vec3Arg</a> inScale, <a class="code hl_class" href="class_mat44.html">Mat44Arg</a> inCenterOfMassTransform, SupportingFace &amp;outVertices) <span class="keyword">const override</span>;</div>
  204. <div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span> </div>
  205. <div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span> <span class="comment">// See Shape::GetSubmergedVolume</span></div>
  206. <div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> GetSubmergedVolume(<a class="code hl_class" href="class_mat44.html">Mat44Arg</a> inCenterOfMassTransform, <a class="code hl_class" href="class_vec3.html">Vec3Arg</a> inScale, <span class="keyword">const</span> <a class="code hl_class" href="class_plane.html">Plane</a> &amp;inSurface, <span class="keywordtype">float</span> &amp;outTotalVolume, <span class="keywordtype">float</span> &amp;outSubmergedVolume, <a class="code hl_class" href="class_vec3.html">Vec3</a> &amp;outCenterOfBuoyancy <a class="code hl_define" href="_core_8h.html#ab6d002cadb39841b46bb93fe8a20e00e">JPH_IF_DEBUG_RENDERER</a>(, <a class="code hl_class" href="class_vec3.html">RVec3Arg</a> inBaseOffset)) <span class="keyword">const override</span>;</div>
  207. <div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> </div>
  208. <div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span><span class="preprocessor">#ifdef JPH_DEBUG_RENDERER</span></div>
  209. <div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> <span class="comment">// See Shape::Draw</span></div>
  210. <div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> Draw(<a class="code hl_class" href="class_debug_renderer.html">DebugRenderer</a> *inRenderer, <a class="code hl_class" href="class_mat44.html">RMat44Arg</a> inCenterOfMassTransform, <a class="code hl_class" href="class_vec3.html">Vec3Arg</a> inScale, <a class="code hl_class" href="class_color.html">ColorArg</a> inColor, <span class="keywordtype">bool</span> inUseMaterialColors, <span class="keywordtype">bool</span> inDrawWireframe) <span class="keyword">const override</span>;</div>
  211. <div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> </div>
  212. <div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span> <span class="comment">// See Shape::DrawGetSupportFunction</span></div>
  213. <div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> DrawGetSupportFunction(<a class="code hl_class" href="class_debug_renderer.html">DebugRenderer</a> *inRenderer, <a class="code hl_class" href="class_mat44.html">RMat44Arg</a> inCenterOfMassTransform, <a class="code hl_class" href="class_vec3.html">Vec3Arg</a> inScale, <a class="code hl_class" href="class_color.html">ColorArg</a> inColor, <span class="keywordtype">bool</span> inDrawSupportDirection) <span class="keyword">const override</span>;</div>
  214. <div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span> </div>
  215. <div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span> <span class="comment">// See Shape::DrawGetSupportingFace</span></div>
  216. <div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> DrawGetSupportingFace(<a class="code hl_class" href="class_debug_renderer.html">DebugRenderer</a> *inRenderer, <a class="code hl_class" href="class_mat44.html">RMat44Arg</a> inCenterOfMassTransform, <a class="code hl_class" href="class_vec3.html">Vec3Arg</a> inScale) <span class="keyword">const override</span>;</div>
  217. <div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span><span class="preprocessor">#endif </span><span class="comment">// JPH_DEBUG_RENDERER</span></div>
  218. <div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span> </div>
  219. <div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span> <span class="comment">// See: Shape::CollideSoftBodyVertices</span></div>
  220. <div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> CollideSoftBodyVertices(<a class="code hl_class" href="class_mat44.html">Mat44Arg</a> inCenterOfMassTransform, <a class="code hl_class" href="class_vec3.html">Vec3Arg</a> inScale, <span class="keyword">const</span> <a class="code hl_class" href="class_collide_soft_body_vertex_iterator.html">CollideSoftBodyVertexIterator</a> &amp;inVertices, <a class="code hl_typedef" href="_core_8h.html#a69aa29b598b851b0640aa225a9e5d61d">uint</a> inNumVertices, <span class="keywordtype">int</span> inCollidingShapeIndex) <span class="keyword">const override</span>;</div>
  221. <div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span> </div>
  222. <div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span> <span class="comment">// See Shape::TransformShape</span></div>
  223. <div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> TransformShape(<a class="code hl_class" href="class_mat44.html">Mat44Arg</a> inCenterOfMassTransform, <a class="code hl_class" href="class_collision_collector.html">TransformedShapeCollector</a> &amp;ioCollector) <span class="keyword">const override</span>;</div>
  224. <div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span> </div>
  225. <div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span> <span class="comment">// See Shape::GetTrianglesStart</span></div>
  226. <div class="line"><a id="l00122" name="l00122"></a><span class="lineno"><a class="line" href="class_compound_shape.html#a1e3571fbe4835d1bfec50d9d7a1a2b1f"> 122</a></span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code hl_function" href="class_compound_shape.html#a1e3571fbe4835d1bfec50d9d7a1a2b1f">GetTrianglesStart</a>(<a class="code hl_struct" href="struct_shape_1_1_get_triangles_context.html">GetTrianglesContext</a> &amp;ioContext, <span class="keyword">const</span> <a class="code hl_class" href="class_a_a_box.html">AABox</a> &amp;inBox, <a class="code hl_class" href="class_vec3.html">Vec3Arg</a> inPositionCOM, <a class="code hl_class" href="class_quat.html">QuatArg</a> inRotation, <a class="code hl_class" href="class_vec3.html">Vec3Arg</a> inScale)<span class="keyword"> const override </span>{ <a class="code hl_define" href="_issue_reporting_8h.html#aaf6b1df827e11b7ca5f6f8778bd8f8cd">JPH_ASSERT</a>(<span class="keyword">false</span>, <span class="stringliteral">&quot;Cannot call on non-leaf shapes, use CollectTransformedShapes to collect the leaves first!&quot;</span>); }</div>
  227. <div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span> </div>
  228. <div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span> <span class="comment">// See Shape::GetTrianglesNext</span></div>
  229. <div class="line"><a id="l00125" name="l00125"></a><span class="lineno"><a class="line" href="class_compound_shape.html#a86dbc7e794fdf43a39fed13e60731a0b"> 125</a></span> <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code hl_function" href="class_compound_shape.html#a86dbc7e794fdf43a39fed13e60731a0b">GetTrianglesNext</a>(<a class="code hl_struct" href="struct_shape_1_1_get_triangles_context.html">GetTrianglesContext</a> &amp;ioContext, <span class="keywordtype">int</span> inMaxTrianglesRequested, <a class="code hl_class" href="class_float3.html">Float3</a> *outTriangleVertices, <span class="keyword">const</span> <a class="code hl_class" href="class_physics_material.html">PhysicsMaterial</a> **outMaterials = <span class="keyword">nullptr</span>)<span class="keyword"> const override </span>{ <a class="code hl_define" href="_issue_reporting_8h.html#aaf6b1df827e11b7ca5f6f8778bd8f8cd">JPH_ASSERT</a>(<span class="keyword">false</span>, <span class="stringliteral">&quot;Cannot call on non-leaf shapes, use CollectTransformedShapes to collect the leaves first!&quot;</span>); <span class="keywordflow">return</span> 0; }</div>
  230. <div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span> </div>
  231. <div class="line"><a id="l00132" name="l00132"></a><span class="lineno"><a class="line" href="class_compound_shape.html#abe5c3a8558c840abba213a6a48149f85"> 132</a></span> <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code hl_function" href="class_compound_shape.html#abe5c3a8558c840abba213a6a48149f85">GetIntersectingSubShapes</a>(<span class="keyword">const</span> <a class="code hl_class" href="class_a_a_box.html">AABox</a> &amp;inBox, <a class="code hl_typedef" href="_core_8h.html#a69aa29b598b851b0640aa225a9e5d61d">uint</a> *outSubShapeIndices, <span class="keywordtype">int</span> inMaxSubShapeIndices) <span class="keyword">const</span> = 0;</div>
  232. <div class="line"><a id="l00133" name="l00133"></a><span class="lineno"> 133</span> </div>
  233. <div class="line"><a id="l00139" name="l00139"></a><span class="lineno"><a class="line" href="class_compound_shape.html#a3f38b90e13eccc4d52de7bbc2cbcb9aa"> 139</a></span> <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code hl_function" href="class_compound_shape.html#a3f38b90e13eccc4d52de7bbc2cbcb9aa">GetIntersectingSubShapes</a>(<span class="keyword">const</span> <a class="code hl_class" href="class_oriented_box.html">OrientedBox</a> &amp;inBox, <a class="code hl_typedef" href="_core_8h.html#a69aa29b598b851b0640aa225a9e5d61d">uint</a> *outSubShapeIndices, <span class="keywordtype">int</span> inMaxSubShapeIndices) <span class="keyword">const</span> = 0;</div>
  234. <div class="line"><a id="l00140" name="l00140"></a><span class="lineno"> 140</span> </div>
  235. <div class="foldopen" id="foldopen00141" data-start="{" data-end="};">
  236. <div class="line"><a id="l00141" name="l00141"></a><span class="lineno"><a class="line" href="struct_compound_shape_1_1_sub_shape.html"> 141</a></span> <span class="keyword">struct </span><a class="code hl_struct" href="struct_compound_shape_1_1_sub_shape.html">SubShape</a></div>
  237. <div class="line"><a id="l00142" name="l00142"></a><span class="lineno"> 142</span> {</div>
  238. <div class="foldopen" id="foldopen00147" data-start="{" data-end="}">
  239. <div class="line"><a id="l00147" name="l00147"></a><span class="lineno"><a class="line" href="struct_compound_shape_1_1_sub_shape.html#a2ea825bfb79c5d059768e60d7b8997d2"> 147</a></span> <span class="keywordtype">bool</span> <a class="code hl_function" href="struct_compound_shape_1_1_sub_shape.html#a2ea825bfb79c5d059768e60d7b8997d2">FromSettings</a>(<span class="keyword">const</span> <a class="code hl_struct" href="struct_compound_shape_settings_1_1_sub_shape_settings.html">CompoundShapeSettings::SubShapeSettings</a> &amp;inSettings, <a class="code hl_class" href="class_result.html">ShapeResult</a> &amp;outResult)</div>
  240. <div class="line"><a id="l00148" name="l00148"></a><span class="lineno"> 148</span> {</div>
  241. <div class="line"><a id="l00149" name="l00149"></a><span class="lineno"> 149</span> <span class="keywordflow">if</span> (inSettings.<a class="code hl_variable" href="struct_compound_shape_settings_1_1_sub_shape_settings.html#ae1a012a16565000879fbe836e22c5a07">mShapePtr</a> != <span class="keyword">nullptr</span>)</div>
  242. <div class="line"><a id="l00150" name="l00150"></a><span class="lineno"> 150</span> {</div>
  243. <div class="line"><a id="l00151" name="l00151"></a><span class="lineno"> 151</span> <span class="comment">// Use provided shape</span></div>
  244. <div class="line"><a id="l00152" name="l00152"></a><span class="lineno"> 152</span> mShape = inSettings.<a class="code hl_variable" href="struct_compound_shape_settings_1_1_sub_shape_settings.html#ae1a012a16565000879fbe836e22c5a07">mShapePtr</a>;</div>
  245. <div class="line"><a id="l00153" name="l00153"></a><span class="lineno"> 153</span> }</div>
  246. <div class="line"><a id="l00154" name="l00154"></a><span class="lineno"> 154</span> <span class="keywordflow">else</span></div>
  247. <div class="line"><a id="l00155" name="l00155"></a><span class="lineno"> 155</span> {</div>
  248. <div class="line"><a id="l00156" name="l00156"></a><span class="lineno"> 156</span> <span class="comment">// Create child shape</span></div>
  249. <div class="line"><a id="l00157" name="l00157"></a><span class="lineno"> 157</span> <a class="code hl_class" href="class_result.html">ShapeResult</a> child_result = inSettings.<a class="code hl_variable" href="struct_compound_shape_settings_1_1_sub_shape_settings.html#aa79a4e31ee31e2d2760a15e01de76a71">mShape</a>-&gt;<a class="code hl_function" href="class_shape_settings.html#a21e53b5758542a5527c7941d61d838fa">Create</a>();</div>
  250. <div class="line"><a id="l00158" name="l00158"></a><span class="lineno"> 158</span> <span class="keywordflow">if</span> (!child_result.<a class="code hl_function" href="class_result.html#a06b7e3b8ea77cb4b1fc5ecfa45494167">IsValid</a>())</div>
  251. <div class="line"><a id="l00159" name="l00159"></a><span class="lineno"> 159</span> {</div>
  252. <div class="line"><a id="l00160" name="l00160"></a><span class="lineno"> 160</span> outResult = child_result;</div>
  253. <div class="line"><a id="l00161" name="l00161"></a><span class="lineno"> 161</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
  254. <div class="line"><a id="l00162" name="l00162"></a><span class="lineno"> 162</span> }</div>
  255. <div class="line"><a id="l00163" name="l00163"></a><span class="lineno"> 163</span> mShape = child_result.<a class="code hl_function" href="class_result.html#ab3d845db638a6a51467760867bfc472a">Get</a>();</div>
  256. <div class="line"><a id="l00164" name="l00164"></a><span class="lineno"> 164</span> }</div>
  257. <div class="line"><a id="l00165" name="l00165"></a><span class="lineno"> 165</span> </div>
  258. <div class="line"><a id="l00166" name="l00166"></a><span class="lineno"> 166</span> <span class="comment">// Copy user data</span></div>
  259. <div class="line"><a id="l00167" name="l00167"></a><span class="lineno"> 167</span> mUserData = inSettings.<a class="code hl_variable" href="struct_compound_shape_settings_1_1_sub_shape_settings.html#a05791518abbef530de3bc631efa4d8dc">mUserData</a>;</div>
  260. <div class="line"><a id="l00168" name="l00168"></a><span class="lineno"> 168</span> </div>
  261. <div class="line"><a id="l00169" name="l00169"></a><span class="lineno"> 169</span> SetTransform(inSettings.<a class="code hl_variable" href="struct_compound_shape_settings_1_1_sub_shape_settings.html#aaf84c1bfaed3898a81e184c11d05988d">mPosition</a>, inSettings.<a class="code hl_variable" href="struct_compound_shape_settings_1_1_sub_shape_settings.html#a865bfef885778f2221f8a4dccf0e941e">mRotation</a>, <a class="code hl_function" href="class_vec3.html#ad03c52ab27761bc1e64e33c47632ba51">Vec3::sZero</a>() <span class="comment">/* Center of mass not yet calculated */</span>);</div>
  262. <div class="line"><a id="l00170" name="l00170"></a><span class="lineno"> 170</span> <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
  263. <div class="line"><a id="l00171" name="l00171"></a><span class="lineno"> 171</span> }</div>
  264. </div>
  265. <div class="line"><a id="l00172" name="l00172"></a><span class="lineno"> 172</span> </div>
  266. <div class="foldopen" id="foldopen00177" data-start="{" data-end="}">
  267. <div class="line"><a id="l00177" name="l00177"></a><span class="lineno"><a class="line" href="struct_compound_shape_1_1_sub_shape.html#a3805d809932e3f0d94a3b87e297a47bc"> 177</a></span> JPH_INLINE <span class="keywordtype">void</span> <a class="code hl_function" href="struct_compound_shape_1_1_sub_shape.html#a3805d809932e3f0d94a3b87e297a47bc">SetTransform</a>(<a class="code hl_class" href="class_vec3.html">Vec3Arg</a> inPosition, <a class="code hl_class" href="class_quat.html">QuatArg</a> inRotation, <a class="code hl_class" href="class_vec3.html">Vec3Arg</a> inCenterOfMass)</div>
  268. <div class="line"><a id="l00178" name="l00178"></a><span class="lineno"> 178</span> {</div>
  269. <div class="line"><a id="l00179" name="l00179"></a><span class="lineno"> 179</span> SetPositionCOM(inPosition - inCenterOfMass + inRotation * mShape-&gt;GetCenterOfMass());</div>
  270. <div class="line"><a id="l00180" name="l00180"></a><span class="lineno"> 180</span> </div>
  271. <div class="line"><a id="l00181" name="l00181"></a><span class="lineno"> 181</span> mIsRotationIdentity = inRotation.<a class="code hl_function" href="class_quat.html#a9c0afa78ae80b13a6c8adf1240a7c95e">IsClose</a>(<a class="code hl_function" href="class_quat.html#a73a43fe262fbbbc0b1872d238b972794">Quat::sIdentity</a>()) || inRotation.<a class="code hl_function" href="class_quat.html#a9c0afa78ae80b13a6c8adf1240a7c95e">IsClose</a>(-<a class="code hl_function" href="class_quat.html#a73a43fe262fbbbc0b1872d238b972794">Quat::sIdentity</a>());</div>
  272. <div class="line"><a id="l00182" name="l00182"></a><span class="lineno"> 182</span> SetRotation(mIsRotationIdentity? <a class="code hl_function" href="class_quat.html#a73a43fe262fbbbc0b1872d238b972794">Quat::sIdentity</a>() : inRotation);</div>
  273. <div class="line"><a id="l00183" name="l00183"></a><span class="lineno"> 183</span> }</div>
  274. </div>
  275. <div class="line"><a id="l00184" name="l00184"></a><span class="lineno"> 184</span> </div>
  276. <div class="foldopen" id="foldopen00188" data-start="{" data-end="}">
  277. <div class="line"><a id="l00188" name="l00188"></a><span class="lineno"><a class="line" href="struct_compound_shape_1_1_sub_shape.html#a18ba22cc1d5ad095bce61a7fcfcbcc25"> 188</a></span> JPH_INLINE <a class="code hl_class" href="class_mat44.html">Mat44</a> <a class="code hl_function" href="struct_compound_shape_1_1_sub_shape.html#a18ba22cc1d5ad095bce61a7fcfcbcc25">GetLocalTransformNoScale</a>(<a class="code hl_class" href="class_vec3.html">Vec3Arg</a> inScale)<span class="keyword"> const</span></div>
  278. <div class="line"><a id="l00189" name="l00189"></a><span class="lineno"> 189</span><span class="keyword"> </span>{</div>
  279. <div class="line"><a id="l00190" name="l00190"></a><span class="lineno"> 190</span> <a class="code hl_define" href="_issue_reporting_8h.html#aaf6b1df827e11b7ca5f6f8778bd8f8cd">JPH_ASSERT</a>(IsValidScale(inScale));</div>
  280. <div class="line"><a id="l00191" name="l00191"></a><span class="lineno"> 191</span> <span class="keywordflow">return</span> <a class="code hl_function" href="class_mat44.html#aba5427f45393b40263d52ec614cfa985">Mat44::sRotationTranslation</a>(GetRotation(), inScale * GetPositionCOM());</div>
  281. <div class="line"><a id="l00192" name="l00192"></a><span class="lineno"> 192</span> }</div>
  282. </div>
  283. <div class="line"><a id="l00193" name="l00193"></a><span class="lineno"> 193</span> </div>
  284. <div class="foldopen" id="foldopen00195" data-start="{" data-end="}">
  285. <div class="line"><a id="l00195" name="l00195"></a><span class="lineno"><a class="line" href="struct_compound_shape_1_1_sub_shape.html#a33448959f96311ef875a912b8a104dcf"> 195</a></span> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="struct_compound_shape_1_1_sub_shape.html#a33448959f96311ef875a912b8a104dcf">IsValidScale</a>(<a class="code hl_class" href="class_vec3.html">Vec3Arg</a> inScale)<span class="keyword"> const</span></div>
  286. <div class="line"><a id="l00196" name="l00196"></a><span class="lineno"> 196</span><span class="keyword"> </span>{</div>
  287. <div class="line"><a id="l00197" name="l00197"></a><span class="lineno"> 197</span> <span class="comment">// We can always handle uniform scale or identity rotations</span></div>
  288. <div class="line"><a id="l00198" name="l00198"></a><span class="lineno"> 198</span> <span class="keywordflow">if</span> (mIsRotationIdentity || <a class="code hl_function" href="namespace_scale_helpers.html#a8ff2f9310527acbb4b02a00150fe02fe">ScaleHelpers::IsUniformScale</a>(inScale))</div>
  289. <div class="line"><a id="l00199" name="l00199"></a><span class="lineno"> 199</span> <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
  290. <div class="line"><a id="l00200" name="l00200"></a><span class="lineno"> 200</span> </div>
  291. <div class="line"><a id="l00201" name="l00201"></a><span class="lineno"> 201</span> <span class="keywordflow">return</span> <a class="code hl_function" href="namespace_scale_helpers.html#a024fa9a3c672218ce6b7aaa97d953ae1">ScaleHelpers::CanScaleBeRotated</a>(GetRotation(), inScale);</div>
  292. <div class="line"><a id="l00202" name="l00202"></a><span class="lineno"> 202</span> }</div>
  293. </div>
  294. <div class="line"><a id="l00203" name="l00203"></a><span class="lineno"> 203</span> </div>
  295. <div class="foldopen" id="foldopen00205" data-start="{" data-end="}">
  296. <div class="line"><a id="l00205" name="l00205"></a><span class="lineno"><a class="line" href="struct_compound_shape_1_1_sub_shape.html#a92de7326e077355d680f2d6ce860d7fc"> 205</a></span> <span class="keyword">inline</span> <a class="code hl_class" href="class_vec3.html">Vec3</a> <a class="code hl_function" href="struct_compound_shape_1_1_sub_shape.html#a92de7326e077355d680f2d6ce860d7fc">TransformScale</a>(<a class="code hl_class" href="class_vec3.html">Vec3Arg</a> inScale)<span class="keyword"> const</span></div>
  297. <div class="line"><a id="l00206" name="l00206"></a><span class="lineno"> 206</span><span class="keyword"> </span>{</div>
  298. <div class="line"><a id="l00207" name="l00207"></a><span class="lineno"> 207</span> <span class="comment">// We don&#39;t need to transform uniform scale or if the rotation is identity</span></div>
  299. <div class="line"><a id="l00208" name="l00208"></a><span class="lineno"> 208</span> <span class="keywordflow">if</span> (mIsRotationIdentity || <a class="code hl_function" href="namespace_scale_helpers.html#a8ff2f9310527acbb4b02a00150fe02fe">ScaleHelpers::IsUniformScale</a>(inScale))</div>
  300. <div class="line"><a id="l00209" name="l00209"></a><span class="lineno"> 209</span> <span class="keywordflow">return</span> inScale;</div>
  301. <div class="line"><a id="l00210" name="l00210"></a><span class="lineno"> 210</span> </div>
  302. <div class="line"><a id="l00211" name="l00211"></a><span class="lineno"> 211</span> <span class="keywordflow">return</span> <a class="code hl_function" href="namespace_scale_helpers.html#a317905196055a0a720d6468cbb4840b9">ScaleHelpers::RotateScale</a>(GetRotation(), inScale);</div>
  303. <div class="line"><a id="l00212" name="l00212"></a><span class="lineno"> 212</span> }</div>
  304. </div>
  305. <div class="line"><a id="l00213" name="l00213"></a><span class="lineno"> 213</span> </div>
  306. <div class="foldopen" id="foldopen00215" data-start="{" data-end="}">
  307. <div class="line"><a id="l00215" name="l00215"></a><span class="lineno"><a class="line" href="struct_compound_shape_1_1_sub_shape.html#ad02db108fee2f4caeb4d2709a4f14671"> 215</a></span> JPH_INLINE <span class="keywordtype">void</span> <a class="code hl_function" href="struct_compound_shape_1_1_sub_shape.html#ad02db108fee2f4caeb4d2709a4f14671">SetPositionCOM</a>(<a class="code hl_class" href="class_vec3.html">Vec3Arg</a> inPositionCOM)</div>
  308. <div class="line"><a id="l00216" name="l00216"></a><span class="lineno"> 216</span> {</div>
  309. <div class="line"><a id="l00217" name="l00217"></a><span class="lineno"> 217</span> inPositionCOM.<a class="code hl_function" href="class_vec3.html#ab22c62c48d2de13947c0cd3413018364">StoreFloat3</a>(&amp;mPositionCOM);</div>
  310. <div class="line"><a id="l00218" name="l00218"></a><span class="lineno"> 218</span> }</div>
  311. </div>
  312. <div class="line"><a id="l00219" name="l00219"></a><span class="lineno"> 219</span> </div>
  313. <div class="foldopen" id="foldopen00221" data-start="{" data-end="}">
  314. <div class="line"><a id="l00221" name="l00221"></a><span class="lineno"><a class="line" href="struct_compound_shape_1_1_sub_shape.html#ac3fea8705474011f4f5681c18fcdaaa2"> 221</a></span> JPH_INLINE <a class="code hl_class" href="class_vec3.html">Vec3</a> <a class="code hl_function" href="struct_compound_shape_1_1_sub_shape.html#ac3fea8705474011f4f5681c18fcdaaa2">GetPositionCOM</a>()<span class="keyword"> const</span></div>
  315. <div class="line"><a id="l00222" name="l00222"></a><span class="lineno"> 222</span><span class="keyword"> </span>{</div>
  316. <div class="line"><a id="l00223" name="l00223"></a><span class="lineno"> 223</span> <span class="keywordflow">return</span> <a class="code hl_function" href="class_vec3.html#aea30fe731618ffa249ecdcba2c66ab4e">Vec3::sLoadFloat3Unsafe</a>(mPositionCOM);</div>
  317. <div class="line"><a id="l00224" name="l00224"></a><span class="lineno"> 224</span> }</div>
  318. </div>
  319. <div class="line"><a id="l00225" name="l00225"></a><span class="lineno"> 225</span> </div>
  320. <div class="foldopen" id="foldopen00227" data-start="{" data-end="}">
  321. <div class="line"><a id="l00227" name="l00227"></a><span class="lineno"><a class="line" href="struct_compound_shape_1_1_sub_shape.html#aeb79df4468aca72a42c1c8dd68f564c1"> 227</a></span> JPH_INLINE <span class="keywordtype">void</span> <a class="code hl_function" href="struct_compound_shape_1_1_sub_shape.html#aeb79df4468aca72a42c1c8dd68f564c1">SetRotation</a>(<a class="code hl_class" href="class_quat.html">QuatArg</a> inRotation)</div>
  322. <div class="line"><a id="l00228" name="l00228"></a><span class="lineno"> 228</span> {</div>
  323. <div class="line"><a id="l00229" name="l00229"></a><span class="lineno"> 229</span> inRotation.<a class="code hl_function" href="class_quat.html#ae95e7b6c9f4167b91b674a696c681c6e">StoreFloat3</a>(&amp;mRotation);</div>
  324. <div class="line"><a id="l00230" name="l00230"></a><span class="lineno"> 230</span> }</div>
  325. </div>
  326. <div class="line"><a id="l00231" name="l00231"></a><span class="lineno"> 231</span> </div>
  327. <div class="foldopen" id="foldopen00233" data-start="{" data-end="}">
  328. <div class="line"><a id="l00233" name="l00233"></a><span class="lineno"><a class="line" href="struct_compound_shape_1_1_sub_shape.html#a13d700b0e7064e9ecdf99afdc0262eae"> 233</a></span> JPH_INLINE <a class="code hl_class" href="class_quat.html">Quat</a> <a class="code hl_function" href="struct_compound_shape_1_1_sub_shape.html#a13d700b0e7064e9ecdf99afdc0262eae">GetRotation</a>()<span class="keyword"> const</span></div>
  329. <div class="line"><a id="l00234" name="l00234"></a><span class="lineno"> 234</span><span class="keyword"> </span>{</div>
  330. <div class="line"><a id="l00235" name="l00235"></a><span class="lineno"> 235</span> <span class="keywordflow">return</span> mIsRotationIdentity? <a class="code hl_function" href="class_quat.html#a73a43fe262fbbbc0b1872d238b972794">Quat::sIdentity</a>() : <a class="code hl_function" href="class_quat.html#a60c11537faec1e7517a957f02afc4b6d">Quat::sLoadFloat3Unsafe</a>(mRotation);</div>
  331. <div class="line"><a id="l00236" name="l00236"></a><span class="lineno"> 236</span> }</div>
  332. </div>
  333. <div class="line"><a id="l00237" name="l00237"></a><span class="lineno"> 237</span> </div>
  334. <div class="line"><a id="l00238" name="l00238"></a><span class="lineno"><a class="line" href="struct_compound_shape_1_1_sub_shape.html#af0e288762fbe4fcdec676ce1836d5375"> 238</a></span> <a class="code hl_class" href="class_ref_const.html">RefConst&lt;Shape&gt;</a> <a class="code hl_variable" href="struct_compound_shape_1_1_sub_shape.html#af0e288762fbe4fcdec676ce1836d5375">mShape</a>;</div>
  335. <div class="line"><a id="l00239" name="l00239"></a><span class="lineno"><a class="line" href="struct_compound_shape_1_1_sub_shape.html#a16bb59f7313e95ee322d576f5d2d85a7"> 239</a></span> <a class="code hl_class" href="class_float3.html">Float3</a> <a class="code hl_variable" href="struct_compound_shape_1_1_sub_shape.html#a16bb59f7313e95ee322d576f5d2d85a7">mPositionCOM</a>; </div>
  336. <div class="line"><a id="l00240" name="l00240"></a><span class="lineno"><a class="line" href="struct_compound_shape_1_1_sub_shape.html#a42a1dc09f0d3bd15367f87d26452bd44"> 240</a></span> <a class="code hl_class" href="class_float3.html">Float3</a> <a class="code hl_variable" href="struct_compound_shape_1_1_sub_shape.html#a42a1dc09f0d3bd15367f87d26452bd44">mRotation</a>; </div>
  337. <div class="line"><a id="l00241" name="l00241"></a><span class="lineno"><a class="line" href="struct_compound_shape_1_1_sub_shape.html#a8528ca1f6ee3908b418283517762bd57"> 241</a></span> <a class="code hl_typedef" href="_core_8h.html#a8f95e75e58492e87412191fabadd8ca8">uint32</a> <a class="code hl_variable" href="struct_compound_shape_1_1_sub_shape.html#a8528ca1f6ee3908b418283517762bd57">mUserData</a>; </div>
  338. <div class="line"><a id="l00242" name="l00242"></a><span class="lineno"><a class="line" href="struct_compound_shape_1_1_sub_shape.html#a25c797febba76594f53b5303867fe0fb"> 242</a></span> <span class="keywordtype">bool</span> <a class="code hl_variable" href="struct_compound_shape_1_1_sub_shape.html#a25c797febba76594f53b5303867fe0fb">mIsRotationIdentity</a>; </div>
  339. <div class="line"><a id="l00243" name="l00243"></a><span class="lineno"> 243</span> <span class="comment">// 3 padding bytes left</span></div>
  340. <div class="line"><a id="l00244" name="l00244"></a><span class="lineno"> 244</span> };</div>
  341. </div>
  342. <div class="line"><a id="l00245" name="l00245"></a><span class="lineno"> 245</span> </div>
  343. <div class="line"><a id="l00246" name="l00246"></a><span class="lineno"> 246</span> <span class="keyword">static_assert</span>(<span class="keyword">sizeof</span>(<a class="code hl_struct" href="struct_compound_shape_1_1_sub_shape.html">SubShape</a>) == (<span class="keyword">sizeof</span>(<span class="keywordtype">void</span> *) == 8? 40 : 36), <span class="stringliteral">&quot;Compiler added unexpected padding&quot;</span>);</div>
  344. <div class="line"><a id="l00247" name="l00247"></a><span class="lineno"> 247</span> </div>
  345. <div class="line"><a id="l00248" name="l00248"></a><span class="lineno"><a class="line" href="class_compound_shape.html#a55fbd4f496242427b0e62d788a597e5b"> 248</a></span> <span class="keyword">using </span><a class="code hl_class" href="class_array.html">SubShapes</a> = <a class="code hl_class" href="class_array.html">Array&lt;SubShape&gt;</a>;</div>
  346. <div class="line"><a id="l00249" name="l00249"></a><span class="lineno"> 249</span> </div>
  347. <div class="line"><a id="l00251" name="l00251"></a><span class="lineno"><a class="line" href="class_compound_shape.html#a3c4efdc6b41fc47e604ee8154425a80a"> 251</a></span> <span class="keyword">const</span> <a class="code hl_class" href="class_array.html">SubShapes</a> &amp; <a class="code hl_function" href="class_compound_shape.html#a3c4efdc6b41fc47e604ee8154425a80a">GetSubShapes</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> mSubShapes; }</div>
  348. <div class="line"><a id="l00252" name="l00252"></a><span class="lineno"> 252</span> </div>
  349. <div class="line"><a id="l00254" name="l00254"></a><span class="lineno"><a class="line" href="class_compound_shape.html#abe1e5333a667ccd80b6146b951abf918"> 254</a></span> <a class="code hl_typedef" href="_core_8h.html#a69aa29b598b851b0640aa225a9e5d61d">uint</a> <a class="code hl_function" href="class_compound_shape.html#abe1e5333a667ccd80b6146b951abf918">GetNumSubShapes</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code hl_typedef" href="_core_8h.html#a69aa29b598b851b0640aa225a9e5d61d">uint</a>(mSubShapes.<a class="code hl_function" href="class_array.html#a9d2ab10879978f2c32e760a92fa0d585">size</a>()); }</div>
  350. <div class="line"><a id="l00255" name="l00255"></a><span class="lineno"> 255</span> </div>
  351. <div class="line"><a id="l00257" name="l00257"></a><span class="lineno"><a class="line" href="class_compound_shape.html#af70b012c88d2bedfb9541d40e6e46fb2"> 257</a></span> <span class="keyword">const</span> <a class="code hl_struct" href="struct_compound_shape_1_1_sub_shape.html">SubShape</a> &amp; <a class="code hl_function" href="class_compound_shape.html#af70b012c88d2bedfb9541d40e6e46fb2">GetSubShape</a>(<a class="code hl_typedef" href="_core_8h.html#a69aa29b598b851b0640aa225a9e5d61d">uint</a> inIdx)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> mSubShapes[inIdx]; }</div>
  352. <div class="line"><a id="l00258" name="l00258"></a><span class="lineno"> 258</span> </div>
  353. <div class="line"><a id="l00260" name="l00260"></a><span class="lineno"><a class="line" href="class_compound_shape.html#a596eae9a25f8ed13ac35f2a58b318368"> 260</a></span> <a class="code hl_typedef" href="_core_8h.html#a8f95e75e58492e87412191fabadd8ca8">uint32</a> <a class="code hl_function" href="class_compound_shape.html#a596eae9a25f8ed13ac35f2a58b318368">GetCompoundUserData</a>(<a class="code hl_typedef" href="_core_8h.html#a69aa29b598b851b0640aa225a9e5d61d">uint</a> inIdx)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> mSubShapes[inIdx].mUserData; }</div>
  354. <div class="line"><a id="l00261" name="l00261"></a><span class="lineno"> 261</span> </div>
  355. <div class="line"><a id="l00263" name="l00263"></a><span class="lineno"><a class="line" href="class_compound_shape.html#a79a6d4592f894bfc0ed0496bdce68e98"> 263</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="class_compound_shape.html#a79a6d4592f894bfc0ed0496bdce68e98">SetCompoundUserData</a>(<a class="code hl_typedef" href="_core_8h.html#a69aa29b598b851b0640aa225a9e5d61d">uint</a> inIdx, <a class="code hl_typedef" href="_core_8h.html#a8f95e75e58492e87412191fabadd8ca8">uint32</a> inUserData) { mSubShapes[inIdx].mUserData = inUserData; }</div>
  356. <div class="line"><a id="l00264" name="l00264"></a><span class="lineno"> 264</span> </div>
  357. <div class="foldopen" id="foldopen00268" data-start="{" data-end="}">
  358. <div class="line"><a id="l00268" name="l00268"></a><span class="lineno"><a class="line" href="class_compound_shape.html#a3fd5589e3e33b94b8c112393b431152b"> 268</a></span> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="class_compound_shape.html#a3fd5589e3e33b94b8c112393b431152b">IsSubShapeIDValid</a>(<a class="code hl_class" href="class_sub_shape_i_d.html">SubShapeID</a> inSubShapeID)<span class="keyword"> const</span></div>
  359. <div class="line"><a id="l00269" name="l00269"></a><span class="lineno"> 269</span><span class="keyword"> </span>{</div>
  360. <div class="line"><a id="l00270" name="l00270"></a><span class="lineno"> 270</span> <a class="code hl_class" href="class_sub_shape_i_d.html">SubShapeID</a> remainder;</div>
  361. <div class="line"><a id="l00271" name="l00271"></a><span class="lineno"> 271</span> <span class="keywordflow">return</span> inSubShapeID.<a class="code hl_function" href="class_sub_shape_i_d.html#a8f78ff809c7af2dfbd2e61ba2314ca9d">PopID</a>(GetSubShapeIDBits(), remainder) &lt; mSubShapes.<a class="code hl_function" href="class_array.html#a9d2ab10879978f2c32e760a92fa0d585">size</a>();</div>
  362. <div class="line"><a id="l00272" name="l00272"></a><span class="lineno"> 272</span> }</div>
  363. </div>
  364. <div class="line"><a id="l00273" name="l00273"></a><span class="lineno"> 273</span> </div>
  365. <div class="foldopen" id="foldopen00278" data-start="{" data-end="}">
  366. <div class="line"><a id="l00278" name="l00278"></a><span class="lineno"><a class="line" href="class_compound_shape.html#a6ff804957bb05620ab762532d2f2ab3d"> 278</a></span> <span class="keyword">inline</span> <a class="code hl_typedef" href="_core_8h.html#a8f95e75e58492e87412191fabadd8ca8">uint32</a> <a class="code hl_function" href="class_compound_shape.html#a6ff804957bb05620ab762532d2f2ab3d">GetSubShapeIndexFromID</a>(<a class="code hl_class" href="class_sub_shape_i_d.html">SubShapeID</a> inSubShapeID, <a class="code hl_class" href="class_sub_shape_i_d.html">SubShapeID</a> &amp;outRemainder)<span class="keyword"> const</span></div>
  367. <div class="line"><a id="l00279" name="l00279"></a><span class="lineno"> 279</span><span class="keyword"> </span>{</div>
  368. <div class="line"><a id="l00280" name="l00280"></a><span class="lineno"> 280</span> <a class="code hl_typedef" href="_core_8h.html#a8f95e75e58492e87412191fabadd8ca8">uint32</a> idx = inSubShapeID.<a class="code hl_function" href="class_sub_shape_i_d.html#a8f78ff809c7af2dfbd2e61ba2314ca9d">PopID</a>(GetSubShapeIDBits(), outRemainder);</div>
  369. <div class="line"><a id="l00281" name="l00281"></a><span class="lineno"> 281</span> <a class="code hl_define" href="_issue_reporting_8h.html#aaf6b1df827e11b7ca5f6f8778bd8f8cd">JPH_ASSERT</a>(idx &lt; mSubShapes.<a class="code hl_function" href="class_array.html#a9d2ab10879978f2c32e760a92fa0d585">size</a>(), <span class="stringliteral">&quot;Invalid SubShapeID&quot;</span>);</div>
  370. <div class="line"><a id="l00282" name="l00282"></a><span class="lineno"> 282</span> <span class="keywordflow">return</span> idx;</div>
  371. <div class="line"><a id="l00283" name="l00283"></a><span class="lineno"> 283</span> }</div>
  372. </div>
  373. <div class="line"><a id="l00284" name="l00284"></a><span class="lineno"> 284</span> </div>
  374. <div class="foldopen" id="foldopen00289" data-start="{" data-end="}">
  375. <div class="line"><a id="l00289" name="l00289"></a><span class="lineno"><a class="line" href="class_compound_shape.html#a66ae55d5b737c492d73286dff4615215"> 289</a></span> <span class="keyword">inline</span> <a class="code hl_class" href="class_sub_shape_i_d_creator.html">SubShapeIDCreator</a> <a class="code hl_function" href="class_compound_shape.html#a66ae55d5b737c492d73286dff4615215">GetSubShapeIDFromIndex</a>(<span class="keywordtype">int</span> inIdx, <span class="keyword">const</span> <a class="code hl_class" href="class_sub_shape_i_d_creator.html">SubShapeIDCreator</a> &amp;inParentSubShapeID)<span class="keyword"> const</span></div>
  376. <div class="line"><a id="l00290" name="l00290"></a><span class="lineno"> 290</span><span class="keyword"> </span>{</div>
  377. <div class="line"><a id="l00291" name="l00291"></a><span class="lineno"> 291</span> <span class="keywordflow">return</span> inParentSubShapeID.<a class="code hl_function" href="class_sub_shape_i_d_creator.html#a29997885833b2c9625bcbcba4548273d">PushID</a>(inIdx, GetSubShapeIDBits());</div>
  378. <div class="line"><a id="l00292" name="l00292"></a><span class="lineno"> 292</span> }</div>
  379. </div>
  380. <div class="line"><a id="l00293" name="l00293"></a><span class="lineno"> 293</span> </div>
  381. <div class="line"><a id="l00294" name="l00294"></a><span class="lineno"> 294</span> <span class="comment">// See Shape</span></div>
  382. <div class="line"><a id="l00295" name="l00295"></a><span class="lineno"> 295</span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> SaveBinaryState(<a class="code hl_class" href="class_stream_out.html">StreamOut</a> &amp;inStream) <span class="keyword">const override</span>;</div>
  383. <div class="line"><a id="l00296" name="l00296"></a><span class="lineno"> 296</span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> SaveSubShapeState(<a class="code hl_class" href="class_array.html">ShapeList</a> &amp;outSubShapes) <span class="keyword">const override</span>;</div>
  384. <div class="line"><a id="l00297" name="l00297"></a><span class="lineno"> 297</span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> RestoreSubShapeState(<span class="keyword">const</span> <a class="code hl_class" href="class_ref_const.html">ShapeRefC</a> *inSubShapes, <a class="code hl_typedef" href="_core_8h.html#a69aa29b598b851b0640aa225a9e5d61d">uint</a> inNumShapes) <span class="keyword">override</span>;</div>
  385. <div class="line"><a id="l00298" name="l00298"></a><span class="lineno"> 298</span> </div>
  386. <div class="line"><a id="l00299" name="l00299"></a><span class="lineno"> 299</span> <span class="comment">// See Shape::GetStatsRecursive</span></div>
  387. <div class="line"><a id="l00300" name="l00300"></a><span class="lineno"> 300</span> <span class="keyword">virtual</span> Stats GetStatsRecursive(VisitedShapes &amp;ioVisitedShapes) <span class="keyword">const override</span>;</div>
  388. <div class="line"><a id="l00301" name="l00301"></a><span class="lineno"> 301</span> </div>
  389. <div class="line"><a id="l00302" name="l00302"></a><span class="lineno"> 302</span> <span class="comment">// See Shape::GetVolume</span></div>
  390. <div class="line"><a id="l00303" name="l00303"></a><span class="lineno"> 303</span> <span class="keyword">virtual</span> <span class="keywordtype">float</span> GetVolume() <span class="keyword">const override</span>;</div>
  391. <div class="line"><a id="l00304" name="l00304"></a><span class="lineno"> 304</span> </div>
  392. <div class="line"><a id="l00305" name="l00305"></a><span class="lineno"> 305</span> <span class="comment">// See Shape::IsValidScale</span></div>
  393. <div class="line"><a id="l00306" name="l00306"></a><span class="lineno"> 306</span> <span class="keyword">virtual</span> <span class="keywordtype">bool</span> IsValidScale(<a class="code hl_class" href="class_vec3.html">Vec3Arg</a> inScale) <span class="keyword">const override</span>;</div>
  394. <div class="line"><a id="l00307" name="l00307"></a><span class="lineno"> 307</span> </div>
  395. <div class="line"><a id="l00308" name="l00308"></a><span class="lineno"> 308</span> <span class="comment">// See Shape::MakeScaleValid</span></div>
  396. <div class="line"><a id="l00309" name="l00309"></a><span class="lineno"> 309</span> <span class="keyword">virtual</span> <a class="code hl_class" href="class_vec3.html">Vec3</a> MakeScaleValid(<a class="code hl_class" href="class_vec3.html">Vec3Arg</a> inScale) <span class="keyword">const override</span>;</div>
  397. <div class="line"><a id="l00310" name="l00310"></a><span class="lineno"> 310</span> </div>
  398. <div class="line"><a id="l00311" name="l00311"></a><span class="lineno"> 311</span> <span class="comment">// Register shape functions with the registry</span></div>
  399. <div class="line"><a id="l00312" name="l00312"></a><span class="lineno"> 312</span> <span class="keyword">static</span> <span class="keywordtype">void</span> sRegister();</div>
  400. <div class="line"><a id="l00313" name="l00313"></a><span class="lineno"> 313</span> </div>
  401. <div class="line"><a id="l00314" name="l00314"></a><span class="lineno"> 314</span><span class="keyword">protected</span>:</div>
  402. <div class="line"><a id="l00315" name="l00315"></a><span class="lineno"> 315</span> <span class="comment">// See: Shape::RestoreBinaryState</span></div>
  403. <div class="line"><a id="l00316" name="l00316"></a><span class="lineno"> 316</span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> RestoreBinaryState(<a class="code hl_class" href="class_stream_in.html">StreamIn</a> &amp;inStream) <span class="keyword">override</span>;</div>
  404. <div class="line"><a id="l00317" name="l00317"></a><span class="lineno"> 317</span> </div>
  405. <div class="line"><a id="l00318" name="l00318"></a><span class="lineno"> 318</span> <span class="comment">// Visitors for collision detection</span></div>
  406. <div class="line"><a id="l00319" name="l00319"></a><span class="lineno"> 319</span> <span class="keyword">struct </span>CastRayVisitor;</div>
  407. <div class="line"><a id="l00320" name="l00320"></a><span class="lineno"> 320</span> <span class="keyword">struct </span>CastRayVisitorCollector;</div>
  408. <div class="line"><a id="l00321" name="l00321"></a><span class="lineno"> 321</span> <span class="keyword">struct </span>CollidePointVisitor;</div>
  409. <div class="line"><a id="l00322" name="l00322"></a><span class="lineno"> 322</span> <span class="keyword">struct </span>CastShapeVisitor;</div>
  410. <div class="line"><a id="l00323" name="l00323"></a><span class="lineno"> 323</span> <span class="keyword">struct </span>CollectTransformedShapesVisitor;</div>
  411. <div class="line"><a id="l00324" name="l00324"></a><span class="lineno"> 324</span> <span class="keyword">struct </span>CollideCompoundVsShapeVisitor;</div>
  412. <div class="line"><a id="l00325" name="l00325"></a><span class="lineno"> 325</span> <span class="keyword">struct </span>CollideShapeVsCompoundVisitor;</div>
  413. <div class="line"><a id="l00326" name="l00326"></a><span class="lineno"> 326</span> <span class="keyword">template</span> &lt;<span class="keyword">class</span> BoxType&gt; <span class="keyword">struct </span>GetIntersectingSubShapesVisitor;</div>
  414. <div class="line"><a id="l00327" name="l00327"></a><span class="lineno"> 327</span> </div>
  415. <div class="foldopen" id="foldopen00329" data-start="{" data-end="}">
  416. <div class="line"><a id="l00329" name="l00329"></a><span class="lineno"><a class="line" href="class_compound_shape.html#a3f4a71f903b9b37eb61262257ca268f2"> 329</a></span> <span class="keyword">inline</span> <a class="code hl_typedef" href="_core_8h.html#a69aa29b598b851b0640aa225a9e5d61d">uint</a> <a class="code hl_function" href="class_compound_shape.html#a3f4a71f903b9b37eb61262257ca268f2">GetSubShapeIDBits</a>()<span class="keyword"> const</span></div>
  417. <div class="line"><a id="l00330" name="l00330"></a><span class="lineno"> 330</span><span class="keyword"> </span>{</div>
  418. <div class="line"><a id="l00331" name="l00331"></a><span class="lineno"> 331</span> <span class="comment">// Ensure we have enough bits to encode our shape [0, n - 1]</span></div>
  419. <div class="line"><a id="l00332" name="l00332"></a><span class="lineno"> 332</span> <a class="code hl_typedef" href="_core_8h.html#a8f95e75e58492e87412191fabadd8ca8">uint32</a> n = <a class="code hl_typedef" href="_core_8h.html#a8f95e75e58492e87412191fabadd8ca8">uint32</a>(mSubShapes.<a class="code hl_function" href="class_array.html#a9d2ab10879978f2c32e760a92fa0d585">size</a>()) - 1;</div>
  420. <div class="line"><a id="l00333" name="l00333"></a><span class="lineno"> 333</span> <span class="keywordflow">return</span> 32 - <a class="code hl_function" href="_math_8h.html#abd13b5df498e6de8a050b25766543658">CountLeadingZeros</a>(n);</div>
  421. <div class="line"><a id="l00334" name="l00334"></a><span class="lineno"> 334</span> }</div>
  422. </div>
  423. <div class="line"><a id="l00335" name="l00335"></a><span class="lineno"> 335</span> </div>
  424. <div class="foldopen" id="foldopen00337" data-start="{" data-end="}">
  425. <div class="line"><a id="l00337" name="l00337"></a><span class="lineno"><a class="line" href="class_compound_shape.html#ab1a1657fdb82a4b135872bacbca9ceaa"> 337</a></span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="class_compound_shape.html#ab1a1657fdb82a4b135872bacbca9ceaa">CalculateInnerRadius</a>()</div>
  426. <div class="line"><a id="l00338" name="l00338"></a><span class="lineno"> 338</span> {</div>
  427. <div class="line"><a id="l00339" name="l00339"></a><span class="lineno"> 339</span> mInnerRadius = FLT_MAX;</div>
  428. <div class="line"><a id="l00340" name="l00340"></a><span class="lineno"> 340</span> <span class="keywordflow">for</span> (<span class="keyword">const</span> <a class="code hl_struct" href="struct_compound_shape_1_1_sub_shape.html">SubShape</a> &amp;s : mSubShapes)</div>
  429. <div class="line"><a id="l00341" name="l00341"></a><span class="lineno"> 341</span> mInnerRadius = min(mInnerRadius, s.mShape-&gt;GetInnerRadius());</div>
  430. <div class="line"><a id="l00342" name="l00342"></a><span class="lineno"> 342</span> }</div>
  431. </div>
  432. <div class="line"><a id="l00343" name="l00343"></a><span class="lineno"> 343</span> </div>
  433. <div class="line"><a id="l00344" name="l00344"></a><span class="lineno"><a class="line" href="class_compound_shape.html#a6f0173f4441e35a94b5faa7e95062234"> 344</a></span> <a class="code hl_class" href="class_vec3.html">Vec3</a> mCenterOfMass { <a class="code hl_function" href="class_vec3.html#ad03c52ab27761bc1e64e33c47632ba51">Vec3::sZero</a>() }; </div>
  434. <div class="line"><a id="l00345" name="l00345"></a><span class="lineno"><a class="line" href="class_compound_shape.html#a230f2ff5c2d384c55f7845ff18acc8b0"> 345</a></span> <a class="code hl_class" href="class_a_a_box.html">AABox</a> mLocalBounds { <a class="code hl_function" href="class_vec3.html#ad03c52ab27761bc1e64e33c47632ba51">Vec3::sZero</a>(), <a class="code hl_function" href="class_vec3.html#ad03c52ab27761bc1e64e33c47632ba51">Vec3::sZero</a>() };</div>
  435. <div class="line"><a id="l00346" name="l00346"></a><span class="lineno"><a class="line" href="class_compound_shape.html#ad0a3a145f580f2d8f5fabb2495a8eb7c"> 346</a></span> <a class="code hl_class" href="class_array.html">SubShapes</a> <a class="code hl_variable" href="class_compound_shape.html#ad0a3a145f580f2d8f5fabb2495a8eb7c">mSubShapes</a>;</div>
  436. <div class="line"><a id="l00347" name="l00347"></a><span class="lineno"><a class="line" href="class_compound_shape.html#a3218b42376c5d2e7958d01010fb4a326"> 347</a></span> <span class="keywordtype">float</span> mInnerRadius = FLT_MAX; </div>
  437. <div class="line"><a id="l00348" name="l00348"></a><span class="lineno"> 348</span> </div>
  438. <div class="line"><a id="l00349" name="l00349"></a><span class="lineno"> 349</span><span class="keyword">private</span>:</div>
  439. <div class="line"><a id="l00350" name="l00350"></a><span class="lineno"> 350</span> <span class="comment">// Helper functions called by CollisionDispatch</span></div>
  440. <div class="line"><a id="l00351" name="l00351"></a><span class="lineno"> 351</span> <span class="keyword">static</span> <span class="keywordtype">void</span> sCastCompoundVsShape(<span class="keyword">const</span> <a class="code hl_struct" href="struct_shape_cast.html">ShapeCast</a> &amp;inShapeCast, <span class="keyword">const</span> <a class="code hl_class" href="class_shape_cast_settings.html">ShapeCastSettings</a> &amp;inShapeCastSettings, <span class="keyword">const</span> <a class="code hl_class" href="class_shape.html">Shape</a> *inShape, <a class="code hl_class" href="class_vec3.html">Vec3Arg</a> inScale, <span class="keyword">const</span> <a class="code hl_class" href="class_shape_filter.html">ShapeFilter</a> &amp;inShapeFilter, <a class="code hl_class" href="class_mat44.html">Mat44Arg</a> inCenterOfMassTransform2, <span class="keyword">const</span> <a class="code hl_class" href="class_sub_shape_i_d_creator.html">SubShapeIDCreator</a> &amp;inSubShapeIDCreator1, <span class="keyword">const</span> <a class="code hl_class" href="class_sub_shape_i_d_creator.html">SubShapeIDCreator</a> &amp;inSubShapeIDCreator2, <a class="code hl_class" href="class_collision_collector.html">CastShapeCollector</a> &amp;ioCollector);</div>
  441. <div class="line"><a id="l00352" name="l00352"></a><span class="lineno"> 352</span>};</div>
  442. </div>
  443. <div class="line"><a id="l00353" name="l00353"></a><span class="lineno"> 353</span> </div>
  444. <div class="line"><a id="l00354" name="l00354"></a><span class="lineno"> 354</span><a class="code hl_define" href="_core_8h.html#a73da8725998b00321a9db341202d650d">JPH_NAMESPACE_END</a></div>
  445. <div class="ttc" id="a_core_8h_html_a2712a9b0f778ab9d1aa5118b4e8e6bd8"><div class="ttname"><a href="_core_8h.html#a2712a9b0f778ab9d1aa5118b4e8e6bd8">JPH_EXPORT</a></div><div class="ttdeci">#define JPH_EXPORT</div><div class="ttdef"><b>Definition</b> Core.h:275</div></div>
  446. <div class="ttc" id="a_core_8h_html_a60e8696a4678cd348e991a1f172e53f7"><div class="ttname"><a href="_core_8h.html#a60e8696a4678cd348e991a1f172e53f7">uint64</a></div><div class="ttdeci">std::uint64_t uint64</div><div class="ttdef"><b>Definition</b> Core.h:504</div></div>
  447. <div class="ttc" id="a_core_8h_html_a69aa29b598b851b0640aa225a9e5d61d"><div class="ttname"><a href="_core_8h.html#a69aa29b598b851b0640aa225a9e5d61d">uint</a></div><div class="ttdeci">unsigned int uint</div><div class="ttdef"><b>Definition</b> Core.h:500</div></div>
  448. <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>
  449. <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>
  450. <div class="ttc" id="a_core_8h_html_ab6d002cadb39841b46bb93fe8a20e00e"><div class="ttname"><a href="_core_8h.html#ab6d002cadb39841b46bb93fe8a20e00e">JPH_IF_DEBUG_RENDERER</a></div><div class="ttdeci">#define JPH_IF_DEBUG_RENDERER(...)</div><div class="ttdef"><b>Definition</b> Core.h:589</div></div>
  451. <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>
  452. <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>
  453. <div class="ttc" id="a_math_8h_html_abd13b5df498e6de8a050b25766543658"><div class="ttname"><a href="_math_8h.html#abd13b5df498e6de8a050b25766543658">CountLeadingZeros</a></div><div class="ttdeci">uint CountLeadingZeros(uint32 inValue)</div><div class="ttdoc">Compute the number of leading zero bits (how many high bits are zero)</div><div class="ttdef"><b>Definition</b> Math.h:134</div></div>
  454. <div class="ttc" id="a_memory_8h_html_a91074fb218fe28954a0938c099ddd9e0"><div class="ttname"><a href="_memory_8h.html#a91074fb218fe28954a0938c099ddd9e0">JPH_OVERRIDE_NEW_DELETE</a></div><div class="ttdeci">#define JPH_OVERRIDE_NEW_DELETE</div><div class="ttdoc">Macro to override the new and delete functions.</div><div class="ttdef"><b>Definition</b> Memory.h:50</div></div>
  455. <div class="ttc" id="a_scale_helpers_8h_html"><div class="ttname"><a href="_scale_helpers_8h.html">ScaleHelpers.h</a></div></div>
  456. <div class="ttc" id="a_serializable_object_8h_html_ac317eaf55d6ffd3bc0c67521bc33d617"><div class="ttname"><a href="_serializable_object_8h.html#ac317eaf55d6ffd3bc0c67521bc33d617">JPH_DECLARE_SERIALIZABLE_ABSTRACT</a></div><div class="ttdeci">#define JPH_DECLARE_SERIALIZABLE_ABSTRACT(linkage, class_name)</div><div class="ttdef"><b>Definition</b> SerializableObject.h:120</div></div>
  457. <div class="ttc" id="a_serializable_object_8h_html_accc27ff8b37777018bc2d93207412b71"><div class="ttname"><a href="_serializable_object_8h.html#accc27ff8b37777018bc2d93207412b71">JPH_DECLARE_SERIALIZABLE_NON_VIRTUAL</a></div><div class="ttdeci">#define JPH_DECLARE_SERIALIZABLE_NON_VIRTUAL(linkage, class_name)</div><div class="ttdef"><b>Definition</b> SerializableObject.h:80</div></div>
  458. <div class="ttc" id="a_shape_8h_html"><div class="ttname"><a href="_shape_8h.html">Shape.h</a></div></div>
  459. <div class="ttc" id="a_shape_8h_html_aa332e0529e75b83aad91881c8d32551b"><div class="ttname"><a href="_shape_8h.html#aa332e0529e75b83aad91881c8d32551b">EShapeSubType</a></div><div class="ttdeci">EShapeSubType</div><div class="ttdoc">This enumerates all shape types, each shape can return its type through Shape::GetSubType.</div><div class="ttdef"><b>Definition</b> Shape.h:77</div></div>
  460. <div class="ttc" id="a_shape_8h_html_ad64a1c665070a3100e456e54073554a5"><div class="ttname"><a href="_shape_8h.html#ad64a1c665070a3100e456e54073554a5">EShapeType</a></div><div class="ttdeci">EShapeType</div><div class="ttdoc">Shapes are categorized in groups, each shape can return which group it belongs to through its Shape::...</div><div class="ttdef"><b>Definition</b> Shape.h:57</div></div>
  461. <div class="ttc" id="a_shape_8h_html_ad64a1c665070a3100e456e54073554a5a26154ea007c65f860de5333a555a56cf"><div class="ttname"><a href="_shape_8h.html#ad64a1c665070a3100e456e54073554a5a26154ea007c65f860de5333a555a56cf">EShapeType::Compound</a></div><div class="ttdeci">@ Compound</div><div class="ttdoc">Used by CompoundShape.</div></div>
  462. <div class="ttc" id="a_sub_shape_i_d_8h_html"><div class="ttname"><a href="_sub_shape_i_d_8h.html">SubShapeID.h</a></div></div>
  463. <div class="ttc" id="aclass_a_a_box_html"><div class="ttname"><a href="class_a_a_box.html">AABox</a></div><div class="ttdoc">Axis aligned box.</div><div class="ttdef"><b>Definition</b> AABox.h:16</div></div>
  464. <div class="ttc" id="aclass_array_html"><div class="ttname"><a href="class_array.html">Array&lt; SubShapeSettings &gt;</a></div></div>
  465. <div class="ttc" id="aclass_array_html_a9d2ab10879978f2c32e760a92fa0d585"><div class="ttname"><a href="class_array.html#a9d2ab10879978f2c32e760a92fa0d585">Array::size</a></div><div class="ttdeci">size_type size() const</div><div class="ttdoc">Returns amount of elements in the array.</div><div class="ttdef"><b>Definition</b> Array.h:397</div></div>
  466. <div class="ttc" id="aclass_collide_shape_settings_html"><div class="ttname"><a href="class_collide_shape_settings.html">CollideShapeSettings</a></div><div class="ttdoc">Settings to be passed with a collision query.</div><div class="ttdef"><b>Definition</b> CollideShape.h:94</div></div>
  467. <div class="ttc" id="aclass_collide_soft_body_vertex_iterator_html"><div class="ttname"><a href="class_collide_soft_body_vertex_iterator.html">CollideSoftBodyVertexIterator</a></div><div class="ttdef"><b>Definition</b> CollideSoftBodyVertexIterator.h:15</div></div>
  468. <div class="ttc" id="aclass_collision_collector_html"><div class="ttname"><a href="class_collision_collector.html">CollisionCollector</a></div><div class="ttdoc">Virtual interface that allows collecting multiple collision results.</div><div class="ttdef"><b>Definition</b> CollisionCollector.h:45</div></div>
  469. <div class="ttc" id="aclass_color_html"><div class="ttname"><a href="class_color.html">Color</a></div><div class="ttdoc">Class that holds an RGBA color with 8-bits per component.</div><div class="ttdef"><b>Definition</b> Color.h:16</div></div>
  470. <div class="ttc" id="aclass_compound_shape_html"><div class="ttname"><a href="class_compound_shape.html">CompoundShape</a></div><div class="ttdoc">Base class for a compound shape.</div><div class="ttdef"><b>Definition</b> CompoundShape.h:53</div></div>
  471. <div class="ttc" id="aclass_compound_shape_html_a1e3571fbe4835d1bfec50d9d7a1a2b1f"><div class="ttname"><a href="class_compound_shape.html#a1e3571fbe4835d1bfec50d9d7a1a2b1f">CompoundShape::GetTrianglesStart</a></div><div class="ttdeci">virtual void GetTrianglesStart(GetTrianglesContext &amp;ioContext, const AABox &amp;inBox, Vec3Arg inPositionCOM, QuatArg inRotation, Vec3Arg inScale) const override</div><div class="ttdef"><b>Definition</b> CompoundShape.h:122</div></div>
  472. <div class="ttc" id="aclass_compound_shape_html_a3c4efdc6b41fc47e604ee8154425a80a"><div class="ttname"><a href="class_compound_shape.html#a3c4efdc6b41fc47e604ee8154425a80a">CompoundShape::GetSubShapes</a></div><div class="ttdeci">const SubShapes &amp; GetSubShapes() const</div><div class="ttdoc">Access to the sub shapes of this compound.</div><div class="ttdef"><b>Definition</b> CompoundShape.h:251</div></div>
  473. <div class="ttc" id="aclass_compound_shape_html_a3f38b90e13eccc4d52de7bbc2cbcb9aa"><div class="ttname"><a href="class_compound_shape.html#a3f38b90e13eccc4d52de7bbc2cbcb9aa">CompoundShape::GetIntersectingSubShapes</a></div><div class="ttdeci">virtual int GetIntersectingSubShapes(const OrientedBox &amp;inBox, uint *outSubShapeIndices, int inMaxSubShapeIndices) const =0</div></div>
  474. <div class="ttc" id="aclass_compound_shape_html_a3f4a71f903b9b37eb61262257ca268f2"><div class="ttname"><a href="class_compound_shape.html#a3f4a71f903b9b37eb61262257ca268f2">CompoundShape::GetSubShapeIDBits</a></div><div class="ttdeci">uint GetSubShapeIDBits() const</div><div class="ttdoc">Determine amount of bits needed to encode sub shape id.</div><div class="ttdef"><b>Definition</b> CompoundShape.h:329</div></div>
  475. <div class="ttc" id="aclass_compound_shape_html_a3fd5589e3e33b94b8c112393b431152b"><div class="ttname"><a href="class_compound_shape.html#a3fd5589e3e33b94b8c112393b431152b">CompoundShape::IsSubShapeIDValid</a></div><div class="ttdeci">bool IsSubShapeIDValid(SubShapeID inSubShapeID) const</div><div class="ttdef"><b>Definition</b> CompoundShape.h:268</div></div>
  476. <div class="ttc" id="aclass_compound_shape_html_a596eae9a25f8ed13ac35f2a58b318368"><div class="ttname"><a href="class_compound_shape.html#a596eae9a25f8ed13ac35f2a58b318368">CompoundShape::GetCompoundUserData</a></div><div class="ttdeci">uint32 GetCompoundUserData(uint inIdx) const</div><div class="ttdoc">Get the user data associated with a shape in this compound.</div><div class="ttdef"><b>Definition</b> CompoundShape.h:260</div></div>
  477. <div class="ttc" id="aclass_compound_shape_html_a66ae55d5b737c492d73286dff4615215"><div class="ttname"><a href="class_compound_shape.html#a66ae55d5b737c492d73286dff4615215">CompoundShape::GetSubShapeIDFromIndex</a></div><div class="ttdeci">SubShapeIDCreator GetSubShapeIDFromIndex(int inIdx, const SubShapeIDCreator &amp;inParentSubShapeID) const</div><div class="ttdoc">Convert a sub shape index to a sub shape ID.</div><div class="ttdef"><b>Definition</b> CompoundShape.h:289</div></div>
  478. <div class="ttc" id="aclass_compound_shape_html_a6e087096097e738d9cb0547d1be060c9"><div class="ttname"><a href="class_compound_shape.html#a6e087096097e738d9cb0547d1be060c9">CompoundShape::CompoundShape</a></div><div class="ttdeci">JPH_OVERRIDE_NEW_DELETE CompoundShape(EShapeSubType inSubType)</div><div class="ttdoc">Constructor.</div><div class="ttdef"><b>Definition</b> CompoundShape.h:58</div></div>
  479. <div class="ttc" id="aclass_compound_shape_html_a6ff804957bb05620ab762532d2f2ab3d"><div class="ttname"><a href="class_compound_shape.html#a6ff804957bb05620ab762532d2f2ab3d">CompoundShape::GetSubShapeIndexFromID</a></div><div class="ttdeci">uint32 GetSubShapeIndexFromID(SubShapeID inSubShapeID, SubShapeID &amp;outRemainder) const</div><div class="ttdef"><b>Definition</b> CompoundShape.h:278</div></div>
  480. <div class="ttc" id="aclass_compound_shape_html_a79a6d4592f894bfc0ed0496bdce68e98"><div class="ttname"><a href="class_compound_shape.html#a79a6d4592f894bfc0ed0496bdce68e98">CompoundShape::SetCompoundUserData</a></div><div class="ttdeci">void SetCompoundUserData(uint inIdx, uint32 inUserData)</div><div class="ttdoc">Set the user data associated with a shape in this compound.</div><div class="ttdef"><b>Definition</b> CompoundShape.h:263</div></div>
  481. <div class="ttc" id="aclass_compound_shape_html_a86dbc7e794fdf43a39fed13e60731a0b"><div class="ttname"><a href="class_compound_shape.html#a86dbc7e794fdf43a39fed13e60731a0b">CompoundShape::GetTrianglesNext</a></div><div class="ttdeci">virtual int GetTrianglesNext(GetTrianglesContext &amp;ioContext, int inMaxTrianglesRequested, Float3 *outTriangleVertices, const PhysicsMaterial **outMaterials=nullptr) const override</div><div class="ttdef"><b>Definition</b> CompoundShape.h:125</div></div>
  482. <div class="ttc" id="aclass_compound_shape_html_ab1a1657fdb82a4b135872bacbca9ceaa"><div class="ttname"><a href="class_compound_shape.html#ab1a1657fdb82a4b135872bacbca9ceaa">CompoundShape::CalculateInnerRadius</a></div><div class="ttdeci">void CalculateInnerRadius()</div><div class="ttdoc">Determine the inner radius of this shape.</div><div class="ttdef"><b>Definition</b> CompoundShape.h:337</div></div>
  483. <div class="ttc" id="aclass_compound_shape_html_abe1e5333a667ccd80b6146b951abf918"><div class="ttname"><a href="class_compound_shape.html#abe1e5333a667ccd80b6146b951abf918">CompoundShape::GetNumSubShapes</a></div><div class="ttdeci">uint GetNumSubShapes() const</div><div class="ttdoc">Get the total number of sub shapes.</div><div class="ttdef"><b>Definition</b> CompoundShape.h:254</div></div>
  484. <div class="ttc" id="aclass_compound_shape_html_abe5c3a8558c840abba213a6a48149f85"><div class="ttname"><a href="class_compound_shape.html#abe5c3a8558c840abba213a6a48149f85">CompoundShape::GetIntersectingSubShapes</a></div><div class="ttdeci">virtual int GetIntersectingSubShapes(const AABox &amp;inBox, uint *outSubShapeIndices, int inMaxSubShapeIndices) const =0</div></div>
  485. <div class="ttc" id="aclass_compound_shape_html_ac6d8a7e5c9f6758682f1a85437b09014"><div class="ttname"><a href="class_compound_shape.html#ac6d8a7e5c9f6758682f1a85437b09014">CompoundShape::CompoundShape</a></div><div class="ttdeci">CompoundShape(EShapeSubType inSubType, const ShapeSettings &amp;inSettings, ShapeResult &amp;outResult)</div><div class="ttdef"><b>Definition</b> CompoundShape.h:59</div></div>
  486. <div class="ttc" id="aclass_compound_shape_html_ad0a3a145f580f2d8f5fabb2495a8eb7c"><div class="ttname"><a href="class_compound_shape.html#ad0a3a145f580f2d8f5fabb2495a8eb7c">CompoundShape::mSubShapes</a></div><div class="ttdeci">SubShapes mSubShapes</div><div class="ttdef"><b>Definition</b> CompoundShape.h:346</div></div>
  487. <div class="ttc" id="aclass_compound_shape_html_ae17025f3ed04cdf063dc0f3b180468a4"><div class="ttname"><a href="class_compound_shape.html#ae17025f3ed04cdf063dc0f3b180468a4">CompoundShape::GetInnerRadius</a></div><div class="ttdeci">virtual float GetInnerRadius() const override</div><div class="ttdef"><b>Definition</b> CompoundShape.h:78</div></div>
  488. <div class="ttc" id="aclass_compound_shape_html_aed1247824e7919d8a948293f586b15dc"><div class="ttname"><a href="class_compound_shape.html#aed1247824e7919d8a948293f586b15dc">CompoundShape::GetLocalBounds</a></div><div class="ttdeci">virtual AABox GetLocalBounds() const override</div><div class="ttdoc">Get local bounding box including convex radius, this box is centered around the center of mass rather...</div><div class="ttdef"><b>Definition</b> CompoundShape.h:68</div></div>
  489. <div class="ttc" id="aclass_compound_shape_html_aeec4b7c1a31225a01b314f2528f27b24"><div class="ttname"><a href="class_compound_shape.html#aeec4b7c1a31225a01b314f2528f27b24">CompoundShape::GetCenterOfMass</a></div><div class="ttdeci">virtual Vec3 GetCenterOfMass() const override</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> CompoundShape.h:62</div></div>
  490. <div class="ttc" id="aclass_compound_shape_html_af70b012c88d2bedfb9541d40e6e46fb2"><div class="ttname"><a href="class_compound_shape.html#af70b012c88d2bedfb9541d40e6e46fb2">CompoundShape::GetSubShape</a></div><div class="ttdeci">const SubShape &amp; GetSubShape(uint inIdx) const</div><div class="ttdoc">Access to a particular sub shape.</div><div class="ttdef"><b>Definition</b> CompoundShape.h:257</div></div>
  491. <div class="ttc" id="aclass_compound_shape_settings_html"><div class="ttname"><a href="class_compound_shape_settings.html">CompoundShapeSettings</a></div><div class="ttdoc">Base class settings to construct a compound shape.</div><div class="ttdef"><b>Definition</b> CompoundShape.h:18</div></div>
  492. <div class="ttc" id="aclass_compound_shape_settings_html_a203d5072fa51f2c61b999cfb76ed9867"><div class="ttname"><a href="class_compound_shape_settings.html#a203d5072fa51f2c61b999cfb76ed9867">CompoundShapeSettings::CompoundShapeSettings</a></div><div class="ttdeci">CompoundShapeSettings()=default</div><div class="ttdoc">Constructor. Use AddShape to add the parts.</div></div>
  493. <div class="ttc" id="aclass_debug_renderer_html"><div class="ttname"><a href="class_debug_renderer.html">DebugRenderer</a></div><div class="ttdef"><b>Definition</b> DebugRenderer.h:47</div></div>
  494. <div class="ttc" id="aclass_float3_html"><div class="ttname"><a href="class_float3.html">Float3</a></div><div class="ttdoc">Class that holds 3 floats. Used as a storage class. Convert to Vec3 for calculations.</div><div class="ttdef"><b>Definition</b> Float3.h:13</div></div>
  495. <div class="ttc" id="aclass_mass_properties_html"><div class="ttname"><a href="class_mass_properties.html">MassProperties</a></div><div class="ttdoc">Describes the mass and inertia properties of a body. Used during body construction only.</div><div class="ttdef"><b>Definition</b> MassProperties.h:16</div></div>
  496. <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>
  497. <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>
  498. <div class="ttc" id="aclass_oriented_box_html"><div class="ttname"><a href="class_oriented_box.html">OrientedBox</a></div><div class="ttdoc">Oriented box.</div><div class="ttdef"><b>Definition</b> OrientedBox.h:18</div></div>
  499. <div class="ttc" id="aclass_physics_material_html"><div class="ttname"><a href="class_physics_material.html">PhysicsMaterial</a></div><div class="ttdef"><b>Definition</b> PhysicsMaterial.h:23</div></div>
  500. <div class="ttc" id="aclass_plane_html"><div class="ttname"><a href="class_plane.html">Plane</a></div><div class="ttdoc">An infinite plane described by the formula X . Normal + Constant = 0.</div><div class="ttdef"><b>Definition</b> Plane.h:11</div></div>
  501. <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>
  502. <div class="ttc" id="aclass_quat_html_a60c11537faec1e7517a957f02afc4b6d"><div class="ttname"><a href="class_quat.html#a60c11537faec1e7517a957f02afc4b6d">Quat::sLoadFloat3Unsafe</a></div><div class="ttdeci">static JPH_INLINE Quat sLoadFloat3Unsafe(const Float3 &amp;inV)</div><div class="ttdoc">Load 3 floats from memory (X, Y and Z component and then calculates W) reads 32 bits extra which it d...</div><div class="ttdef"><b>Definition</b> Quat.inl:399</div></div>
  503. <div class="ttc" id="aclass_quat_html_a73a43fe262fbbbc0b1872d238b972794"><div class="ttname"><a href="class_quat.html#a73a43fe262fbbbc0b1872d238b972794">Quat::sIdentity</a></div><div class="ttdeci">static JPH_INLINE Quat sIdentity()</div><div class="ttdef"><b>Definition</b> Quat.h:104</div></div>
  504. <div class="ttc" id="aclass_quat_html_a9c0afa78ae80b13a6c8adf1240a7c95e"><div class="ttname"><a href="class_quat.html#a9c0afa78ae80b13a6c8adf1240a7c95e">Quat::IsClose</a></div><div class="ttdeci">bool IsClose(QuatArg inRHS, float inMaxDistSq=1.0e-12f) const</div><div class="ttdoc">If this quaternion is close to inRHS. Note that q and -q represent the same rotation,...</div><div class="ttdef"><b>Definition</b> Quat.h:57</div></div>
  505. <div class="ttc" id="aclass_quat_html_ae95e7b6c9f4167b91b674a696c681c6e"><div class="ttname"><a href="class_quat.html#ae95e7b6c9f4167b91b674a696c681c6e">Quat::StoreFloat3</a></div><div class="ttdeci">JPH_INLINE void StoreFloat3(Float3 *outV) const</div><div class="ttdoc">Store as 3 floats to memory (X, Y and Z component). Ensures that W is positive before storing.</div><div class="ttdef"><b>Definition</b> Quat.inl:388</div></div>
  506. <div class="ttc" id="aclass_ref_const_html"><div class="ttname"><a href="class_ref_const.html">RefConst</a></div><div class="ttdef"><b>Definition</b> Reference.h:163</div></div>
  507. <div class="ttc" id="aclass_result_html"><div class="ttname"><a href="class_result.html">Result&lt; Ref&lt; Shape &gt; &gt;</a></div></div>
  508. <div class="ttc" id="aclass_result_html_a06b7e3b8ea77cb4b1fc5ecfa45494167"><div class="ttname"><a href="class_result.html#a06b7e3b8ea77cb4b1fc5ecfa45494167">Result::IsValid</a></div><div class="ttdeci">bool IsValid() const</div><div class="ttdoc">Checks if the result is valid.</div><div class="ttdef"><b>Definition</b> Result.h:134</div></div>
  509. <div class="ttc" id="aclass_result_html_ab3d845db638a6a51467760867bfc472a"><div class="ttname"><a href="class_result.html#ab3d845db638a6a51467760867bfc472a">Result::Get</a></div><div class="ttdeci">const Type &amp; Get() const</div><div class="ttdoc">Get the result value.</div><div class="ttdef"><b>Definition</b> Result.h:137</div></div>
  510. <div class="ttc" id="aclass_shape_cast_settings_html"><div class="ttname"><a href="class_shape_cast_settings.html">ShapeCastSettings</a></div><div class="ttdoc">Settings to be passed with a shape cast.</div><div class="ttdef"><b>Definition</b> ShapeCast.h:92</div></div>
  511. <div class="ttc" id="aclass_shape_filter_html"><div class="ttname"><a href="class_shape_filter.html">ShapeFilter</a></div><div class="ttdoc">Filter class.</div><div class="ttdef"><b>Definition</b> ShapeFilter.h:17</div></div>
  512. <div class="ttc" id="aclass_shape_html"><div class="ttname"><a href="class_shape.html">Shape</a></div><div class="ttdoc">Base class for all shapes (collision volume of a body). Defines a virtual interface for collision det...</div><div class="ttdef"><b>Definition</b> Shape.h:186</div></div>
  513. <div class="ttc" id="aclass_shape_html_a9f8379fa338802436700b86a07fab3be"><div class="ttname"><a href="class_shape.html#a9f8379fa338802436700b86a07fab3be">Shape::GetWorldSpaceBounds</a></div><div class="ttdeci">virtual AABox GetWorldSpaceBounds(Mat44Arg inCenterOfMassTransform, Vec3Arg inScale) const</div><div class="ttdef"><b>Definition</b> Shape.h:222</div></div>
  514. <div class="ttc" id="aclass_shape_settings_html"><div class="ttname"><a href="class_shape_settings.html">ShapeSettings</a></div><div class="ttdef"><b>Definition</b> Shape.h:147</div></div>
  515. <div class="ttc" id="aclass_shape_settings_html_a21e53b5758542a5527c7941d61d838fa"><div class="ttname"><a href="class_shape_settings.html#a21e53b5758542a5527c7941d61d838fa">ShapeSettings::Create</a></div><div class="ttdeci">virtual ShapeResult Create() const =0</div><div class="ttdoc">Create a shape according to the settings specified by this object.</div></div>
  516. <div class="ttc" id="aclass_stream_in_html"><div class="ttname"><a href="class_stream_in.html">StreamIn</a></div><div class="ttdoc">Simple binary input stream.</div><div class="ttdef"><b>Definition</b> StreamIn.h:13</div></div>
  517. <div class="ttc" id="aclass_stream_out_html"><div class="ttname"><a href="class_stream_out.html">StreamOut</a></div><div class="ttdoc">Simple binary output stream.</div><div class="ttdef"><b>Definition</b> StreamOut.h:13</div></div>
  518. <div class="ttc" id="aclass_sub_shape_i_d_creator_html"><div class="ttname"><a href="class_sub_shape_i_d_creator.html">SubShapeIDCreator</a></div><div class="ttdef"><b>Definition</b> SubShapeID.h:108</div></div>
  519. <div class="ttc" id="aclass_sub_shape_i_d_creator_html_a29997885833b2c9625bcbcba4548273d"><div class="ttname"><a href="class_sub_shape_i_d_creator.html#a29997885833b2c9625bcbcba4548273d">SubShapeIDCreator::PushID</a></div><div class="ttdeci">SubShapeIDCreator PushID(uint inValue, uint inBits) const</div><div class="ttdoc">Add a new id to the chain of id's and return it.</div><div class="ttdef"><b>Definition</b> SubShapeID.h:111</div></div>
  520. <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>
  521. <div class="ttc" id="aclass_sub_shape_i_d_html_a8f78ff809c7af2dfbd2e61ba2314ca9d"><div class="ttname"><a href="class_sub_shape_i_d.html#a8f78ff809c7af2dfbd2e61ba2314ca9d">SubShapeID::PopID</a></div><div class="ttdeci">Type PopID(uint inBits, SubShapeID &amp;outRemainder) const</div><div class="ttdoc">Get the next id in the chain of ids (pops parents before children)</div><div class="ttdef"><b>Definition</b> SubShapeID.h:42</div></div>
  522. <div class="ttc" id="aclass_transformed_shape_html"><div class="ttname"><a href="class_transformed_shape.html">TransformedShape</a></div><div class="ttdef"><b>Definition</b> TransformedShape.h:26</div></div>
  523. <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>
  524. <div class="ttc" id="aclass_vec3_html_ab22c62c48d2de13947c0cd3413018364"><div class="ttname"><a href="class_vec3.html#ab22c62c48d2de13947c0cd3413018364">Vec3::StoreFloat3</a></div><div class="ttdeci">JPH_INLINE void StoreFloat3(Float3 *outV) const</div><div class="ttdoc">Store 3 floats to memory.</div><div class="ttdef"><b>Definition</b> Vec3.inl:772</div></div>
  525. <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>
  526. <div class="ttc" id="aclass_vec3_html_aea30fe731618ffa249ecdcba2c66ab4e"><div class="ttname"><a href="class_vec3.html#aea30fe731618ffa249ecdcba2c66ab4e">Vec3::sLoadFloat3Unsafe</a></div><div class="ttdeci">static JPH_INLINE Vec3 sLoadFloat3Unsafe(const Float3 &amp;inV)</div><div class="ttdoc">Load 3 floats from memory (reads 32 bits extra which it doesn't use)</div><div class="ttdef"><b>Definition</b> Vec3.inl:135</div></div>
  527. <div class="ttc" id="anamespace_scale_helpers_html_a024fa9a3c672218ce6b7aaa97d953ae1"><div class="ttname"><a href="namespace_scale_helpers.html#a024fa9a3c672218ce6b7aaa97d953ae1">ScaleHelpers::CanScaleBeRotated</a></div><div class="ttdeci">bool CanScaleBeRotated(QuatArg inRotation, Vec3Arg inScale)</div><div class="ttdef"><b>Definition</b> ScaleHelpers.h:51</div></div>
  528. <div class="ttc" id="anamespace_scale_helpers_html_a317905196055a0a720d6468cbb4840b9"><div class="ttname"><a href="namespace_scale_helpers.html#a317905196055a0a720d6468cbb4840b9">ScaleHelpers::RotateScale</a></div><div class="ttdeci">Vec3 RotateScale(QuatArg inRotation, Vec3Arg inScale)</div><div class="ttdef"><b>Definition</b> ScaleHelpers.h:75</div></div>
  529. <div class="ttc" id="anamespace_scale_helpers_html_a8ff2f9310527acbb4b02a00150fe02fe"><div class="ttname"><a href="namespace_scale_helpers.html#a8ff2f9310527acbb4b02a00150fe02fe">ScaleHelpers::IsUniformScale</a></div><div class="ttdeci">bool IsUniformScale(Vec3Arg inScale)</div><div class="ttdoc">Test if a scale is uniform.</div><div class="ttdef"><b>Definition</b> ScaleHelpers.h:24</div></div>
  530. <div class="ttc" id="astruct_compound_shape_1_1_sub_shape_html"><div class="ttname"><a href="struct_compound_shape_1_1_sub_shape.html">CompoundShape::SubShape</a></div><div class="ttdef"><b>Definition</b> CompoundShape.h:142</div></div>
  531. <div class="ttc" id="astruct_compound_shape_1_1_sub_shape_html_a13d700b0e7064e9ecdf99afdc0262eae"><div class="ttname"><a href="struct_compound_shape_1_1_sub_shape.html#a13d700b0e7064e9ecdf99afdc0262eae">CompoundShape::SubShape::GetRotation</a></div><div class="ttdeci">JPH_INLINE Quat GetRotation() const</div><div class="ttdoc">Uncompress the rotation.</div><div class="ttdef"><b>Definition</b> CompoundShape.h:233</div></div>
  532. <div class="ttc" id="astruct_compound_shape_1_1_sub_shape_html_a16bb59f7313e95ee322d576f5d2d85a7"><div class="ttname"><a href="struct_compound_shape_1_1_sub_shape.html#a16bb59f7313e95ee322d576f5d2d85a7">CompoundShape::SubShape::mPositionCOM</a></div><div class="ttdeci">Float3 mPositionCOM</div><div class="ttdoc">Note: Position of center of mass of sub shape!</div><div class="ttdef"><b>Definition</b> CompoundShape.h:239</div></div>
  533. <div class="ttc" id="astruct_compound_shape_1_1_sub_shape_html_a18ba22cc1d5ad095bce61a7fcfcbcc25"><div class="ttname"><a href="struct_compound_shape_1_1_sub_shape.html#a18ba22cc1d5ad095bce61a7fcfcbcc25">CompoundShape::SubShape::GetLocalTransformNoScale</a></div><div class="ttdeci">JPH_INLINE Mat44 GetLocalTransformNoScale(Vec3Arg inScale) const</div><div class="ttdef"><b>Definition</b> CompoundShape.h:188</div></div>
  534. <div class="ttc" id="astruct_compound_shape_1_1_sub_shape_html_a25c797febba76594f53b5303867fe0fb"><div class="ttname"><a href="struct_compound_shape_1_1_sub_shape.html#a25c797febba76594f53b5303867fe0fb">CompoundShape::SubShape::mIsRotationIdentity</a></div><div class="ttdeci">bool mIsRotationIdentity</div><div class="ttdoc">If mRotation is close to identity (put here because it falls in padding bytes)</div><div class="ttdef"><b>Definition</b> CompoundShape.h:242</div></div>
  535. <div class="ttc" id="astruct_compound_shape_1_1_sub_shape_html_a2ea825bfb79c5d059768e60d7b8997d2"><div class="ttname"><a href="struct_compound_shape_1_1_sub_shape.html#a2ea825bfb79c5d059768e60d7b8997d2">CompoundShape::SubShape::FromSettings</a></div><div class="ttdeci">bool FromSettings(const CompoundShapeSettings::SubShapeSettings &amp;inSettings, ShapeResult &amp;outResult)</div><div class="ttdef"><b>Definition</b> CompoundShape.h:147</div></div>
  536. <div class="ttc" id="astruct_compound_shape_1_1_sub_shape_html_a33448959f96311ef875a912b8a104dcf"><div class="ttname"><a href="struct_compound_shape_1_1_sub_shape.html#a33448959f96311ef875a912b8a104dcf">CompoundShape::SubShape::IsValidScale</a></div><div class="ttdeci">bool IsValidScale(Vec3Arg inScale) const</div><div class="ttdoc">Test if inScale is valid for this sub shape.</div><div class="ttdef"><b>Definition</b> CompoundShape.h:195</div></div>
  537. <div class="ttc" id="astruct_compound_shape_1_1_sub_shape_html_a3805d809932e3f0d94a3b87e297a47bc"><div class="ttname"><a href="struct_compound_shape_1_1_sub_shape.html#a3805d809932e3f0d94a3b87e297a47bc">CompoundShape::SubShape::SetTransform</a></div><div class="ttdeci">JPH_INLINE void SetTransform(Vec3Arg inPosition, QuatArg inRotation, Vec3Arg inCenterOfMass)</div><div class="ttdef"><b>Definition</b> CompoundShape.h:177</div></div>
  538. <div class="ttc" id="astruct_compound_shape_1_1_sub_shape_html_a42a1dc09f0d3bd15367f87d26452bd44"><div class="ttname"><a href="struct_compound_shape_1_1_sub_shape.html#a42a1dc09f0d3bd15367f87d26452bd44">CompoundShape::SubShape::mRotation</a></div><div class="ttdeci">Float3 mRotation</div><div class="ttdoc">Note: X, Y, Z of rotation quaternion - note we read 4 bytes beyond this so make sure there's somethin...</div><div class="ttdef"><b>Definition</b> CompoundShape.h:240</div></div>
  539. <div class="ttc" id="astruct_compound_shape_1_1_sub_shape_html_a8528ca1f6ee3908b418283517762bd57"><div class="ttname"><a href="struct_compound_shape_1_1_sub_shape.html#a8528ca1f6ee3908b418283517762bd57">CompoundShape::SubShape::mUserData</a></div><div class="ttdeci">uint32 mUserData</div><div class="ttdoc">User data value (put here because it falls in padding bytes)</div><div class="ttdef"><b>Definition</b> CompoundShape.h:241</div></div>
  540. <div class="ttc" id="astruct_compound_shape_1_1_sub_shape_html_a92de7326e077355d680f2d6ce860d7fc"><div class="ttname"><a href="struct_compound_shape_1_1_sub_shape.html#a92de7326e077355d680f2d6ce860d7fc">CompoundShape::SubShape::TransformScale</a></div><div class="ttdeci">Vec3 TransformScale(Vec3Arg inScale) const</div><div class="ttdoc">Transform the scale to the local space of the child shape.</div><div class="ttdef"><b>Definition</b> CompoundShape.h:205</div></div>
  541. <div class="ttc" id="astruct_compound_shape_1_1_sub_shape_html_ac3fea8705474011f4f5681c18fcdaaa2"><div class="ttname"><a href="struct_compound_shape_1_1_sub_shape.html#ac3fea8705474011f4f5681c18fcdaaa2">CompoundShape::SubShape::GetPositionCOM</a></div><div class="ttdeci">JPH_INLINE Vec3 GetPositionCOM() const</div><div class="ttdoc">Uncompress the center of mass position.</div><div class="ttdef"><b>Definition</b> CompoundShape.h:221</div></div>
  542. <div class="ttc" id="astruct_compound_shape_1_1_sub_shape_html_ad02db108fee2f4caeb4d2709a4f14671"><div class="ttname"><a href="struct_compound_shape_1_1_sub_shape.html#ad02db108fee2f4caeb4d2709a4f14671">CompoundShape::SubShape::SetPositionCOM</a></div><div class="ttdeci">JPH_INLINE void SetPositionCOM(Vec3Arg inPositionCOM)</div><div class="ttdoc">Compress the center of mass position.</div><div class="ttdef"><b>Definition</b> CompoundShape.h:215</div></div>
  543. <div class="ttc" id="astruct_compound_shape_1_1_sub_shape_html_aeb79df4468aca72a42c1c8dd68f564c1"><div class="ttname"><a href="struct_compound_shape_1_1_sub_shape.html#aeb79df4468aca72a42c1c8dd68f564c1">CompoundShape::SubShape::SetRotation</a></div><div class="ttdeci">JPH_INLINE void SetRotation(QuatArg inRotation)</div><div class="ttdoc">Compress the rotation.</div><div class="ttdef"><b>Definition</b> CompoundShape.h:227</div></div>
  544. <div class="ttc" id="astruct_compound_shape_1_1_sub_shape_html_af0e288762fbe4fcdec676ce1836d5375"><div class="ttname"><a href="struct_compound_shape_1_1_sub_shape.html#af0e288762fbe4fcdec676ce1836d5375">CompoundShape::SubShape::mShape</a></div><div class="ttdeci">RefConst&lt; Shape &gt; mShape</div><div class="ttdef"><b>Definition</b> CompoundShape.h:238</div></div>
  545. <div class="ttc" id="astruct_compound_shape_settings_1_1_sub_shape_settings_html"><div class="ttname"><a href="struct_compound_shape_settings_1_1_sub_shape_settings.html">CompoundShapeSettings::SubShapeSettings</a></div><div class="ttdef"><b>Definition</b> CompoundShape.h:32</div></div>
  546. <div class="ttc" id="astruct_compound_shape_settings_1_1_sub_shape_settings_html_a05791518abbef530de3bc631efa4d8dc"><div class="ttname"><a href="struct_compound_shape_settings_1_1_sub_shape_settings.html#a05791518abbef530de3bc631efa4d8dc">CompoundShapeSettings::SubShapeSettings::mUserData</a></div><div class="ttdeci">uint32 mUserData</div><div class="ttdef"><b>Definition</b> CompoundShape.h:43</div></div>
  547. <div class="ttc" id="astruct_compound_shape_settings_1_1_sub_shape_settings_html_a865bfef885778f2221f8a4dccf0e941e"><div class="ttname"><a href="struct_compound_shape_settings_1_1_sub_shape_settings.html#a865bfef885778f2221f8a4dccf0e941e">CompoundShapeSettings::SubShapeSettings::mRotation</a></div><div class="ttdeci">Quat mRotation</div><div class="ttdoc">Rotation of the sub shape.</div><div class="ttdef"><b>Definition</b> CompoundShape.h:38</div></div>
  548. <div class="ttc" id="astruct_compound_shape_settings_1_1_sub_shape_settings_html_aa79a4e31ee31e2d2760a15e01de76a71"><div class="ttname"><a href="struct_compound_shape_settings_1_1_sub_shape_settings.html#aa79a4e31ee31e2d2760a15e01de76a71">CompoundShapeSettings::SubShapeSettings::mShape</a></div><div class="ttdeci">RefConst&lt; ShapeSettings &gt; mShape</div><div class="ttdoc">Sub shape (either this or mShapePtr needs to be filled up)</div><div class="ttdef"><b>Definition</b> CompoundShape.h:35</div></div>
  549. <div class="ttc" id="astruct_compound_shape_settings_1_1_sub_shape_settings_html_aaf84c1bfaed3898a81e184c11d05988d"><div class="ttname"><a href="struct_compound_shape_settings_1_1_sub_shape_settings.html#aaf84c1bfaed3898a81e184c11d05988d">CompoundShapeSettings::SubShapeSettings::mPosition</a></div><div class="ttdeci">Vec3 mPosition</div><div class="ttdoc">Position of the sub shape.</div><div class="ttdef"><b>Definition</b> CompoundShape.h:37</div></div>
  550. <div class="ttc" id="astruct_compound_shape_settings_1_1_sub_shape_settings_html_ae1a012a16565000879fbe836e22c5a07"><div class="ttname"><a href="struct_compound_shape_settings_1_1_sub_shape_settings.html#ae1a012a16565000879fbe836e22c5a07">CompoundShapeSettings::SubShapeSettings::mShapePtr</a></div><div class="ttdeci">RefConst&lt; Shape &gt; mShapePtr</div><div class="ttdoc">Sub shape (either this or mShape needs to be filled up)</div><div class="ttdef"><b>Definition</b> CompoundShape.h:36</div></div>
  551. <div class="ttc" id="astruct_shape_1_1_get_triangles_context_html"><div class="ttname"><a href="struct_shape_1_1_get_triangles_context.html">Shape::GetTrianglesContext</a></div><div class="ttdoc">An opaque buffer that holds shape specific information during GetTrianglesStart/Next.</div><div class="ttdef"><b>Definition</b> Shape.h:348</div></div>
  552. <div class="ttc" id="astruct_shape_cast_html"><div class="ttname"><a href="struct_shape_cast.html">ShapeCast</a></div><div class="ttdef"><b>Definition</b> ShapeCast.h:69</div></div>
  553. </div><!-- fragment --></div><!-- contents -->
  554. </div><!-- doc-content -->
  555. <!-- start footer part -->
  556. <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  557. <ul>
  558. <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_1a1d05ab9ff27ca8d1ed94cd62670cdf.html">Collision</a></li><li class="navelem"><a class="el" href="dir_4df7c3fdd39bf16e2d4956412667f123.html">Shape</a></li><li class="navelem"><a class="el" href="_compound_shape_8h.html">CompoundShape.h</a></li>
  559. <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>
  560. </ul>
  561. </div>
  562. </body>
  563. </html>