<!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.3.1"/>
<title>Chipmunk2D Pro API Reference: cpConstraint.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/search.js"></script>
<script type="text/javascript">
$(document).ready(function() { searchBox.OnSelectItem(0); });
</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 style="padding-left: 0.5em;">
<div id="projectname">Chipmunk2D Pro API Reference
 <span id="projectnumber">7.0.1</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.3.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File List</span></a></li>
</ul>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Properties</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark"> </span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark"> </span>Pages</a></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_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_b3ea4b336b4fb233f74b44c85fbba508.html">chipmunk</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">cpConstraint.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">/* Copyright (c) 2013 Scott Lembcke and Howling Moon Software</span></div>
<div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment"> * </span></div>
<div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment"> * Permission is hereby granted, free of charge, to any person obtaining a copy</span></div>
<div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment"> * of this software and associated documentation files (the "Software"), to deal</span></div>
<div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment"> * in the Software without restriction, including without limitation the rights</span></div>
<div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment"> * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell</span></div>
<div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment"> * copies of the Software, and to permit persons to whom the Software is</span></div>
<div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment"> * furnished to do so, subject to the following conditions:</span></div>
<div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment"> * </span></div>
<div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment"> * The above copyright notice and this permission notice shall be included in</span></div>
<div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment"> * all copies or substantial portions of the Software.</span></div>
<div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="comment"> * </span></div>
<div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="comment"> * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR</span></div>
<div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="comment"> * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,</span></div>
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="comment"> * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE</span></div>
<div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="comment"> * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER</span></div>
<div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="comment"> * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,</span></div>
<div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="comment"> * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE</span></div>
<div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="comment"> * SOFTWARE.</span></div>
<div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="comment"> */</span></div>
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span> </div>
<div class="line"><a name="l00024"></a><span class="lineno"> 24</span> </div>
<div class="line"><a name="l00026"></a><span class="lineno"><a class="code" href="group__cp_constraint.html#ga31a2ad1ca9b9ecd4124a81b1292714e0"> 26</a></span> <span class="keyword">typedef</span> void (*<a class="code" href="group__cp_constraint.html#ga31a2ad1ca9b9ecd4124a81b1292714e0" title="Callback function type that gets called before solving a joint.">cpConstraintPreSolveFunc</a>)(<a class="code" href="structcp_constraint.html">cpConstraint</a> *constraint, <a class="code" href="structcp_space.html">cpSpace</a> *space);</div>
<div class="line"><a name="l00028"></a><span class="lineno"><a class="code" href="group__cp_constraint.html#ga1adf3ccceb908229069aa2f10f21c1b1"> 28</a></span> <span class="keyword">typedef</span> void (*<a class="code" href="group__cp_constraint.html#ga1adf3ccceb908229069aa2f10f21c1b1" title="Callback function type that gets called after solving a joint.">cpConstraintPostSolveFunc</a>)(<a class="code" href="structcp_constraint.html">cpConstraint</a> *constraint, <a class="code" href="structcp_space.html">cpSpace</a> *space);</div>
<div class="line"><a name="l00029"></a><span class="lineno"> 29</span> </div>
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span> CP_EXPORT <span class="keywordtype">void</span> <a class="code" href="group__cp_constraint.html#ga126b8fae3e1ac798ed986112cbdec701" title="Destroy a constraint.">cpConstraintDestroy</a>(<a class="code" href="structcp_constraint.html">cpConstraint</a> *constraint);</div>
<div class="line"><a name="l00033"></a><span class="lineno"> 33</span> CP_EXPORT <span class="keywordtype">void</span> <a class="code" href="group__cp_constraint.html#ga00928cb83dfaeb0b7eed7d6e635fdffd" title="Destroy and free a constraint.">cpConstraintFree</a>(<a class="code" href="structcp_constraint.html">cpConstraint</a> *constraint);</div>
<div class="line"><a name="l00034"></a><span class="lineno"> 34</span> </div>
<div class="line"><a name="l00036"></a><span class="lineno"> 36</span> CP_EXPORT <a class="code" href="structcp_space.html">cpSpace</a>* <a class="code" href="group__cp_constraint.html#ga3931c29e2d1807288fc01fb73a31eb19" title="Get the cpSpace this constraint is added to.">cpConstraintGetSpace</a>(<span class="keyword">const</span> <a class="code" href="structcp_constraint.html">cpConstraint</a> *constraint);</div>
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span> </div>
<div class="line"><a name="l00039"></a><span class="lineno"> 39</span> CP_EXPORT <a class="code" href="structcp_body.html">cpBody</a>* <a class="code" href="group__cp_constraint.html#gaaaee19a1453191b8555eca1ea0478f90" title="Get the first body the constraint is attached to.">cpConstraintGetBodyA</a>(<span class="keyword">const</span> <a class="code" href="structcp_constraint.html">cpConstraint</a> *constraint);</div>
<div class="line"><a name="l00040"></a><span class="lineno"> 40</span> </div>
<div class="line"><a name="l00042"></a><span class="lineno"> 42</span> CP_EXPORT <a class="code" href="structcp_body.html">cpBody</a>* <a class="code" href="group__cp_constraint.html#ga880a7c59fdd5bc37a775c458888898d6" title="Get the second body the constraint is attached to.">cpConstraintGetBodyB</a>(<span class="keyword">const</span> <a class="code" href="structcp_constraint.html">cpConstraint</a> *constraint);</div>
<div class="line"><a name="l00043"></a><span class="lineno"> 43</span> </div>
<div class="line"><a name="l00045"></a><span class="lineno"> 45</span> CP_EXPORT <a class="code" href="group__basic_types.html#gac1ed65573e035bf892505768c852d8d3" title="Chipmunk's floating point type.">cpFloat</a> <a class="code" href="group__cp_constraint.html#ga2acc66455fd36f4aa202220cf7dff85b" title="Get the maximum force that this constraint is allowed to use.">cpConstraintGetMaxForce</a>(<span class="keyword">const</span> <a class="code" href="structcp_constraint.html">cpConstraint</a> *constraint);</div>
<div class="line"><a name="l00047"></a><span class="lineno"> 47</span> CP_EXPORT <span class="keywordtype">void</span> <a class="code" href="group__cp_constraint.html#gafadafd0fd9fb76eeffec535ecb0a8b1e" title="Set the maximum force that this constraint is allowed to use. (defaults to INFINITY)">cpConstraintSetMaxForce</a>(<a class="code" href="structcp_constraint.html">cpConstraint</a> *constraint, <a class="code" href="group__basic_types.html#gac1ed65573e035bf892505768c852d8d3" title="Chipmunk's floating point type.">cpFloat</a> maxForce);</div>
<div class="line"><a name="l00048"></a><span class="lineno"> 48</span> </div>
<div class="line"><a name="l00050"></a><span class="lineno"> 50</span> CP_EXPORT <a class="code" href="group__basic_types.html#gac1ed65573e035bf892505768c852d8d3" title="Chipmunk's floating point type.">cpFloat</a> <a class="code" href="group__cp_constraint.html#gadffe7197ac17d8cef847e71fa74d6b2d" title="Get rate at which joint error is corrected.">cpConstraintGetErrorBias</a>(<span class="keyword">const</span> <a class="code" href="structcp_constraint.html">cpConstraint</a> *constraint);</div>
<div class="line"><a name="l00054"></a><span class="lineno"> 54</span> CP_EXPORT <span class="keywordtype">void</span> <a class="code" href="group__cp_constraint.html#gacd4448af488e19721f3755f9ddaece9d" title="Set rate at which joint error is corrected.">cpConstraintSetErrorBias</a>(<a class="code" href="structcp_constraint.html">cpConstraint</a> *constraint, <a class="code" href="group__basic_types.html#gac1ed65573e035bf892505768c852d8d3" title="Chipmunk's floating point type.">cpFloat</a> errorBias);</div>
<div class="line"><a name="l00055"></a><span class="lineno"> 55</span> </div>
<div class="line"><a name="l00057"></a><span class="lineno"> 57</span> CP_EXPORT <a class="code" href="group__basic_types.html#gac1ed65573e035bf892505768c852d8d3" title="Chipmunk's floating point type.">cpFloat</a> <a class="code" href="group__cp_constraint.html#ga7218069af911d5886d6562f8b62e844d" title="Get the maximum rate at which joint error is corrected.">cpConstraintGetMaxBias</a>(<span class="keyword">const</span> <a class="code" href="structcp_constraint.html">cpConstraint</a> *constraint);</div>
<div class="line"><a name="l00059"></a><span class="lineno"> 59</span> CP_EXPORT <span class="keywordtype">void</span> <a class="code" href="group__cp_constraint.html#ga22259bf6a01a04075e17c24c6167ced4" title="Set the maximum rate at which joint error is corrected. (defaults to INFINITY)">cpConstraintSetMaxBias</a>(<a class="code" href="structcp_constraint.html">cpConstraint</a> *constraint, <a class="code" href="group__basic_types.html#gac1ed65573e035bf892505768c852d8d3" title="Chipmunk's floating point type.">cpFloat</a> maxBias);</div>
<div class="line"><a name="l00060"></a><span class="lineno"> 60</span> </div>
<div class="line"><a name="l00062"></a><span class="lineno"> 62</span> CP_EXPORT <a class="code" href="group__basic_types.html#gabc5e752c48f3449ca26ef413ecbd647e" title="Chipmunk's boolean type.">cpBool</a> <a class="code" href="group__cp_constraint.html#gab01d5a088b2f2882d8b00fbd11cb5dd5" title="Get if the two bodies connected by the constraint are allowed to collide or not.">cpConstraintGetCollideBodies</a>(<span class="keyword">const</span> <a class="code" href="structcp_constraint.html">cpConstraint</a> *constraint);</div>
<div class="line"><a name="l00064"></a><span class="lineno"> 64</span> CP_EXPORT <span class="keywordtype">void</span> <a class="code" href="group__cp_constraint.html#ga4083314e3017e089d43ea6baa8c93adf" title="Set if the two bodies connected by the constraint are allowed to collide or not. (defaults to cpFalse...">cpConstraintSetCollideBodies</a>(<a class="code" href="structcp_constraint.html">cpConstraint</a> *constraint, <a class="code" href="group__basic_types.html#gabc5e752c48f3449ca26ef413ecbd647e" title="Chipmunk's boolean type.">cpBool</a> collideBodies);</div>
<div class="line"><a name="l00065"></a><span class="lineno"> 65</span> </div>
<div class="line"><a name="l00067"></a><span class="lineno"> 67</span> CP_EXPORT <a class="code" href="group__cp_constraint.html#ga31a2ad1ca9b9ecd4124a81b1292714e0" title="Callback function type that gets called before solving a joint.">cpConstraintPreSolveFunc</a> <a class="code" href="group__cp_constraint.html#ga7d42a75c670eb34e590f66b7a2de70f9" title="Get the pre-solve function that is called before the solver runs.">cpConstraintGetPreSolveFunc</a>(<span class="keyword">const</span> <a class="code" href="structcp_constraint.html">cpConstraint</a> *constraint);</div>
<div class="line"><a name="l00069"></a><span class="lineno"> 69</span> CP_EXPORT <span class="keywordtype">void</span> <a class="code" href="group__cp_constraint.html#gac2dfaa821d91dc3e0ad4c31568e92c8c" title="Set the pre-solve function that is called before the solver runs.">cpConstraintSetPreSolveFunc</a>(<a class="code" href="structcp_constraint.html">cpConstraint</a> *constraint, <a class="code" href="group__cp_constraint.html#ga31a2ad1ca9b9ecd4124a81b1292714e0" title="Callback function type that gets called before solving a joint.">cpConstraintPreSolveFunc</a> preSolveFunc);</div>
<div class="line"><a name="l00070"></a><span class="lineno"> 70</span> </div>
<div class="line"><a name="l00072"></a><span class="lineno"> 72</span> CP_EXPORT <a class="code" href="group__cp_constraint.html#ga1adf3ccceb908229069aa2f10f21c1b1" title="Callback function type that gets called after solving a joint.">cpConstraintPostSolveFunc</a> <a class="code" href="group__cp_constraint.html#gab7bad11fece5dc9349626227925e4438" title="Get the post-solve function that is called before the solver runs.">cpConstraintGetPostSolveFunc</a>(<span class="keyword">const</span> <a class="code" href="structcp_constraint.html">cpConstraint</a> *constraint);</div>
<div class="line"><a name="l00074"></a><span class="lineno"> 74</span> CP_EXPORT <span class="keywordtype">void</span> <a class="code" href="group__cp_constraint.html#ga37730c4854e0803955b1b29cafa005d6" title="Set the post-solve function that is called before the solver runs.">cpConstraintSetPostSolveFunc</a>(<a class="code" href="structcp_constraint.html">cpConstraint</a> *constraint, <a class="code" href="group__cp_constraint.html#ga1adf3ccceb908229069aa2f10f21c1b1" title="Callback function type that gets called after solving a joint.">cpConstraintPostSolveFunc</a> postSolveFunc);</div>
<div class="line"><a name="l00075"></a><span class="lineno"> 75</span> </div>
<div class="line"><a name="l00077"></a><span class="lineno"> 77</span> CP_EXPORT <a class="code" href="group__basic_types.html#ga2ac2c3c31e21893941f9e4f8ee279447" title="Type used for user data pointers.">cpDataPointer</a> <a class="code" href="group__cp_constraint.html#gaf81f9f4d9d420c5746ad722c04c8388a" title="Get the user definable data pointer for this constraint.">cpConstraintGetUserData</a>(<span class="keyword">const</span> <a class="code" href="structcp_constraint.html">cpConstraint</a> *constraint);</div>
<div class="line"><a name="l00079"></a><span class="lineno"> 79</span> CP_EXPORT <span class="keywordtype">void</span> <a class="code" href="group__cp_constraint.html#ga3dc0f22f04eb955f16b11212a9e8b37f" title="Set the user definable data pointer for this constraint.">cpConstraintSetUserData</a>(<a class="code" href="structcp_constraint.html">cpConstraint</a> *constraint, <a class="code" href="group__basic_types.html#ga2ac2c3c31e21893941f9e4f8ee279447" title="Type used for user data pointers.">cpDataPointer</a> userData);</div>
<div class="line"><a name="l00080"></a><span class="lineno"> 80</span> </div>
<div class="line"><a name="l00082"></a><span class="lineno"> 82</span> CP_EXPORT <a class="code" href="group__basic_types.html#gac1ed65573e035bf892505768c852d8d3" title="Chipmunk's floating point type.">cpFloat</a> <a class="code" href="group__cp_constraint.html#ga742285346b076309fc021eed1af34483" title="Get the last impulse applied by this constraint.">cpConstraintGetImpulse</a>(<a class="code" href="structcp_constraint.html">cpConstraint</a> *constraint);</div>
<div class="line"><a name="l00083"></a><span class="lineno"> 83</span> </div>
<div class="line"><a name="l00084"></a><span class="lineno"> 84</span> <span class="preprocessor">#include "cpPinJoint.h"</span></div>
<div class="line"><a name="l00085"></a><span class="lineno"> 85</span> <span class="preprocessor">#include "cpSlideJoint.h"</span></div>
<div class="line"><a name="l00086"></a><span class="lineno"> 86</span> <span class="preprocessor">#include "cpPivotJoint.h"</span></div>
<div class="line"><a name="l00087"></a><span class="lineno"> 87</span> <span class="preprocessor">#include "cpGrooveJoint.h"</span></div>
<div class="line"><a name="l00088"></a><span class="lineno"> 88</span> <span class="preprocessor">#include "cpDampedSpring.h"</span></div>
<div class="line"><a name="l00089"></a><span class="lineno"> 89</span> <span class="preprocessor">#include "cpDampedRotarySpring.h"</span></div>
<div class="line"><a name="l00090"></a><span class="lineno"> 90</span> <span class="preprocessor">#include "cpRotaryLimitJoint.h"</span></div>
<div class="line"><a name="l00091"></a><span class="lineno"> 91</span> <span class="preprocessor">#include "cpRatchetJoint.h"</span></div>
<div class="line"><a name="l00092"></a><span class="lineno"> 92</span> <span class="preprocessor">#include "cpGearJoint.h"</span></div>
<div class="line"><a name="l00093"></a><span class="lineno"> 93</span> <span class="preprocessor">#include "cpSimpleMotor.h"</span></div>
<div class="line"><a name="l00094"></a><span class="lineno"> 94</span> </div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Thu Jul 2 2015 11:28:11 for Chipmunk2D Pro API Reference by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.3.1
</small></address>
</body>
</html>