<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/> <meta name="generator" content="Doxygen 1.8.14"/> <meta name="viewport" content="width=device-width, initial-scale=1"/> <title>Box2D: b2PulleyJoint.h Source File</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="dynsections.js"></script> <link href="search/search.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="search/searchdata.js"></script> <script type="text/javascript" src="search/search.js"></script> <link href="doxygen.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="top"><!-- do not remove this div, it is closed by doxygen! --> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td id="projectlogo"><img alt="Logo" src="icon.gif"/></td> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">Box2D  <span id="projectnumber">2.3.0</span> </div> <div id="projectbrief">A 2D Physics Engine for Games</div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.14 --> <script type="text/javascript"> /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ var searchBox = new SearchBox("searchBox", "search",false,'Search'); /* @license-end */ </script> <script type="text/javascript" src="menudata.js"></script> <script type="text/javascript" src="menu.js"></script> <script type="text/javascript"> /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ $(function() { initMenu('',true,false,'search.php','Search'); $(document).ready(function() { init_search(); }); }); /* @license-end */</script> <div id="main-nav"></div> <!-- window showing the filter options --> <div id="MSearchSelectWindow" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> </div> <!-- iframe showing the search results (closed by default) --> <div id="MSearchResultsWindow"> <iframe src="javascript:void(0)" frameborder="0" name="MSearchResults" id="MSearchResults"> </iframe> </div> <div id="nav-path" class="navpath"> <ul> <li class="navelem"><a class="el" href="dir_a7f953fea4e008d17e00594b3bbaff29.html">Box2D</a></li><li class="navelem"><a class="el" href="dir_54cad791c4d2b04cb4a0ba0bba686f79.html">Dynamics</a></li><li class="navelem"><a class="el" href="dir_b4ce54b79b9fedd1c216c802993ffbe1.html">Joints</a></li> </ul> </div> </div><!-- top --> <div class="header"> <div class="headertitle"> <div class="title">b2PulleyJoint.h</div> </div> </div><!--header--> <div class="contents"> <div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">/*</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment">* Copyright (c) 2006-2011 Erin Catto http://www.box2d.org</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment">*</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment">* This software is provided 'as-is', without any express or implied</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment">* warranty. In no event will the authors be held liable for any damages</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment">* arising from the use of this software.</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment">* Permission is granted to anyone to use this software for any purpose,</span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment">* including commercial applications, and to alter it and redistribute it</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment">* freely, subject to the following restrictions:</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment">* 1. The origin of this software must not be misrepresented; you must not</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment">* claim that you wrote the original software. If you use this software</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="comment">* in a product, an acknowledgment in the product documentation would be</span></div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="comment">* appreciated but is not required.</span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="comment">* 2. Altered source versions must be plainly marked as such, and must not be</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="comment">* misrepresented as being the original software.</span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="comment">* 3. This notice may not be removed or altered from any source distribution.</span></div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="comment">*/</span></div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span> </div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="preprocessor">#ifndef B2_PULLEY_JOINT_H</span></div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="preprocessor">#define B2_PULLEY_JOINT_H</span></div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span> </div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span> <span class="preprocessor">#include <Box2D/Dynamics/Joints/b2Joint.h></span></div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span> </div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span> <span class="keyword">const</span> float32 b2_minPulleyLength = 2.0f;</div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span> </div><div class="line"><a name="l00028"></a><span class="lineno"><a class="line" href="structb2_pulley_joint_def.html"> 28</a></span> <span class="keyword">struct </span><a class="code" href="structb2_pulley_joint_def.html">b2PulleyJointDef</a> : <span class="keyword">public</span> <a class="code" href="structb2_joint_def.html">b2JointDef</a></div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span> {</div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span>  <a class="code" href="structb2_pulley_joint_def.html">b2PulleyJointDef</a>()</div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span>  {</div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span>  <a class="code" href="structb2_joint_def.html#a470f2879b24adb05facbd49f338856fb">type</a> = e_pulleyJoint;</div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span>  <a class="code" href="structb2_pulley_joint_def.html#aae77c020ce4629ab9e03560e28aa853d">groundAnchorA</a>.<a class="code" href="structb2_vec2.html#a4d61640a645e470a50b451307d8e94c3">Set</a>(-1.0f, 1.0f);</div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span>  <a class="code" href="structb2_pulley_joint_def.html#aa412b9f3bffd1fb69ace14f9b3e03b82">groundAnchorB</a>.<a class="code" href="structb2_vec2.html#a4d61640a645e470a50b451307d8e94c3">Set</a>(1.0f, 1.0f);</div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span>  <a class="code" href="structb2_pulley_joint_def.html#ad7677a4ad02a6e7cb8699fc5012eac3e">localAnchorA</a>.<a class="code" href="structb2_vec2.html#a4d61640a645e470a50b451307d8e94c3">Set</a>(-1.0f, 0.0f);</div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span>  <a class="code" href="structb2_pulley_joint_def.html#aed3f9c9f5f4145ceb32e7e164de73144">localAnchorB</a>.<a class="code" href="structb2_vec2.html#a4d61640a645e470a50b451307d8e94c3">Set</a>(1.0f, 0.0f);</div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span>  <a class="code" href="structb2_pulley_joint_def.html#a51d945882c1d7a78af2b0e9ffb31a33b">lengthA</a> = 0.0f;</div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span>  <a class="code" href="structb2_pulley_joint_def.html#a5857d5b5b9880b6c8201ce3ee8c3eef0">lengthB</a> = 0.0f;</div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span>  <a class="code" href="structb2_pulley_joint_def.html#af35074246aeacbf239c11682642b31f5">ratio</a> = 1.0f;</div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span>  <a class="code" href="structb2_joint_def.html#aef099a1f89b64e230173b6016848ea9b">collideConnected</a> = <span class="keyword">true</span>;</div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span>  }</div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span> </div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>  <span class="keywordtype">void</span> <a class="code" href="structb2_pulley_joint_def.html#abef614a93562b82aa3b5f8cac17d1ce8">Initialize</a>(<a class="code" href="classb2_body.html">b2Body</a>* <a class="code" href="structb2_joint_def.html#a8cd54c93da396be75a9788f2c6897f05">bodyA</a>, <a class="code" href="classb2_body.html">b2Body</a>* <a class="code" href="structb2_joint_def.html#aa4f4dee2fbcd12187b19506b60e68e3d">bodyB</a>,</div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span>  <span class="keyword">const</span> <a class="code" href="structb2_vec2.html">b2Vec2</a>& <a class="code" href="structb2_pulley_joint_def.html#aae77c020ce4629ab9e03560e28aa853d">groundAnchorA</a>, <span class="keyword">const</span> <a class="code" href="structb2_vec2.html">b2Vec2</a>& <a class="code" href="structb2_pulley_joint_def.html#aa412b9f3bffd1fb69ace14f9b3e03b82">groundAnchorB</a>,</div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span>  <span class="keyword">const</span> <a class="code" href="structb2_vec2.html">b2Vec2</a>& anchorA, <span class="keyword">const</span> <a class="code" href="structb2_vec2.html">b2Vec2</a>& anchorB,</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>  float32 <a class="code" href="structb2_pulley_joint_def.html#af35074246aeacbf239c11682642b31f5">ratio</a>);</div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span> </div><div class="line"><a name="l00050"></a><span class="lineno"><a class="line" href="structb2_pulley_joint_def.html#aae77c020ce4629ab9e03560e28aa853d"> 50</a></span>  <a class="code" href="structb2_vec2.html">b2Vec2</a> <a class="code" href="structb2_pulley_joint_def.html#aae77c020ce4629ab9e03560e28aa853d">groundAnchorA</a>;</div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span> </div><div class="line"><a name="l00053"></a><span class="lineno"><a class="line" href="structb2_pulley_joint_def.html#aa412b9f3bffd1fb69ace14f9b3e03b82"> 53</a></span>  <a class="code" href="structb2_vec2.html">b2Vec2</a> <a class="code" href="structb2_pulley_joint_def.html#aa412b9f3bffd1fb69ace14f9b3e03b82">groundAnchorB</a>;</div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span> </div><div class="line"><a name="l00056"></a><span class="lineno"><a class="line" href="structb2_pulley_joint_def.html#ad7677a4ad02a6e7cb8699fc5012eac3e"> 56</a></span>  <a class="code" href="structb2_vec2.html">b2Vec2</a> <a class="code" href="structb2_pulley_joint_def.html#ad7677a4ad02a6e7cb8699fc5012eac3e">localAnchorA</a>;</div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span> </div><div class="line"><a name="l00059"></a><span class="lineno"><a class="line" href="structb2_pulley_joint_def.html#aed3f9c9f5f4145ceb32e7e164de73144"> 59</a></span>  <a class="code" href="structb2_vec2.html">b2Vec2</a> <a class="code" href="structb2_pulley_joint_def.html#aed3f9c9f5f4145ceb32e7e164de73144">localAnchorB</a>;</div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span> </div><div class="line"><a name="l00062"></a><span class="lineno"><a class="line" href="structb2_pulley_joint_def.html#a51d945882c1d7a78af2b0e9ffb31a33b"> 62</a></span>  float32 <a class="code" href="structb2_pulley_joint_def.html#a51d945882c1d7a78af2b0e9ffb31a33b">lengthA</a>;</div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span> </div><div class="line"><a name="l00065"></a><span class="lineno"><a class="line" href="structb2_pulley_joint_def.html#a5857d5b5b9880b6c8201ce3ee8c3eef0"> 65</a></span>  float32 <a class="code" href="structb2_pulley_joint_def.html#a5857d5b5b9880b6c8201ce3ee8c3eef0">lengthB</a>;</div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span> </div><div class="line"><a name="l00068"></a><span class="lineno"><a class="line" href="structb2_pulley_joint_def.html#af35074246aeacbf239c11682642b31f5"> 68</a></span>  float32 <a class="code" href="structb2_pulley_joint_def.html#af35074246aeacbf239c11682642b31f5">ratio</a>;</div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span> };</div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span> </div><div class="line"><a name="l00079"></a><span class="lineno"><a class="line" href="classb2_pulley_joint.html"> 79</a></span> <span class="keyword">class </span><a class="code" href="classb2_pulley_joint.html">b2PulleyJoint</a> : <span class="keyword">public</span> <a class="code" href="classb2_joint.html">b2Joint</a></div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span> {</div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span> <span class="keyword">public</span>:</div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span>  <a class="code" href="structb2_vec2.html">b2Vec2</a> <a class="code" href="classb2_pulley_joint.html#a345a3c79dc93e30a387b97e01864e20b">GetAnchorA</a>() <span class="keyword">const</span>;</div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span>  <a class="code" href="structb2_vec2.html">b2Vec2</a> <a class="code" href="classb2_pulley_joint.html#a593539f4419009c3a6e0e3718e2b1a70">GetAnchorB</a>() <span class="keyword">const</span>;</div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span> </div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span>  <a class="code" href="structb2_vec2.html">b2Vec2</a> <a class="code" href="classb2_pulley_joint.html#a6d8fbc90079bff055acd1ecd7d9fddbc">GetReactionForce</a>(float32 inv_dt) <span class="keyword">const</span>;</div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span>  float32 <a class="code" href="classb2_pulley_joint.html#a838b4e51ce58ddab869d0983f8cecfa8">GetReactionTorque</a>(float32 inv_dt) <span class="keyword">const</span>;</div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span> </div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span>  <a class="code" href="structb2_vec2.html">b2Vec2</a> <a class="code" href="classb2_pulley_joint.html#a082db0a3ab20f682b9c7d5f41f0cc79e">GetGroundAnchorA</a>() <span class="keyword">const</span>;</div><div class="line"><a name="l00090"></a><span class="lineno"> 90</span> </div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span>  <a class="code" href="structb2_vec2.html">b2Vec2</a> <a class="code" href="classb2_pulley_joint.html#afb105270ab46c3fc3f862cab6e127971">GetGroundAnchorB</a>() <span class="keyword">const</span>;</div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span> </div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span>  float32 <a class="code" href="classb2_pulley_joint.html#ac92d5def8d6d14777b255cbeea6b9c30">GetLengthA</a>() <span class="keyword">const</span>;</div><div class="line"><a name="l00096"></a><span class="lineno"> 96</span> </div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span>  float32 <a class="code" href="classb2_pulley_joint.html#a8558201dc81ba177f040ec7e12d78c8d">GetLengthB</a>() <span class="keyword">const</span>;</div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span> </div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span>  float32 <a class="code" href="classb2_pulley_joint.html#a130e85a48bfe54588d15766b94e3b2b2">GetRatio</a>() <span class="keyword">const</span>;</div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span> </div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span>  float32 <a class="code" href="classb2_pulley_joint.html#a4b4f29d81b7d2ffdda5af2f588f49ab6">GetCurrentLengthA</a>() <span class="keyword">const</span>;</div><div class="line"><a name="l00105"></a><span class="lineno"> 105</span> </div><div class="line"><a name="l00107"></a><span class="lineno"> 107</span>  float32 <a class="code" href="classb2_pulley_joint.html#aa2d15dc26b2df0a446ccda652058085d">GetCurrentLengthB</a>() <span class="keyword">const</span>;</div><div class="line"><a name="l00108"></a><span class="lineno"> 108</span> </div><div class="line"><a name="l00110"></a><span class="lineno"> 110</span>  <span class="keywordtype">void</span> <a class="code" href="classb2_pulley_joint.html#ad12d0e03b5d07b2f8af1005c95c67aa2">Dump</a>();</div><div class="line"><a name="l00111"></a><span class="lineno"> 111</span> </div><div class="line"><a name="l00113"></a><span class="lineno"> 113</span>  <span class="keywordtype">void</span> <a class="code" href="classb2_pulley_joint.html#a5b88d498ce306c4ff5ce99dec4811825">ShiftOrigin</a>(<span class="keyword">const</span> <a class="code" href="structb2_vec2.html">b2Vec2</a>& newOrigin);</div><div class="line"><a name="l00114"></a><span class="lineno"> 114</span> </div><div class="line"><a name="l00115"></a><span class="lineno"> 115</span> <span class="keyword">protected</span>:</div><div class="line"><a name="l00116"></a><span class="lineno"> 116</span> </div><div class="line"><a name="l00117"></a><span class="lineno"> 117</span>  <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classb2_joint.html">b2Joint</a>;</div><div class="line"><a name="l00118"></a><span class="lineno"> 118</span>  <a class="code" href="classb2_pulley_joint.html">b2PulleyJoint</a>(<span class="keyword">const</span> <a class="code" href="structb2_pulley_joint_def.html">b2PulleyJointDef</a>* data);</div><div class="line"><a name="l00119"></a><span class="lineno"> 119</span> </div><div class="line"><a name="l00120"></a><span class="lineno"> 120</span>  <span class="keywordtype">void</span> InitVelocityConstraints(<span class="keyword">const</span> <a class="code" href="structb2_solver_data.html">b2SolverData</a>& data);</div><div class="line"><a name="l00121"></a><span class="lineno"> 121</span>  <span class="keywordtype">void</span> SolveVelocityConstraints(<span class="keyword">const</span> <a class="code" href="structb2_solver_data.html">b2SolverData</a>& data);</div><div class="line"><a name="l00122"></a><span class="lineno"> 122</span>  <span class="keywordtype">bool</span> SolvePositionConstraints(<span class="keyword">const</span> <a class="code" href="structb2_solver_data.html">b2SolverData</a>& data);</div><div class="line"><a name="l00123"></a><span class="lineno"> 123</span> </div><div class="line"><a name="l00124"></a><span class="lineno"> 124</span>  <a class="code" href="structb2_vec2.html">b2Vec2</a> m_groundAnchorA;</div><div class="line"><a name="l00125"></a><span class="lineno"> 125</span>  <a class="code" href="structb2_vec2.html">b2Vec2</a> m_groundAnchorB;</div><div class="line"><a name="l00126"></a><span class="lineno"> 126</span>  float32 m_lengthA;</div><div class="line"><a name="l00127"></a><span class="lineno"> 127</span>  float32 m_lengthB;</div><div class="line"><a name="l00128"></a><span class="lineno"> 128</span>  </div><div class="line"><a name="l00129"></a><span class="lineno"> 129</span>  <span class="comment">// Solver shared</span></div><div class="line"><a name="l00130"></a><span class="lineno"> 130</span>  <a class="code" href="structb2_vec2.html">b2Vec2</a> m_localAnchorA;</div><div class="line"><a name="l00131"></a><span class="lineno"> 131</span>  <a class="code" href="structb2_vec2.html">b2Vec2</a> m_localAnchorB;</div><div class="line"><a name="l00132"></a><span class="lineno"> 132</span>  float32 m_constant;</div><div class="line"><a name="l00133"></a><span class="lineno"> 133</span>  float32 m_ratio;</div><div class="line"><a name="l00134"></a><span class="lineno"> 134</span>  float32 m_impulse;</div><div class="line"><a name="l00135"></a><span class="lineno"> 135</span> </div><div class="line"><a name="l00136"></a><span class="lineno"> 136</span>  <span class="comment">// Solver temp</span></div><div class="line"><a name="l00137"></a><span class="lineno"> 137</span>  int32 m_indexA;</div><div class="line"><a name="l00138"></a><span class="lineno"> 138</span>  int32 m_indexB;</div><div class="line"><a name="l00139"></a><span class="lineno"> 139</span>  <a class="code" href="structb2_vec2.html">b2Vec2</a> m_uA;</div><div class="line"><a name="l00140"></a><span class="lineno"> 140</span>  <a class="code" href="structb2_vec2.html">b2Vec2</a> m_uB;</div><div class="line"><a name="l00141"></a><span class="lineno"> 141</span>  <a class="code" href="structb2_vec2.html">b2Vec2</a> m_rA;</div><div class="line"><a name="l00142"></a><span class="lineno"> 142</span>  <a class="code" href="structb2_vec2.html">b2Vec2</a> m_rB;</div><div class="line"><a name="l00143"></a><span class="lineno"> 143</span>  <a class="code" href="structb2_vec2.html">b2Vec2</a> m_localCenterA;</div><div class="line"><a name="l00144"></a><span class="lineno"> 144</span>  <a class="code" href="structb2_vec2.html">b2Vec2</a> m_localCenterB;</div><div class="line"><a name="l00145"></a><span class="lineno"> 145</span>  float32 m_invMassA;</div><div class="line"><a name="l00146"></a><span class="lineno"> 146</span>  float32 m_invMassB;</div><div class="line"><a name="l00147"></a><span class="lineno"> 147</span>  float32 m_invIA;</div><div class="line"><a name="l00148"></a><span class="lineno"> 148</span>  float32 m_invIB;</div><div class="line"><a name="l00149"></a><span class="lineno"> 149</span>  float32 m_mass;</div><div class="line"><a name="l00150"></a><span class="lineno"> 150</span> };</div><div class="line"><a name="l00151"></a><span class="lineno"> 151</span> </div><div class="line"><a name="l00152"></a><span class="lineno"> 152</span> <span class="preprocessor">#endif</span></div><div class="ttc" id="structb2_joint_def_html_a8cd54c93da396be75a9788f2c6897f05"><div class="ttname"><a href="structb2_joint_def.html#a8cd54c93da396be75a9788f2c6897f05">b2JointDef::bodyA</a></div><div class="ttdeci">b2Body * bodyA</div><div class="ttdoc">The first attached body. </div><div class="ttdef"><b>Definition:</b> b2Joint.h:92</div></div> <div class="ttc" id="structb2_joint_def_html_aa4f4dee2fbcd12187b19506b60e68e3d"><div class="ttname"><a href="structb2_joint_def.html#aa4f4dee2fbcd12187b19506b60e68e3d">b2JointDef::bodyB</a></div><div class="ttdeci">b2Body * bodyB</div><div class="ttdoc">The second attached body. </div><div class="ttdef"><b>Definition:</b> b2Joint.h:95</div></div> <div class="ttc" id="structb2_pulley_joint_def_html_a5857d5b5b9880b6c8201ce3ee8c3eef0"><div class="ttname"><a href="structb2_pulley_joint_def.html#a5857d5b5b9880b6c8201ce3ee8c3eef0">b2PulleyJointDef::lengthB</a></div><div class="ttdeci">float32 lengthB</div><div class="ttdoc">The a reference length for the segment attached to bodyB. </div><div class="ttdef"><b>Definition:</b> b2PulleyJoint.h:65</div></div> <div class="ttc" id="classb2_pulley_joint_html_a5b88d498ce306c4ff5ce99dec4811825"><div class="ttname"><a href="classb2_pulley_joint.html#a5b88d498ce306c4ff5ce99dec4811825">b2PulleyJoint::ShiftOrigin</a></div><div class="ttdeci">void ShiftOrigin(const b2Vec2 &newOrigin)</div><div class="ttdoc">Implement b2Joint::ShiftOrigin. </div><div class="ttdef"><b>Definition:</b> b2PulleyJoint.cpp:344</div></div> <div class="ttc" id="classb2_pulley_joint_html_a6d8fbc90079bff055acd1ecd7d9fddbc"><div class="ttname"><a href="classb2_pulley_joint.html#a6d8fbc90079bff055acd1ecd7d9fddbc">b2PulleyJoint::GetReactionForce</a></div><div class="ttdeci">b2Vec2 GetReactionForce(float32 inv_dt) const</div><div class="ttdoc">Get the reaction force on bodyB at the joint anchor in Newtons. </div><div class="ttdef"><b>Definition:</b> b2PulleyJoint.cpp:272</div></div> <div class="ttc" id="classb2_joint_html"><div class="ttname"><a href="classb2_joint.html">b2Joint</a></div><div class="ttdef"><b>Definition:</b> b2Joint.h:103</div></div> <div class="ttc" id="classb2_pulley_joint_html_a593539f4419009c3a6e0e3718e2b1a70"><div class="ttname"><a href="classb2_pulley_joint.html#a593539f4419009c3a6e0e3718e2b1a70">b2PulleyJoint::GetAnchorB</a></div><div class="ttdeci">b2Vec2 GetAnchorB() const</div><div class="ttdoc">Get the anchor point on bodyB in world coordinates. </div><div class="ttdef"><b>Definition:</b> b2PulleyJoint.cpp:267</div></div> <div class="ttc" id="classb2_pulley_joint_html_a4b4f29d81b7d2ffdda5af2f588f49ab6"><div class="ttname"><a href="classb2_pulley_joint.html#a4b4f29d81b7d2ffdda5af2f588f49ab6">b2PulleyJoint::GetCurrentLengthA</a></div><div class="ttdeci">float32 GetCurrentLengthA() const</div><div class="ttdoc">Get the current length of the segment attached to bodyA. </div><div class="ttdef"><b>Definition:</b> b2PulleyJoint.cpp:309</div></div> <div class="ttc" id="structb2_vec2_html_a4d61640a645e470a50b451307d8e94c3"><div class="ttname"><a href="structb2_vec2.html#a4d61640a645e470a50b451307d8e94c3">b2Vec2::Set</a></div><div class="ttdeci">void Set(float32 x_, float32 y_)</div><div class="ttdoc">Set this vector to some specified coordinates. </div><div class="ttdef"><b>Definition:</b> b2Math.h:65</div></div> <div class="ttc" id="structb2_pulley_joint_def_html_af35074246aeacbf239c11682642b31f5"><div class="ttname"><a href="structb2_pulley_joint_def.html#af35074246aeacbf239c11682642b31f5">b2PulleyJointDef::ratio</a></div><div class="ttdeci">float32 ratio</div><div class="ttdoc">The pulley ratio, used to simulate a block-and-tackle. </div><div class="ttdef"><b>Definition:</b> b2PulleyJoint.h:68</div></div> <div class="ttc" id="classb2_pulley_joint_html_ad12d0e03b5d07b2f8af1005c95c67aa2"><div class="ttname"><a href="classb2_pulley_joint.html#ad12d0e03b5d07b2f8af1005c95c67aa2">b2PulleyJoint::Dump</a></div><div class="ttdeci">void Dump()</div><div class="ttdoc">Dump joint to dmLog. </div><div class="ttdef"><b>Definition:</b> b2PulleyJoint.cpp:325</div></div> <div class="ttc" id="classb2_pulley_joint_html_a838b4e51ce58ddab869d0983f8cecfa8"><div class="ttname"><a href="classb2_pulley_joint.html#a838b4e51ce58ddab869d0983f8cecfa8">b2PulleyJoint::GetReactionTorque</a></div><div class="ttdeci">float32 GetReactionTorque(float32 inv_dt) const</div><div class="ttdoc">Get the reaction torque on bodyB in N*m. </div><div class="ttdef"><b>Definition:</b> b2PulleyJoint.cpp:278</div></div> <div class="ttc" id="classb2_pulley_joint_html_a345a3c79dc93e30a387b97e01864e20b"><div class="ttname"><a href="classb2_pulley_joint.html#a345a3c79dc93e30a387b97e01864e20b">b2PulleyJoint::GetAnchorA</a></div><div class="ttdeci">b2Vec2 GetAnchorA() const</div><div class="ttdoc">Get the anchor point on bodyA in world coordinates. </div><div class="ttdef"><b>Definition:</b> b2PulleyJoint.cpp:262</div></div> <div class="ttc" id="structb2_joint_def_html_a470f2879b24adb05facbd49f338856fb"><div class="ttname"><a href="structb2_joint_def.html#a470f2879b24adb05facbd49f338856fb">b2JointDef::type</a></div><div class="ttdeci">b2JointType type</div><div class="ttdoc">The joint type is set automatically for concrete joint types. </div><div class="ttdef"><b>Definition:</b> b2Joint.h:86</div></div> <div class="ttc" id="structb2_joint_def_html_aef099a1f89b64e230173b6016848ea9b"><div class="ttname"><a href="structb2_joint_def.html#aef099a1f89b64e230173b6016848ea9b">b2JointDef::collideConnected</a></div><div class="ttdeci">bool collideConnected</div><div class="ttdoc">Set this flag to true if the attached bodies should collide. </div><div class="ttdef"><b>Definition:</b> b2Joint.h:98</div></div> <div class="ttc" id="classb2_pulley_joint_html_a082db0a3ab20f682b9c7d5f41f0cc79e"><div class="ttname"><a href="classb2_pulley_joint.html#a082db0a3ab20f682b9c7d5f41f0cc79e">b2PulleyJoint::GetGroundAnchorA</a></div><div class="ttdeci">b2Vec2 GetGroundAnchorA() const</div><div class="ttdoc">Get the first ground anchor. </div><div class="ttdef"><b>Definition:</b> b2PulleyJoint.cpp:284</div></div> <div class="ttc" id="structb2_solver_data_html"><div class="ttname"><a href="structb2_solver_data.html">b2SolverData</a></div><div class="ttdoc">Solver Data. </div><div class="ttdef"><b>Definition:</b> b2TimeStep.h:63</div></div> <div class="ttc" id="classb2_pulley_joint_html_afb105270ab46c3fc3f862cab6e127971"><div class="ttname"><a href="classb2_pulley_joint.html#afb105270ab46c3fc3f862cab6e127971">b2PulleyJoint::GetGroundAnchorB</a></div><div class="ttdeci">b2Vec2 GetGroundAnchorB() const</div><div class="ttdoc">Get the second ground anchor. </div><div class="ttdef"><b>Definition:</b> b2PulleyJoint.cpp:289</div></div> <div class="ttc" id="classb2_pulley_joint_html_ac92d5def8d6d14777b255cbeea6b9c30"><div class="ttname"><a href="classb2_pulley_joint.html#ac92d5def8d6d14777b255cbeea6b9c30">b2PulleyJoint::GetLengthA</a></div><div class="ttdeci">float32 GetLengthA() const</div><div class="ttdoc">Get the current length of the segment attached to bodyA. </div><div class="ttdef"><b>Definition:</b> b2PulleyJoint.cpp:294</div></div> <div class="ttc" id="structb2_joint_def_html"><div class="ttname"><a href="structb2_joint_def.html">b2JointDef</a></div><div class="ttdoc">Joint definitions are used to construct joints. </div><div class="ttdef"><b>Definition:</b> b2Joint.h:74</div></div> <div class="ttc" id="structb2_pulley_joint_def_html"><div class="ttname"><a href="structb2_pulley_joint_def.html">b2PulleyJointDef</a></div><div class="ttdef"><b>Definition:</b> b2PulleyJoint.h:28</div></div> <div class="ttc" id="classb2_body_html"><div class="ttname"><a href="classb2_body.html">b2Body</a></div><div class="ttdoc">A rigid body. These are created via b2World::CreateBody. </div><div class="ttdef"><b>Definition:</b> b2Body.h:126</div></div> <div class="ttc" id="structb2_pulley_joint_def_html_aae77c020ce4629ab9e03560e28aa853d"><div class="ttname"><a href="structb2_pulley_joint_def.html#aae77c020ce4629ab9e03560e28aa853d">b2PulleyJointDef::groundAnchorA</a></div><div class="ttdeci">b2Vec2 groundAnchorA</div><div class="ttdoc">The first ground anchor in world coordinates. This point never moves. </div><div class="ttdef"><b>Definition:</b> b2PulleyJoint.h:50</div></div> <div class="ttc" id="structb2_pulley_joint_def_html_a51d945882c1d7a78af2b0e9ffb31a33b"><div class="ttname"><a href="structb2_pulley_joint_def.html#a51d945882c1d7a78af2b0e9ffb31a33b">b2PulleyJointDef::lengthA</a></div><div class="ttdeci">float32 lengthA</div><div class="ttdoc">The a reference length for the segment attached to bodyA. </div><div class="ttdef"><b>Definition:</b> b2PulleyJoint.h:62</div></div> <div class="ttc" id="structb2_vec2_html"><div class="ttname"><a href="structb2_vec2.html">b2Vec2</a></div><div class="ttdoc">A 2D column vector. </div><div class="ttdef"><b>Definition:</b> b2Math.h:53</div></div> <div class="ttc" id="classb2_pulley_joint_html_a8558201dc81ba177f040ec7e12d78c8d"><div class="ttname"><a href="classb2_pulley_joint.html#a8558201dc81ba177f040ec7e12d78c8d">b2PulleyJoint::GetLengthB</a></div><div class="ttdeci">float32 GetLengthB() const</div><div class="ttdoc">Get the current length of the segment attached to bodyB. </div><div class="ttdef"><b>Definition:</b> b2PulleyJoint.cpp:299</div></div> <div class="ttc" id="classb2_pulley_joint_html_aa2d15dc26b2df0a446ccda652058085d"><div class="ttname"><a href="classb2_pulley_joint.html#aa2d15dc26b2df0a446ccda652058085d">b2PulleyJoint::GetCurrentLengthB</a></div><div class="ttdeci">float32 GetCurrentLengthB() const</div><div class="ttdoc">Get the current length of the segment attached to bodyB. </div><div class="ttdef"><b>Definition:</b> b2PulleyJoint.cpp:317</div></div> <div class="ttc" id="structb2_pulley_joint_def_html_aed3f9c9f5f4145ceb32e7e164de73144"><div class="ttname"><a href="structb2_pulley_joint_def.html#aed3f9c9f5f4145ceb32e7e164de73144">b2PulleyJointDef::localAnchorB</a></div><div class="ttdeci">b2Vec2 localAnchorB</div><div class="ttdoc">The local anchor point relative to bodyB&#39;s origin. </div><div class="ttdef"><b>Definition:</b> b2PulleyJoint.h:59</div></div> <div class="ttc" id="structb2_pulley_joint_def_html_ad7677a4ad02a6e7cb8699fc5012eac3e"><div class="ttname"><a href="structb2_pulley_joint_def.html#ad7677a4ad02a6e7cb8699fc5012eac3e">b2PulleyJointDef::localAnchorA</a></div><div class="ttdeci">b2Vec2 localAnchorA</div><div class="ttdoc">The local anchor point relative to bodyA&#39;s origin. </div><div class="ttdef"><b>Definition:</b> b2PulleyJoint.h:56</div></div> <div class="ttc" id="classb2_pulley_joint_html_a130e85a48bfe54588d15766b94e3b2b2"><div class="ttname"><a href="classb2_pulley_joint.html#a130e85a48bfe54588d15766b94e3b2b2">b2PulleyJoint::GetRatio</a></div><div class="ttdeci">float32 GetRatio() const</div><div class="ttdoc">Get the pulley ratio. </div><div class="ttdef"><b>Definition:</b> b2PulleyJoint.cpp:304</div></div> <div class="ttc" id="classb2_pulley_joint_html"><div class="ttname"><a href="classb2_pulley_joint.html">b2PulleyJoint</a></div><div class="ttdef"><b>Definition:</b> b2PulleyJoint.h:79</div></div> <div class="ttc" id="structb2_pulley_joint_def_html_abef614a93562b82aa3b5f8cac17d1ce8"><div class="ttname"><a href="structb2_pulley_joint_def.html#abef614a93562b82aa3b5f8cac17d1ce8">b2PulleyJointDef::Initialize</a></div><div class="ttdeci">void Initialize(b2Body *bodyA, b2Body *bodyB, const b2Vec2 &groundAnchorA, const b2Vec2 &groundAnchorB, const b2Vec2 &anchorA, const b2Vec2 &anchorB, float32 ratio)</div><div class="ttdoc">Initialize the bodies, anchors, lengths, max lengths, and ratio using the world anchors. </div><div class="ttdef"><b>Definition:</b> b2PulleyJoint.cpp:35</div></div> <div class="ttc" id="structb2_pulley_joint_def_html_aa412b9f3bffd1fb69ace14f9b3e03b82"><div class="ttname"><a href="structb2_pulley_joint_def.html#aa412b9f3bffd1fb69ace14f9b3e03b82">b2PulleyJointDef::groundAnchorB</a></div><div class="ttdeci">b2Vec2 groundAnchorB</div><div class="ttdoc">The second ground anchor in world coordinates. This point never moves. </div><div class="ttdef"><b>Definition:</b> b2PulleyJoint.h:53</div></div> </div><!-- fragment --></div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> Generated on Fri Sep 21 2018 22:35:06 for Box2D by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.14 </small></address> </body> </html>