<!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: cpSpace.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">cpSpace.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="l00025"></a><span class="lineno"> 25</span> <span class="comment">//MARK: Definitions</span></div>
<div class="line"><a name="l00026"></a><span class="lineno"> 26</span> </div>
<div class="line"><a name="l00030"></a><span class="lineno"><a class="code" href="group__cp_space.html#ga540b33c7101fa18af20478de092219a2"> 30</a></span> <span class="keyword">typedef</span> <a class="code" href="group__basic_types.html#gabc5e752c48f3449ca26ef413ecbd647e" title="Chipmunk's boolean type.">cpBool</a> (*<a class="code" href="group__cp_space.html#ga540b33c7101fa18af20478de092219a2" title="Collision begin event function callback type.">cpCollisionBeginFunc</a>)(<a class="code" href="structcp_arbiter.html">cpArbiter</a> *arb, <a class="code" href="structcp_space.html">cpSpace</a> *space, <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="l00033"></a><span class="lineno"><a class="code" href="group__cp_space.html#ga814274ae0b9ca98fd845f31aaa948395"> 33</a></span> <span class="keyword">typedef</span> <a class="code" href="group__basic_types.html#gabc5e752c48f3449ca26ef413ecbd647e" title="Chipmunk's boolean type.">cpBool</a> (*<a class="code" href="group__cp_space.html#ga814274ae0b9ca98fd845f31aaa948395" title="Collision pre-solve event function callback type.">cpCollisionPreSolveFunc</a>)(<a class="code" href="structcp_arbiter.html">cpArbiter</a> *arb, <a class="code" href="structcp_space.html">cpSpace</a> *space, <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="l00035"></a><span class="lineno"><a class="code" href="group__cp_space.html#ga74e103cb3c7e88fd7a9d0fbfc1944a31"> 35</a></span> <span class="keyword">typedef</span> void (*<a class="code" href="group__cp_space.html#ga74e103cb3c7e88fd7a9d0fbfc1944a31" title="Collision post-solve event function callback type.">cpCollisionPostSolveFunc</a>)(<a class="code" href="structcp_arbiter.html">cpArbiter</a> *arb, <a class="code" href="structcp_space.html">cpSpace</a> *space, <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="l00037"></a><span class="lineno"><a class="code" href="group__cp_space.html#ga9bf930c23907db6ce33636ae47b82524"> 37</a></span> <span class="keyword">typedef</span> void (*<a class="code" href="group__cp_space.html#ga9bf930c23907db6ce33636ae47b82524" title="Collision separate event function callback type.">cpCollisionSeparateFunc</a>)(<a class="code" href="structcp_arbiter.html">cpArbiter</a> *arb, <a class="code" href="structcp_space.html">cpSpace</a> *space, <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="l00038"></a><span class="lineno"> 38</span> </div>
<div class="line"><a name="l00041"></a><span class="lineno"><a class="code" href="structcp_collision_handler.html"> 41</a></span> <span class="keyword">struct </span><a class="code" href="structcp_collision_handler.html" title="Struct that holds function callback pointers to configure custom collision handling.">cpCollisionHandler</a> {</div>
<div class="line"><a name="l00044"></a><span class="lineno"><a class="code" href="structcp_collision_handler.html#a07bbc9d26af9d41cc87bae6514930d9f"> 44</a></span>  <span class="keyword">const</span> <a class="code" href="group__basic_types.html#gae83e2f50965eb441e36ffff1e32e6d02" title="Type used for cpSpace.collision_type.">cpCollisionType</a> <a class="code" href="structcp_collision_handler.html#a07bbc9d26af9d41cc87bae6514930d9f" title="Collision type identifier of the first shape that this handler recognizes.">typeA</a>;</div>
<div class="line"><a name="l00047"></a><span class="lineno"><a class="code" href="structcp_collision_handler.html#a7f9def10b179d18de37bec5b3c6d8621"> 47</a></span>  <span class="keyword">const</span> <a class="code" href="group__basic_types.html#gae83e2f50965eb441e36ffff1e32e6d02" title="Type used for cpSpace.collision_type.">cpCollisionType</a> <a class="code" href="structcp_collision_handler.html#a7f9def10b179d18de37bec5b3c6d8621" title="Collision type identifier of the second shape that this handler recognizes.">typeB</a>;</div>
<div class="line"><a name="l00049"></a><span class="lineno"><a class="code" href="structcp_collision_handler.html#a64f552c94d44dfd3844869ea9dada78f"> 49</a></span>  <a class="code" href="group__cp_space.html#ga540b33c7101fa18af20478de092219a2" title="Collision begin event function callback type.">cpCollisionBeginFunc</a> <a class="code" href="structcp_collision_handler.html#a64f552c94d44dfd3844869ea9dada78f" title="This function is called when two shapes with types that match this collision handler begin colliding...">beginFunc</a>;</div>
<div class="line"><a name="l00052"></a><span class="lineno"><a class="code" href="structcp_collision_handler.html#aff35bdeedae80600cbbb1a68682a7431"> 52</a></span>  <a class="code" href="group__cp_space.html#ga814274ae0b9ca98fd845f31aaa948395" title="Collision pre-solve event function callback type.">cpCollisionPreSolveFunc</a> <a class="code" href="structcp_collision_handler.html#aff35bdeedae80600cbbb1a68682a7431" title="This function is called each step when two shapes with types that match this collision handler are co...">preSolveFunc</a>;</div>
<div class="line"><a name="l00055"></a><span class="lineno"><a class="code" href="structcp_collision_handler.html#adc3df1896d48519cc5359c51bd67ac98"> 55</a></span>  <a class="code" href="group__cp_space.html#ga74e103cb3c7e88fd7a9d0fbfc1944a31" title="Collision post-solve event function callback type.">cpCollisionPostSolveFunc</a> <a class="code" href="structcp_collision_handler.html#adc3df1896d48519cc5359c51bd67ac98" title="This function is called each step when two shapes with types that match this collision handler are co...">postSolveFunc</a>;</div>
<div class="line"><a name="l00057"></a><span class="lineno"><a class="code" href="structcp_collision_handler.html#a1823a67807ba11b1bae7f41024cd6ce0"> 57</a></span>  <a class="code" href="group__cp_space.html#ga9bf930c23907db6ce33636ae47b82524" title="Collision separate event function callback type.">cpCollisionSeparateFunc</a> <a class="code" href="structcp_collision_handler.html#a1823a67807ba11b1bae7f41024cd6ce0" title="This function is called when two shapes with types that match this collision handler stop colliding...">separateFunc</a>;</div>
<div class="line"><a name="l00059"></a><span class="lineno"><a class="code" href="structcp_collision_handler.html#af2b874e87431e407a4045cb90d999b8a"> 59</a></span>  <a class="code" href="group__basic_types.html#ga2ac2c3c31e21893941f9e4f8ee279447" title="Type used for user data pointers.">cpDataPointer</a> <a class="code" href="structcp_collision_handler.html#af2b874e87431e407a4045cb90d999b8a" title="This is a user definable context pointer that is passed to all of the collision handler functions...">userData</a>;</div>
<div class="line"><a name="l00060"></a><span class="lineno"> 60</span> };</div>
<div class="line"><a name="l00061"></a><span class="lineno"> 61</span> </div>
<div class="line"><a name="l00062"></a><span class="lineno"> 62</span> <span class="comment">// TODO: Make timestep a parameter?</span></div>
<div class="line"><a name="l00063"></a><span class="lineno"> 63</span> </div>
<div class="line"><a name="l00064"></a><span class="lineno"> 64</span> </div>
<div class="line"><a name="l00065"></a><span class="lineno"> 65</span> <span class="comment">//MARK: Memory and Initialization</span></div>
<div class="line"><a name="l00066"></a><span class="lineno"> 66</span> </div>
<div class="line"><a name="l00068"></a><span class="lineno"> 68</span> CP_EXPORT <a class="code" href="structcp_space.html">cpSpace</a>* <a class="code" href="group__cp_space.html#ga5e651c82cae8cc6fe7c8997ac8f6d845" title="Allocate a cpSpace.">cpSpaceAlloc</a>(<span class="keywordtype">void</span>);</div>
<div class="line"><a name="l00070"></a><span class="lineno"> 70</span> CP_EXPORT <a class="code" href="structcp_space.html">cpSpace</a>* <a class="code" href="group__cp_space.html#ga48465620bca056caf5501bed44d142d8" title="Initialize a cpSpace.">cpSpaceInit</a>(<a class="code" href="structcp_space.html">cpSpace</a> *space);</div>
<div class="line"><a name="l00072"></a><span class="lineno"> 72</span> CP_EXPORT <a class="code" href="structcp_space.html">cpSpace</a>* <a class="code" href="group__cp_space.html#gae7566474e9ba9a1fac8d3e947aaaf967" title="Allocate and initialize a cpSpace.">cpSpaceNew</a>(<span class="keywordtype">void</span>);</div>
<div class="line"><a name="l00073"></a><span class="lineno"> 73</span> </div>
<div class="line"><a name="l00075"></a><span class="lineno"> 75</span> CP_EXPORT <span class="keywordtype">void</span> <a class="code" href="group__cp_space.html#gaaf1097ee4fb04f32c4e82271d7603d26" title="Destroy a cpSpace.">cpSpaceDestroy</a>(<a class="code" href="structcp_space.html">cpSpace</a> *space);</div>
<div class="line"><a name="l00077"></a><span class="lineno"> 77</span> CP_EXPORT <span class="keywordtype">void</span> <a class="code" href="group__cp_space.html#gab1bc162df996c03493be80d8220e5c8a" title="Destroy and free a cpSpace.">cpSpaceFree</a>(<a class="code" href="structcp_space.html">cpSpace</a> *space);</div>
<div class="line"><a name="l00078"></a><span class="lineno"> 78</span> </div>
<div class="line"><a name="l00079"></a><span class="lineno"> 79</span> </div>
<div class="line"><a name="l00080"></a><span class="lineno"> 80</span> <span class="comment">//MARK: Properties</span></div>
<div class="line"><a name="l00081"></a><span class="lineno"> 81</span> </div>
<div class="line"><a name="l00083"></a><span class="lineno"> 83</span> CP_EXPORT <span class="keywordtype">int</span> <a class="code" href="group__cp_space.html#ga7e1bd8b3f1090018f65f8b798c99df79" title="Number of iterations to use in the impulse solver to solve contacts and other constraints.">cpSpaceGetIterations</a>(<span class="keyword">const</span> <a class="code" href="structcp_space.html">cpSpace</a> *space);</div>
<div class="line"><a name="l00084"></a><span class="lineno"> 84</span> CP_EXPORT <span class="keywordtype">void</span> cpSpaceSetIterations(<a class="code" href="structcp_space.html">cpSpace</a> *space, <span class="keywordtype">int</span> iterations);</div>
<div class="line"><a name="l00085"></a><span class="lineno"> 85</span> </div>
<div class="line"><a name="l00087"></a><span class="lineno"> 87</span> CP_EXPORT <a class="code" href="structcp_vect.html">cpVect</a> <a class="code" href="group__cp_space.html#ga6270c6c036bcdd6adaeb59aac7bf6549" title="Gravity to pass to rigid bodies when integrating velocity.">cpSpaceGetGravity</a>(<span class="keyword">const</span> <a class="code" href="structcp_space.html">cpSpace</a> *space);</div>
<div class="line"><a name="l00088"></a><span class="lineno"> 88</span> CP_EXPORT <span class="keywordtype">void</span> cpSpaceSetGravity(<a class="code" href="structcp_space.html">cpSpace</a> *space, <a class="code" href="structcp_vect.html">cpVect</a> gravity);</div>
<div class="line"><a name="l00089"></a><span class="lineno"> 89</span> </div>
<div class="line"><a name="l00094"></a><span class="lineno"> 94</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_space.html#gac00ad0e4956e444fa23874fae68df3b7" title="Damping rate expressed as the fraction of velocity bodies retain each second.">cpSpaceGetDamping</a>(<span class="keyword">const</span> <a class="code" href="structcp_space.html">cpSpace</a> *space);</div>
<div class="line"><a name="l00095"></a><span class="lineno"> 95</span> CP_EXPORT <span class="keywordtype">void</span> cpSpaceSetDamping(<a class="code" href="structcp_space.html">cpSpace</a> *space, <a class="code" href="group__basic_types.html#gac1ed65573e035bf892505768c852d8d3" title="Chipmunk's floating point type.">cpFloat</a> damping);</div>
<div class="line"><a name="l00096"></a><span class="lineno"> 96</span> </div>
<div class="line"><a name="l00099"></a><span class="lineno"> 99</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_space.html#ga256c38475826c4c165999079929fe1e7" title="Speed threshold for a body to be considered idle.">cpSpaceGetIdleSpeedThreshold</a>(<span class="keyword">const</span> <a class="code" href="structcp_space.html">cpSpace</a> *space);</div>
<div class="line"><a name="l00100"></a><span class="lineno"> 100</span> CP_EXPORT <span class="keywordtype">void</span> cpSpaceSetIdleSpeedThreshold(<a class="code" href="structcp_space.html">cpSpace</a> *space, <a class="code" href="group__basic_types.html#gac1ed65573e035bf892505768c852d8d3" title="Chipmunk's floating point type.">cpFloat</a> idleSpeedThreshold);</div>
<div class="line"><a name="l00101"></a><span class="lineno"> 101</span> </div>
<div class="line"><a name="l00105"></a><span class="lineno"> 105</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_space.html#gab3f74ae04501ce532913c87e5be54a80" title="Time a group of bodies must remain idle in order to fall asleep.">cpSpaceGetSleepTimeThreshold</a>(<span class="keyword">const</span> <a class="code" href="structcp_space.html">cpSpace</a> *space);</div>
<div class="line"><a name="l00106"></a><span class="lineno"> 106</span> CP_EXPORT <span class="keywordtype">void</span> cpSpaceSetSleepTimeThreshold(<a class="code" href="structcp_space.html">cpSpace</a> *space, <a class="code" href="group__basic_types.html#gac1ed65573e035bf892505768c852d8d3" title="Chipmunk's floating point type.">cpFloat</a> sleepTimeThreshold);</div>
<div class="line"><a name="l00107"></a><span class="lineno"> 107</span> </div>
<div class="line"><a name="l00112"></a><span class="lineno"> 112</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_space.html#ga7b5e6178a021b1b6bba4b70876bf79d0" title="Amount of encouraged penetration between colliding shapes.">cpSpaceGetCollisionSlop</a>(<span class="keyword">const</span> <a class="code" href="structcp_space.html">cpSpace</a> *space);</div>
<div class="line"><a name="l00113"></a><span class="lineno"> 113</span> CP_EXPORT <span class="keywordtype">void</span> cpSpaceSetCollisionSlop(<a class="code" href="structcp_space.html">cpSpace</a> *space, <a class="code" href="group__basic_types.html#gac1ed65573e035bf892505768c852d8d3" title="Chipmunk's floating point type.">cpFloat</a> collisionSlop);</div>
<div class="line"><a name="l00114"></a><span class="lineno"> 114</span> </div>
<div class="line"><a name="l00118"></a><span class="lineno"> 118</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_space.html#ga53b093e1cbb978e00faf9216e1f9ab4f" title="Determines how fast overlapping shapes are pushed apart.">cpSpaceGetCollisionBias</a>(<span class="keyword">const</span> <a class="code" href="structcp_space.html">cpSpace</a> *space);</div>
<div class="line"><a name="l00119"></a><span class="lineno"> 119</span> CP_EXPORT <span class="keywordtype">void</span> cpSpaceSetCollisionBias(<a class="code" href="structcp_space.html">cpSpace</a> *space, <a class="code" href="group__basic_types.html#gac1ed65573e035bf892505768c852d8d3" title="Chipmunk's floating point type.">cpFloat</a> collisionBias);</div>
<div class="line"><a name="l00120"></a><span class="lineno"> 120</span> </div>
<div class="line"><a name="l00123"></a><span class="lineno"> 123</span> CP_EXPORT <a class="code" href="group__basic_types.html#gaa24652c104082d0725066ea5ac7dc83f" title="Type used for various timestamps in Chipmunk.">cpTimestamp</a> <a class="code" href="group__cp_space.html#gac20dad9f3ef05f468773db3d7667c9ba" title="Number of frames that contact information should persist.">cpSpaceGetCollisionPersistence</a>(<span class="keyword">const</span> <a class="code" href="structcp_space.html">cpSpace</a> *space);</div>
<div class="line"><a name="l00124"></a><span class="lineno"> 124</span> CP_EXPORT <span class="keywordtype">void</span> cpSpaceSetCollisionPersistence(<a class="code" href="structcp_space.html">cpSpace</a> *space, <a class="code" href="group__basic_types.html#gaa24652c104082d0725066ea5ac7dc83f" title="Type used for various timestamps in Chipmunk.">cpTimestamp</a> collisionPersistence);</div>
<div class="line"><a name="l00125"></a><span class="lineno"> 125</span> </div>
<div class="line"><a name="l00129"></a><span class="lineno"> 129</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_space.html#ga20f6bbc8db7698065052f4502050dc52" title="User definable data pointer.">cpSpaceGetUserData</a>(<span class="keyword">const</span> <a class="code" href="structcp_space.html">cpSpace</a> *space);</div>
<div class="line"><a name="l00130"></a><span class="lineno"> 130</span> CP_EXPORT <span class="keywordtype">void</span> cpSpaceSetUserData(<a class="code" href="structcp_space.html">cpSpace</a> *space, <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="l00131"></a><span class="lineno"> 131</span> </div>
<div class="line"><a name="l00134"></a><span class="lineno"> 134</span> CP_EXPORT <a class="code" href="structcp_body.html">cpBody</a>* <a class="code" href="group__cp_space.html#ga7be14c417e01cd5c17561dd176bf93e1" title="The Space provided static body for a given cpSpace.">cpSpaceGetStaticBody</a>(<span class="keyword">const</span> <a class="code" href="structcp_space.html">cpSpace</a> *space);</div>
<div class="line"><a name="l00135"></a><span class="lineno"> 135</span> </div>
<div class="line"><a name="l00138"></a><span class="lineno"> 138</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_space.html#gad4819cd09e4590b60eea6b6dc8b4cf80" title="Returns the current (or most recent) time step used with the given space.">cpSpaceGetCurrentTimeStep</a>(<span class="keyword">const</span> <a class="code" href="structcp_space.html">cpSpace</a> *space);</div>
<div class="line"><a name="l00139"></a><span class="lineno"> 139</span> </div>
<div class="line"><a name="l00141"></a><span class="lineno"> 141</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_space.html#gad72c9085853f1d612226ec7b6faca362" title="returns true from inside a callback when objects cannot be added/removed.">cpSpaceIsLocked</a>(<a class="code" href="structcp_space.html">cpSpace</a> *space);</div>
<div class="line"><a name="l00142"></a><span class="lineno"> 142</span> </div>
<div class="line"><a name="l00143"></a><span class="lineno"> 143</span> </div>
<div class="line"><a name="l00144"></a><span class="lineno"> 144</span> <span class="comment">//MARK: Collision Handlers</span></div>
<div class="line"><a name="l00145"></a><span class="lineno"> 145</span> </div>
<div class="line"><a name="l00147"></a><span class="lineno"> 147</span> CP_EXPORT <a class="code" href="structcp_collision_handler.html" title="Struct that holds function callback pointers to configure custom collision handling.">cpCollisionHandler</a> *<a class="code" href="group__cp_space.html#ga0ba809a2467c5e023738b9c5f72edda7" title="Create or return the existing collision handler that is called for all collisions that are not handle...">cpSpaceAddDefaultCollisionHandler</a>(<a class="code" href="structcp_space.html">cpSpace</a> *space);</div>
<div class="line"><a name="l00150"></a><span class="lineno"> 150</span> CP_EXPORT <a class="code" href="structcp_collision_handler.html" title="Struct that holds function callback pointers to configure custom collision handling.">cpCollisionHandler</a> *<a class="code" href="group__cp_space.html#ga54371fd2b5a430447dfc62826006a484" title="Create or return the existing collision handler for the specified pair of collision types...">cpSpaceAddCollisionHandler</a>(<a class="code" href="structcp_space.html">cpSpace</a> *space, <a class="code" href="group__basic_types.html#gae83e2f50965eb441e36ffff1e32e6d02" title="Type used for cpSpace.collision_type.">cpCollisionType</a> a, <a class="code" href="group__basic_types.html#gae83e2f50965eb441e36ffff1e32e6d02" title="Type used for cpSpace.collision_type.">cpCollisionType</a> b);</div>
<div class="line"><a name="l00152"></a><span class="lineno"> 152</span> CP_EXPORT <a class="code" href="structcp_collision_handler.html" title="Struct that holds function callback pointers to configure custom collision handling.">cpCollisionHandler</a> *<a class="code" href="group__cp_space.html#gaaa8df86dabe468bf5ab6e37dabeb6d90" title="Create or return the existing wildcard collision handler for the specified type.">cpSpaceAddWildcardHandler</a>(<a class="code" href="structcp_space.html">cpSpace</a> *space, <a class="code" href="group__basic_types.html#gae83e2f50965eb441e36ffff1e32e6d02" title="Type used for cpSpace.collision_type.">cpCollisionType</a> type);</div>
<div class="line"><a name="l00153"></a><span class="lineno"> 153</span> </div>
<div class="line"><a name="l00154"></a><span class="lineno"> 154</span> </div>
<div class="line"><a name="l00155"></a><span class="lineno"> 155</span> <span class="comment">//MARK: Add/Remove objects</span></div>
<div class="line"><a name="l00156"></a><span class="lineno"> 156</span> </div>
<div class="line"><a name="l00159"></a><span class="lineno"> 159</span> CP_EXPORT <a class="code" href="structcp_shape.html">cpShape</a>* <a class="code" href="group__cp_space.html#ga8f730ea78b5c62c0aa3b05ff4ef1e5e9" title="Add a collision shape to the simulation.">cpSpaceAddShape</a>(<a class="code" href="structcp_space.html">cpSpace</a> *space, <a class="code" href="structcp_shape.html">cpShape</a> *shape);</div>
<div class="line"><a name="l00161"></a><span class="lineno"> 161</span> CP_EXPORT <a class="code" href="structcp_body.html">cpBody</a>* <a class="code" href="group__cp_space.html#ga7485f8acdcafd6802e99417f0d427668" title="Add a rigid body to the simulation.">cpSpaceAddBody</a>(<a class="code" href="structcp_space.html">cpSpace</a> *space, <a class="code" href="structcp_body.html">cpBody</a> *body);</div>
<div class="line"><a name="l00163"></a><span class="lineno"> 163</span> CP_EXPORT <a class="code" href="structcp_constraint.html">cpConstraint</a>* <a class="code" href="group__cp_space.html#gac973a08fdbedd42e769a338f97d8ffd5" title="Add a constraint to the simulation.">cpSpaceAddConstraint</a>(<a class="code" href="structcp_space.html">cpSpace</a> *space, <a class="code" href="structcp_constraint.html">cpConstraint</a> *constraint);</div>
<div class="line"><a name="l00164"></a><span class="lineno"> 164</span> </div>
<div class="line"><a name="l00166"></a><span class="lineno"> 166</span> CP_EXPORT <span class="keywordtype">void</span> <a class="code" href="group__cp_space.html#gadd58c37e69a7575b829e25ed3c427fc8" title="Remove a collision shape from the simulation.">cpSpaceRemoveShape</a>(<a class="code" href="structcp_space.html">cpSpace</a> *space, <a class="code" href="structcp_shape.html">cpShape</a> *shape);</div>
<div class="line"><a name="l00168"></a><span class="lineno"> 168</span> CP_EXPORT <span class="keywordtype">void</span> <a class="code" href="group__cp_space.html#ga3375e5b056a887baaedd75fa1403d1cf" title="Remove a rigid body from the simulation.">cpSpaceRemoveBody</a>(<a class="code" href="structcp_space.html">cpSpace</a> *space, <a class="code" href="structcp_body.html">cpBody</a> *body);</div>
<div class="line"><a name="l00170"></a><span class="lineno"> 170</span> CP_EXPORT <span class="keywordtype">void</span> <a class="code" href="group__cp_space.html#gaeec0e391838c99b4b3cbd49d5f28e609" title="Remove a constraint from the simulation.">cpSpaceRemoveConstraint</a>(<a class="code" href="structcp_space.html">cpSpace</a> *space, <a class="code" href="structcp_constraint.html">cpConstraint</a> *constraint);</div>
<div class="line"><a name="l00171"></a><span class="lineno"> 171</span> </div>
<div class="line"><a name="l00173"></a><span class="lineno"> 173</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_space.html#ga1c3d88fb51ede38bc5e84f31518d0a83" title="Test if a collision shape has been added to the space.">cpSpaceContainsShape</a>(<a class="code" href="structcp_space.html">cpSpace</a> *space, <a class="code" href="structcp_shape.html">cpShape</a> *shape);</div>
<div class="line"><a name="l00175"></a><span class="lineno"> 175</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_space.html#ga7d240d6dd4742b465590f60909681862" title="Test if a rigid body has been added to the space.">cpSpaceContainsBody</a>(<a class="code" href="structcp_space.html">cpSpace</a> *space, <a class="code" href="structcp_body.html">cpBody</a> *body);</div>
<div class="line"><a name="l00177"></a><span class="lineno"> 177</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_space.html#gaf49f0495a0e0fda2dc76ae66c3bc637a" title="Test if a constraint has been added to the space.">cpSpaceContainsConstraint</a>(<a class="code" href="structcp_space.html">cpSpace</a> *space, <a class="code" href="structcp_constraint.html">cpConstraint</a> *constraint);</div>
<div class="line"><a name="l00178"></a><span class="lineno"> 178</span> </div>
<div class="line"><a name="l00179"></a><span class="lineno"> 179</span> <span class="comment">//MARK: Post-Step Callbacks</span></div>
<div class="line"><a name="l00180"></a><span class="lineno"> 180</span> </div>
<div class="line"><a name="l00182"></a><span class="lineno"><a class="code" href="group__cp_space.html#ga54254190b156e3b786c3f256fcc12348"> 182</a></span> <span class="keyword">typedef</span> void (*<a class="code" href="group__cp_space.html#ga54254190b156e3b786c3f256fcc12348" title="Post Step callback function type.">cpPostStepFunc</a>)(<a class="code" href="structcp_space.html">cpSpace</a> *space, <span class="keywordtype">void</span> *key, <span class="keywordtype">void</span> *data);</div>
<div class="line"><a name="l00187"></a><span class="lineno"> 187</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_space.html#ga6fbf3c0722a5618ded1ed7371cbebcb3" title="Schedule a post-step callback to be called when cpSpaceStep() finishes.">cpSpaceAddPostStepCallback</a>(<a class="code" href="structcp_space.html">cpSpace</a> *space, <a class="code" href="group__cp_space.html#ga54254190b156e3b786c3f256fcc12348" title="Post Step callback function type.">cpPostStepFunc</a> func, <span class="keywordtype">void</span> *key, <span class="keywordtype">void</span> *data);</div>
<div class="line"><a name="l00188"></a><span class="lineno"> 188</span> </div>
<div class="line"><a name="l00189"></a><span class="lineno"> 189</span> </div>
<div class="line"><a name="l00190"></a><span class="lineno"> 190</span> <span class="comment">//MARK: Queries</span></div>
<div class="line"><a name="l00191"></a><span class="lineno"> 191</span> </div>
<div class="line"><a name="l00192"></a><span class="lineno"> 192</span> <span class="comment">// TODO: Queries and iterators should take a cpSpace parametery.</span></div>
<div class="line"><a name="l00193"></a><span class="lineno"> 193</span> <span class="comment">// TODO: They should also be abortable.</span></div>
<div class="line"><a name="l00194"></a><span class="lineno"> 194</span> </div>
<div class="line"><a name="l00196"></a><span class="lineno"><a class="code" href="group__cp_space.html#gade81b01d26a4a32a86f8e7eca9dfc257"> 196</a></span> <span class="keyword">typedef</span> void (*<a class="code" href="group__cp_space.html#gade81b01d26a4a32a86f8e7eca9dfc257" title="Nearest point query callback function type.">cpSpacePointQueryFunc</a>)(<a class="code" href="structcp_shape.html">cpShape</a> *shape, <a class="code" href="structcp_vect.html">cpVect</a> point, <a class="code" href="group__basic_types.html#gac1ed65573e035bf892505768c852d8d3" title="Chipmunk's floating point type.">cpFloat</a> distance, <a class="code" href="structcp_vect.html">cpVect</a> gradient, <span class="keywordtype">void</span> *data);</div>
<div class="line"><a name="l00198"></a><span class="lineno"> 198</span> CP_EXPORT <span class="keywordtype">void</span> <a class="code" href="group__cp_space.html#ga62eea2b00f5503976ef250a33d4c474a" title="Query the space at a point and call func for each shape found.">cpSpacePointQuery</a>(<a class="code" href="structcp_space.html">cpSpace</a> *space, <a class="code" href="structcp_vect.html">cpVect</a> point, <a class="code" href="group__basic_types.html#gac1ed65573e035bf892505768c852d8d3" title="Chipmunk's floating point type.">cpFloat</a> maxDistance, <a class="code" href="structcp_shape_filter.html" title="Fast collision filtering type that is used to determine if two objects collide before calling collisi...">cpShapeFilter</a> filter, <a class="code" href="group__cp_space.html#gade81b01d26a4a32a86f8e7eca9dfc257" title="Nearest point query callback function type.">cpSpacePointQueryFunc</a> func, <span class="keywordtype">void</span> *data);</div>
<div class="line"><a name="l00200"></a><span class="lineno"> 200</span> CP_EXPORT <a class="code" href="structcp_shape.html">cpShape</a> *<a class="code" href="group__cp_space.html#ga188b8fbff10d2a236644fc9fa85cb31a" title="Query the space at a point and return the nearest shape found. Returns NULL if no shapes were found...">cpSpacePointQueryNearest</a>(<a class="code" href="structcp_space.html">cpSpace</a> *space, <a class="code" href="structcp_vect.html">cpVect</a> point, <a class="code" href="group__basic_types.html#gac1ed65573e035bf892505768c852d8d3" title="Chipmunk's floating point type.">cpFloat</a> maxDistance, <a class="code" href="structcp_shape_filter.html" title="Fast collision filtering type that is used to determine if two objects collide before calling collisi...">cpShapeFilter</a> filter, <a class="code" href="structcp_point_query_info.html" title="Point query info struct.">cpPointQueryInfo</a> *out);</div>
<div class="line"><a name="l00201"></a><span class="lineno"> 201</span> </div>
<div class="line"><a name="l00203"></a><span class="lineno"><a class="code" href="group__cp_space.html#ga346f1a852b31d509b031a2f01503c86f"> 203</a></span> <span class="keyword">typedef</span> void (*<a class="code" href="group__cp_space.html#ga346f1a852b31d509b031a2f01503c86f" title="Segment query callback function type.">cpSpaceSegmentQueryFunc</a>)(<a class="code" href="structcp_shape.html">cpShape</a> *shape, <a class="code" href="structcp_vect.html">cpVect</a> point, <a class="code" href="structcp_vect.html">cpVect</a> normal, <a class="code" href="group__basic_types.html#gac1ed65573e035bf892505768c852d8d3" title="Chipmunk's floating point type.">cpFloat</a> alpha, <span class="keywordtype">void</span> *data);</div>
<div class="line"><a name="l00205"></a><span class="lineno"> 205</span> CP_EXPORT <span class="keywordtype">void</span> <a class="code" href="group__cp_space.html#ga16b9a1e185bea2680a1bc6c798f86049" title="Perform a directed line segment query (like a raycast) against the space calling func for each shape ...">cpSpaceSegmentQuery</a>(<a class="code" href="structcp_space.html">cpSpace</a> *space, <a class="code" href="structcp_vect.html">cpVect</a> start, <a class="code" href="structcp_vect.html">cpVect</a> end, <a class="code" href="group__basic_types.html#gac1ed65573e035bf892505768c852d8d3" title="Chipmunk's floating point type.">cpFloat</a> radius, <a class="code" href="structcp_shape_filter.html" title="Fast collision filtering type that is used to determine if two objects collide before calling collisi...">cpShapeFilter</a> filter, <a class="code" href="group__cp_space.html#ga346f1a852b31d509b031a2f01503c86f" title="Segment query callback function type.">cpSpaceSegmentQueryFunc</a> func, <span class="keywordtype">void</span> *data);</div>
<div class="line"><a name="l00207"></a><span class="lineno"> 207</span> CP_EXPORT <a class="code" href="structcp_shape.html">cpShape</a> *<a class="code" href="group__cp_space.html#ga7e1994e5d086e002e623a42642d7ea91" title="Perform a directed line segment query (like a raycast) against the space and return the first shape h...">cpSpaceSegmentQueryFirst</a>(<a class="code" href="structcp_space.html">cpSpace</a> *space, <a class="code" href="structcp_vect.html">cpVect</a> start, <a class="code" href="structcp_vect.html">cpVect</a> end, <a class="code" href="group__basic_types.html#gac1ed65573e035bf892505768c852d8d3" title="Chipmunk's floating point type.">cpFloat</a> radius, <a class="code" href="structcp_shape_filter.html" title="Fast collision filtering type that is used to determine if two objects collide before calling collisi...">cpShapeFilter</a> filter, <a class="code" href="structcp_segment_query_info.html" title="Segment query info struct.">cpSegmentQueryInfo</a> *out);</div>
<div class="line"><a name="l00208"></a><span class="lineno"> 208</span> </div>
<div class="line"><a name="l00210"></a><span class="lineno"><a class="code" href="group__cp_space.html#ga9f9d412c914ddec134554dde01dffbad"> 210</a></span> <span class="keyword">typedef</span> void (*<a class="code" href="group__cp_space.html#ga9f9d412c914ddec134554dde01dffbad" title="Rectangle Query callback function type.">cpSpaceBBQueryFunc</a>)(<a class="code" href="structcp_shape.html">cpShape</a> *shape, <span class="keywordtype">void</span> *data);</div>
<div class="line"><a name="l00213"></a><span class="lineno"> 213</span> CP_EXPORT <span class="keywordtype">void</span> <a class="code" href="group__cp_space.html#ga09e4737a3b33755ee20066297138b64e" title="Perform a fast rectangle query on the space calling func for each shape found.">cpSpaceBBQuery</a>(<a class="code" href="structcp_space.html">cpSpace</a> *space, <a class="code" href="structcp_b_b.html" title="Chipmunk's axis-aligned 2D bounding box type. (left, bottom, right, top)">cpBB</a> bb, <a class="code" href="structcp_shape_filter.html" title="Fast collision filtering type that is used to determine if two objects collide before calling collisi...">cpShapeFilter</a> filter, <a class="code" href="group__cp_space.html#ga9f9d412c914ddec134554dde01dffbad" title="Rectangle Query callback function type.">cpSpaceBBQueryFunc</a> func, <span class="keywordtype">void</span> *data);</div>
<div class="line"><a name="l00214"></a><span class="lineno"> 214</span> </div>
<div class="line"><a name="l00216"></a><span class="lineno"><a class="code" href="group__cp_space.html#gaef86eb47a5ac16c373eb8b59599d1806"> 216</a></span> <span class="keyword">typedef</span> void (*<a class="code" href="group__cp_space.html#gaef86eb47a5ac16c373eb8b59599d1806" title="Shape query callback function type.">cpSpaceShapeQueryFunc</a>)(<a class="code" href="structcp_shape.html">cpShape</a> *shape, <a class="code" href="structcp_contact_point_set.html" title="A struct that wraps up the important collision data for an arbiter.">cpContactPointSet</a> *points, <span class="keywordtype">void</span> *data);</div>
<div class="line"><a name="l00218"></a><span class="lineno"> 218</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_space.html#ga8a87a09145f33a72404c77cce54e4778" title="Query a space for any shapes overlapping the given shape and call func for each shape found...">cpSpaceShapeQuery</a>(<a class="code" href="structcp_space.html">cpSpace</a> *space, <a class="code" href="structcp_shape.html">cpShape</a> *shape, <a class="code" href="group__cp_space.html#gaef86eb47a5ac16c373eb8b59599d1806" title="Shape query callback function type.">cpSpaceShapeQueryFunc</a> func, <span class="keywordtype">void</span> *data);</div>
<div class="line"><a name="l00219"></a><span class="lineno"> 219</span> </div>
<div class="line"><a name="l00220"></a><span class="lineno"> 220</span> </div>
<div class="line"><a name="l00221"></a><span class="lineno"> 221</span> <span class="comment">//MARK: Iteration</span></div>
<div class="line"><a name="l00222"></a><span class="lineno"> 222</span> </div>
<div class="line"><a name="l00224"></a><span class="lineno"><a class="code" href="group__cp_space.html#gac0cc4ac612fc81b31e3179b8a742570e"> 224</a></span> <span class="keyword">typedef</span> void (*<a class="code" href="group__cp_space.html#gac0cc4ac612fc81b31e3179b8a742570e" title="Space/body iterator callback function type.">cpSpaceBodyIteratorFunc</a>)(<a class="code" href="structcp_body.html">cpBody</a> *body, <span class="keywordtype">void</span> *data);</div>
<div class="line"><a name="l00226"></a><span class="lineno"> 226</span> CP_EXPORT <span class="keywordtype">void</span> <a class="code" href="group__cp_space.html#ga8119f11a4c6a44d82fb15a5873c42607" title="Call func for each body in the space.">cpSpaceEachBody</a>(<a class="code" href="structcp_space.html">cpSpace</a> *space, <a class="code" href="group__cp_space.html#gac0cc4ac612fc81b31e3179b8a742570e" title="Space/body iterator callback function type.">cpSpaceBodyIteratorFunc</a> func, <span class="keywordtype">void</span> *data);</div>
<div class="line"><a name="l00227"></a><span class="lineno"> 227</span> </div>
<div class="line"><a name="l00229"></a><span class="lineno"><a class="code" href="group__cp_space.html#ga780ed0f29f957005efb4e24df64883b2"> 229</a></span> <span class="keyword">typedef</span> void (*<a class="code" href="group__cp_space.html#ga780ed0f29f957005efb4e24df64883b2" title="Space/body iterator callback function type.">cpSpaceShapeIteratorFunc</a>)(<a class="code" href="structcp_shape.html">cpShape</a> *shape, <span class="keywordtype">void</span> *data);</div>
<div class="line"><a name="l00231"></a><span class="lineno"> 231</span> CP_EXPORT <span class="keywordtype">void</span> <a class="code" href="group__cp_space.html#gab586704d72681645d9e91d42e97f96ff" title="Call func for each shape in the space.">cpSpaceEachShape</a>(<a class="code" href="structcp_space.html">cpSpace</a> *space, <a class="code" href="group__cp_space.html#ga780ed0f29f957005efb4e24df64883b2" title="Space/body iterator callback function type.">cpSpaceShapeIteratorFunc</a> func, <span class="keywordtype">void</span> *data);</div>
<div class="line"><a name="l00232"></a><span class="lineno"> 232</span> </div>
<div class="line"><a name="l00234"></a><span class="lineno"><a class="code" href="group__cp_space.html#ga6818e027bac76ed80432f12ffc8d7a39"> 234</a></span> <span class="keyword">typedef</span> void (*<a class="code" href="group__cp_space.html#ga6818e027bac76ed80432f12ffc8d7a39" title="Space/constraint iterator callback function type.">cpSpaceConstraintIteratorFunc</a>)(<a class="code" href="structcp_constraint.html">cpConstraint</a> *constraint, <span class="keywordtype">void</span> *data);</div>
<div class="line"><a name="l00236"></a><span class="lineno"> 236</span> CP_EXPORT <span class="keywordtype">void</span> <a class="code" href="group__cp_space.html#ga0f494c054cb89a0a842ef1a0e344ce58" title="Call func for each shape in the space.">cpSpaceEachConstraint</a>(<a class="code" href="structcp_space.html">cpSpace</a> *space, <a class="code" href="group__cp_space.html#ga6818e027bac76ed80432f12ffc8d7a39" title="Space/constraint iterator callback function type.">cpSpaceConstraintIteratorFunc</a> func, <span class="keywordtype">void</span> *data);</div>
<div class="line"><a name="l00237"></a><span class="lineno"> 237</span> </div>
<div class="line"><a name="l00238"></a><span class="lineno"> 238</span> </div>
<div class="line"><a name="l00239"></a><span class="lineno"> 239</span> <span class="comment">//MARK: Indexing</span></div>
<div class="line"><a name="l00240"></a><span class="lineno"> 240</span> </div>
<div class="line"><a name="l00242"></a><span class="lineno"> 242</span> CP_EXPORT <span class="keywordtype">void</span> <a class="code" href="group__cp_space.html#ga714f105c977f9006128981fa30d8e7ec" title="Update the collision detection info for the static shapes in the space.">cpSpaceReindexStatic</a>(<a class="code" href="structcp_space.html">cpSpace</a> *space);</div>
<div class="line"><a name="l00244"></a><span class="lineno"> 244</span> CP_EXPORT <span class="keywordtype">void</span> <a class="code" href="group__cp_space.html#gab370e5ee7912ff798bebeb01fc0ba63b" title="Update the collision detection data for a specific shape in the space.">cpSpaceReindexShape</a>(<a class="code" href="structcp_space.html">cpSpace</a> *space, <a class="code" href="structcp_shape.html">cpShape</a> *shape);</div>
<div class="line"><a name="l00246"></a><span class="lineno"> 246</span> CP_EXPORT <span class="keywordtype">void</span> <a class="code" href="group__cp_space.html#ga9a141b9c927102b02a84bb2b8631f803" title="Update the collision detection data for all shapes attached to a body.">cpSpaceReindexShapesForBody</a>(<a class="code" href="structcp_space.html">cpSpace</a> *space, <a class="code" href="structcp_body.html">cpBody</a> *body);</div>
<div class="line"><a name="l00247"></a><span class="lineno"> 247</span> </div>
<div class="line"><a name="l00249"></a><span class="lineno"> 249</span> CP_EXPORT <span class="keywordtype">void</span> <a class="code" href="group__cp_space.html#gaed394ccafade6346f25e9c78f92bc185" title="Switch the space to use a spatial has as it's spatial index.">cpSpaceUseSpatialHash</a>(<a class="code" href="structcp_space.html">cpSpace</a> *space, <a class="code" href="group__basic_types.html#gac1ed65573e035bf892505768c852d8d3" title="Chipmunk's floating point type.">cpFloat</a> dim, <span class="keywordtype">int</span> count);</div>
<div class="line"><a name="l00250"></a><span class="lineno"> 250</span> </div>
<div class="line"><a name="l00251"></a><span class="lineno"> 251</span> </div>
<div class="line"><a name="l00252"></a><span class="lineno"> 252</span> <span class="comment">//MARK: Time Stepping</span></div>
<div class="line"><a name="l00253"></a><span class="lineno"> 253</span> </div>
<div class="line"><a name="l00255"></a><span class="lineno"> 255</span> CP_EXPORT <span class="keywordtype">void</span> <a class="code" href="group__cp_space.html#gae87c828de2fe3709393ba94046212d80" title="Step the space forward in time by dt.">cpSpaceStep</a>(<a class="code" href="structcp_space.html">cpSpace</a> *space, <a class="code" href="group__basic_types.html#gac1ed65573e035bf892505768c852d8d3" title="Chipmunk's floating point type.">cpFloat</a> dt);</div>
<div class="line"><a name="l00256"></a><span class="lineno"> 256</span> </div>
<div class="line"><a name="l00257"></a><span class="lineno"> 257</span> </div>
<div class="line"><a name="l00258"></a><span class="lineno"> 258</span> <span class="comment">//MARK: Debug API</span></div>
<div class="line"><a name="l00259"></a><span class="lineno"> 259</span> </div>
<div class="line"><a name="l00260"></a><span class="lineno"> 260</span> <span class="preprocessor">#ifndef CP_SPACE_DISABLE_DEBUG_API</span></div>
<div class="line"><a name="l00261"></a><span class="lineno"> 261</span> <span class="preprocessor"></span></div>
<div class="line"><a name="l00263"></a><span class="lineno"><a class="code" href="structcp_space_debug_color.html"> 263</a></span> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structcp_space_debug_color.html" title="Color type to use with the space debug drawing API.">cpSpaceDebugColor</a> {</div>
<div class="line"><a name="l00264"></a><span class="lineno"> 264</span>  <span class="keywordtype">float</span> r, g, b, a;</div>
<div class="line"><a name="l00265"></a><span class="lineno"> 265</span> } <a class="code" href="group__cp_space.html#gafc46fcefca8c28112ca8245eef00bae7" title="Color type to use with the space debug drawing API.">cpSpaceDebugColor</a>;</div>
<div class="line"><a name="l00266"></a><span class="lineno"> 266</span> </div>
<div class="line"><a name="l00268"></a><span class="lineno"><a class="code" href="group__cp_space.html#ga56724a4b5ea326c45031d609f3bb96ab"> 268</a></span> <span class="keyword">typedef</span> void (*<a class="code" href="group__cp_space.html#ga56724a4b5ea326c45031d609f3bb96ab" title="Callback type for a function that draws a filled, stroked circle.">cpSpaceDebugDrawCircleImpl</a>)(<a class="code" href="structcp_vect.html">cpVect</a> pos, <a class="code" href="group__basic_types.html#gac1ed65573e035bf892505768c852d8d3" title="Chipmunk's floating point type.">cpFloat</a> angle, <a class="code" href="group__basic_types.html#gac1ed65573e035bf892505768c852d8d3" title="Chipmunk's floating point type.">cpFloat</a> radius, <a class="code" href="structcp_space_debug_color.html" title="Color type to use with the space debug drawing API.">cpSpaceDebugColor</a> outlineColor, <a class="code" href="structcp_space_debug_color.html" title="Color type to use with the space debug drawing API.">cpSpaceDebugColor</a> fillColor, <a class="code" href="group__basic_types.html#ga2ac2c3c31e21893941f9e4f8ee279447" title="Type used for user data pointers.">cpDataPointer</a> data);</div>
<div class="line"><a name="l00270"></a><span class="lineno"><a class="code" href="group__cp_space.html#ga81e52553bb4f8e95e78cdabf3febf7e6"> 270</a></span> <span class="keyword">typedef</span> void (*<a class="code" href="group__cp_space.html#ga81e52553bb4f8e95e78cdabf3febf7e6" title="Callback type for a function that draws a line segment.">cpSpaceDebugDrawSegmentImpl</a>)(<a class="code" href="structcp_vect.html">cpVect</a> a, <a class="code" href="structcp_vect.html">cpVect</a> b, <a class="code" href="structcp_space_debug_color.html" title="Color type to use with the space debug drawing API.">cpSpaceDebugColor</a> color, <a class="code" href="group__basic_types.html#ga2ac2c3c31e21893941f9e4f8ee279447" title="Type used for user data pointers.">cpDataPointer</a> data);</div>
<div class="line"><a name="l00272"></a><span class="lineno"><a class="code" href="group__cp_space.html#ga9f6842fee4e78be058772cb8e8a72426"> 272</a></span> <span class="keyword">typedef</span> void (*<a class="code" href="group__cp_space.html#ga9f6842fee4e78be058772cb8e8a72426" title="Callback type for a function that draws a thick line segment.">cpSpaceDebugDrawFatSegmentImpl</a>)(<a class="code" href="structcp_vect.html">cpVect</a> a, <a class="code" href="structcp_vect.html">cpVect</a> b, <a class="code" href="group__basic_types.html#gac1ed65573e035bf892505768c852d8d3" title="Chipmunk's floating point type.">cpFloat</a> radius, <a class="code" href="structcp_space_debug_color.html" title="Color type to use with the space debug drawing API.">cpSpaceDebugColor</a> outlineColor, <a class="code" href="structcp_space_debug_color.html" title="Color type to use with the space debug drawing API.">cpSpaceDebugColor</a> fillColor, <a class="code" href="group__basic_types.html#ga2ac2c3c31e21893941f9e4f8ee279447" title="Type used for user data pointers.">cpDataPointer</a> data);</div>
<div class="line"><a name="l00274"></a><span class="lineno"><a class="code" href="group__cp_space.html#ga5c0c9d9b53e02aaeaf8911edc5f2f51c"> 274</a></span> <span class="keyword">typedef</span> void (*<a class="code" href="group__cp_space.html#ga5c0c9d9b53e02aaeaf8911edc5f2f51c" title="Callback type for a function that draws a convex polygon.">cpSpaceDebugDrawPolygonImpl</a>)(<span class="keywordtype">int</span> count, <span class="keyword">const</span> <a class="code" href="structcp_vect.html">cpVect</a> *verts, <a class="code" href="group__basic_types.html#gac1ed65573e035bf892505768c852d8d3" title="Chipmunk's floating point type.">cpFloat</a> radius, <a class="code" href="structcp_space_debug_color.html" title="Color type to use with the space debug drawing API.">cpSpaceDebugColor</a> outlineColor, <a class="code" href="structcp_space_debug_color.html" title="Color type to use with the space debug drawing API.">cpSpaceDebugColor</a> fillColor, <a class="code" href="group__basic_types.html#ga2ac2c3c31e21893941f9e4f8ee279447" title="Type used for user data pointers.">cpDataPointer</a> data);</div>
<div class="line"><a name="l00276"></a><span class="lineno"><a class="code" href="group__cp_space.html#ga9add080abfb79f4a98465d816b47c001"> 276</a></span> <span class="keyword">typedef</span> void (*<a class="code" href="group__cp_space.html#ga9add080abfb79f4a98465d816b47c001" title="Callback type for a function that draws a dot.">cpSpaceDebugDrawDotImpl</a>)(<a class="code" href="group__basic_types.html#gac1ed65573e035bf892505768c852d8d3" title="Chipmunk's floating point type.">cpFloat</a> size, <a class="code" href="structcp_vect.html">cpVect</a> pos, <a class="code" href="structcp_space_debug_color.html" title="Color type to use with the space debug drawing API.">cpSpaceDebugColor</a> color, <a class="code" href="group__basic_types.html#ga2ac2c3c31e21893941f9e4f8ee279447" title="Type used for user data pointers.">cpDataPointer</a> data);</div>
<div class="line"><a name="l00278"></a><span class="lineno"><a class="code" href="group__cp_space.html#ga772dc8971ae082c638fbd09c4bd20eff"> 278</a></span> <span class="keyword">typedef</span> <a class="code" href="group__cp_space.html#gafc46fcefca8c28112ca8245eef00bae7" title="Color type to use with the space debug drawing API.">cpSpaceDebugColor</a> (*<a class="code" href="group__cp_space.html#ga772dc8971ae082c638fbd09c4bd20eff" title="Callback type for a function that returns a color for a given shape. This gives you an opportunity to...">cpSpaceDebugDrawColorForShapeImpl</a>)(<a class="code" href="structcp_shape.html">cpShape</a> *shape, <a class="code" href="group__basic_types.html#ga2ac2c3c31e21893941f9e4f8ee279447" title="Type used for user data pointers.">cpDataPointer</a> data);</div>
<div class="line"><a name="l00279"></a><span class="lineno"> 279</span> </div>
<div class="line"><a name="l00280"></a><span class="lineno"> 280</span> <span class="keyword">typedef</span> <span class="keyword">enum</span> cpSpaceDebugDrawFlags {</div>
<div class="line"><a name="l00281"></a><span class="lineno"> 281</span>  CP_SPACE_DEBUG_DRAW_SHAPES = 1<<0,</div>
<div class="line"><a name="l00282"></a><span class="lineno"> 282</span>  CP_SPACE_DEBUG_DRAW_CONSTRAINTS = 1<<1,</div>
<div class="line"><a name="l00283"></a><span class="lineno"> 283</span>  CP_SPACE_DEBUG_DRAW_COLLISION_POINTS = 1<<2,</div>
<div class="line"><a name="l00284"></a><span class="lineno"> 284</span> } cpSpaceDebugDrawFlags;</div>
<div class="line"><a name="l00285"></a><span class="lineno"> 285</span> </div>
<div class="line"><a name="l00287"></a><span class="lineno"><a class="code" href="structcp_space_debug_draw_options.html"> 287</a></span> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structcp_space_debug_draw_options.html" title="Struct used with cpSpaceDebugDraw() containing drawing callbacks and other drawing settings...">cpSpaceDebugDrawOptions</a> {</div>
<div class="line"><a name="l00289"></a><span class="lineno"><a class="code" href="structcp_space_debug_draw_options.html#af028efdb04af469d2d82747b3507f948"> 289</a></span>  <a class="code" href="group__cp_space.html#ga56724a4b5ea326c45031d609f3bb96ab" title="Callback type for a function that draws a filled, stroked circle.">cpSpaceDebugDrawCircleImpl</a> <a class="code" href="structcp_space_debug_draw_options.html#af028efdb04af469d2d82747b3507f948" title="Function that will be invoked to draw circles.">drawCircle</a>;</div>
<div class="line"><a name="l00291"></a><span class="lineno"><a class="code" href="structcp_space_debug_draw_options.html#aa5b88eb81bc797b53380dbdaf62e9379"> 291</a></span>  <a class="code" href="group__cp_space.html#ga81e52553bb4f8e95e78cdabf3febf7e6" title="Callback type for a function that draws a line segment.">cpSpaceDebugDrawSegmentImpl</a> <a class="code" href="structcp_space_debug_draw_options.html#aa5b88eb81bc797b53380dbdaf62e9379" title="Function that will be invoked to draw line segments.">drawSegment</a>;</div>
<div class="line"><a name="l00293"></a><span class="lineno"><a class="code" href="structcp_space_debug_draw_options.html#af5dbe4ef11222dac6ecad0d44ea1ed94"> 293</a></span>  <a class="code" href="group__cp_space.html#ga9f6842fee4e78be058772cb8e8a72426" title="Callback type for a function that draws a thick line segment.">cpSpaceDebugDrawFatSegmentImpl</a> <a class="code" href="structcp_space_debug_draw_options.html#af5dbe4ef11222dac6ecad0d44ea1ed94" title="Function that will be invoked to draw thick line segments.">drawFatSegment</a>;</div>
<div class="line"><a name="l00295"></a><span class="lineno"><a class="code" href="structcp_space_debug_draw_options.html#a7636181e25205596933451c09e709239"> 295</a></span>  <a class="code" href="group__cp_space.html#ga5c0c9d9b53e02aaeaf8911edc5f2f51c" title="Callback type for a function that draws a convex polygon.">cpSpaceDebugDrawPolygonImpl</a> <a class="code" href="structcp_space_debug_draw_options.html#a7636181e25205596933451c09e709239" title="Function that will be invoked to draw convex polygons.">drawPolygon</a>;</div>
<div class="line"><a name="l00297"></a><span class="lineno"><a class="code" href="structcp_space_debug_draw_options.html#a4003aae132391aa3d57c65f44d61feb3"> 297</a></span>  <a class="code" href="group__cp_space.html#ga9add080abfb79f4a98465d816b47c001" title="Callback type for a function that draws a dot.">cpSpaceDebugDrawDotImpl</a> <a class="code" href="structcp_space_debug_draw_options.html#a4003aae132391aa3d57c65f44d61feb3" title="Function that will be invoked to draw dots.">drawDot</a>;</div>
<div class="line"><a name="l00298"></a><span class="lineno"> 298</span>  </div>
<div class="line"><a name="l00300"></a><span class="lineno"><a class="code" href="structcp_space_debug_draw_options.html#a1b4b5128c4b70e3642f49ad71d49159f"> 300</a></span>  cpSpaceDebugDrawFlags <a class="code" href="structcp_space_debug_draw_options.html#a1b4b5128c4b70e3642f49ad71d49159f" title="Flags that request which things to draw (collision shapes, constraints, contact points).">flags</a>;</div>
<div class="line"><a name="l00302"></a><span class="lineno"><a class="code" href="structcp_space_debug_draw_options.html#a5bc64c5754df1f4bc4b7a789e81555f8"> 302</a></span>  <a class="code" href="structcp_space_debug_color.html" title="Color type to use with the space debug drawing API.">cpSpaceDebugColor</a> <a class="code" href="structcp_space_debug_draw_options.html#a5bc64c5754df1f4bc4b7a789e81555f8" title="Outline color passed to the drawing function.">shapeOutlineColor</a>;</div>
<div class="line"><a name="l00304"></a><span class="lineno"><a class="code" href="structcp_space_debug_draw_options.html#a6de88f91bd66ef2f49ca32c3fb6ee145"> 304</a></span>  <a class="code" href="group__cp_space.html#ga772dc8971ae082c638fbd09c4bd20eff" title="Callback type for a function that returns a color for a given shape. This gives you an opportunity to...">cpSpaceDebugDrawColorForShapeImpl</a> <a class="code" href="structcp_space_debug_draw_options.html#a6de88f91bd66ef2f49ca32c3fb6ee145" title="Function that decides what fill color to draw shapes using.">colorForShape</a>;</div>
<div class="line"><a name="l00306"></a><span class="lineno"><a class="code" href="structcp_space_debug_draw_options.html#a62271599c7cb15d39f6a2b4620173322"> 306</a></span>  <a class="code" href="structcp_space_debug_color.html" title="Color type to use with the space debug drawing API.">cpSpaceDebugColor</a> <a class="code" href="structcp_space_debug_draw_options.html#a62271599c7cb15d39f6a2b4620173322" title="Color passed to drawing functions for constraints.">constraintColor</a>;</div>
<div class="line"><a name="l00308"></a><span class="lineno"><a class="code" href="structcp_space_debug_draw_options.html#aaa3ebd801675e71f6ce0954514d3e9aa"> 308</a></span>  <a class="code" href="structcp_space_debug_color.html" title="Color type to use with the space debug drawing API.">cpSpaceDebugColor</a> <a class="code" href="structcp_space_debug_draw_options.html#aaa3ebd801675e71f6ce0954514d3e9aa" title="Color passed to drawing functions for collision points.">collisionPointColor</a>;</div>
<div class="line"><a name="l00309"></a><span class="lineno"> 309</span>  </div>
<div class="line"><a name="l00311"></a><span class="lineno"><a class="code" href="structcp_space_debug_draw_options.html#a68c76e73a9a75b589bb1d26925fcc3e4"> 311</a></span>  <a class="code" href="group__basic_types.html#ga2ac2c3c31e21893941f9e4f8ee279447" title="Type used for user data pointers.">cpDataPointer</a> <a class="code" href="structcp_space_debug_draw_options.html#a68c76e73a9a75b589bb1d26925fcc3e4" title="User defined context pointer passed to all of the callback functions as the 'data' argument...">data</a>;</div>
<div class="line"><a name="l00312"></a><span class="lineno"> 312</span> } <a class="code" href="group__cp_space.html#gabb44b3d40332bc5965e8dbd515caa71a" title="Struct used with cpSpaceDebugDraw() containing drawing callbacks and other drawing settings...">cpSpaceDebugDrawOptions</a>;</div>
<div class="line"><a name="l00313"></a><span class="lineno"> 313</span> </div>
<div class="line"><a name="l00315"></a><span class="lineno"> 315</span> CP_EXPORT <span class="keywordtype">void</span> <a class="code" href="group__cp_space.html#ga02e8a34681aff3f29bd976e830f3b6da" title="Debug draw the current state of the space using the supplied drawing options.">cpSpaceDebugDraw</a>(<a class="code" href="structcp_space.html">cpSpace</a> *space, <a class="code" href="structcp_space_debug_draw_options.html" title="Struct used with cpSpaceDebugDraw() containing drawing callbacks and other drawing settings...">cpSpaceDebugDrawOptions</a> *options);</div>
<div class="line"><a name="l00316"></a><span class="lineno"> 316</span> </div>
<div class="line"><a name="l00317"></a><span class="lineno"> 317</span> <span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00318"></a><span class="lineno"> 318</span> <span class="preprocessor"></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>