1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667
|
<!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"/>
<title>Objective Chipmunk: ChipmunkSpace Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javaScript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.7.1 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div class="navigation" id="top">
<div class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="pages.html"><span>Related Pages</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li id="searchli">
<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 class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Class List</span></a></li>
<li><a href="classes.html"><span>Class Index</span></a></li>
<li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class Members</span></a></li>
</ul>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> |
<a href="#properties">Properties</a> </div>
<div class="headertitle">
<h1>ChipmunkSpace Class Reference</h1> </div>
</div>
<div class="contents">
<!-- doxytag: class="ChipmunkSpace" -->
<p>Chipmunk spaces are simulation containers.
<a href="#_details">More...</a></p>
<p><code>#import <<a class="el" href="_chipmunk_space_8h_source.html">ChipmunkSpace.h</a>></code></p>
<p><a href="class_chipmunk_space-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">(void) </td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_chipmunk_space.html#accf5543d3c96d7bd7d8b48694ea6a28b">setDefaultCollisionHandler:begin:preSolve:postSolve:separate:</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Set the default collision handler. <a href="#accf5543d3c96d7bd7d8b48694ea6a28b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">(void) </td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_chipmunk_space.html#a9780fa28138893f83464f025d0d8a167">addCollisionHandler:typeA:typeB:begin:preSolve:postSolve:separate:</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Set a collision handler to handle specific collision types. <a href="#a9780fa28138893f83464f025d0d8a167"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">(void) </td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_chipmunk_space.html#a3eea3d382fdae0ac1d061416b0c4beaa">addShapeAHandler:typeA:typeB:begin:preSolve:postSolve:separate:</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Deprecated in 5.3.0. <a href="#a3eea3d382fdae0ac1d061416b0c4beaa"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">(void) </td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_chipmunk_space.html#aab00351f11a8faa5ead747d4ac7390bc">addShapeBHandler:typeA:typeB:begin:preSolve:postSolve:separate:</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Deprecated in 5.3.0. <a href="#aab00351f11a8faa5ead747d4ac7390bc"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a244d818d3bb52b81f3004d5ba470844c"></a><!-- doxytag: member="ChipmunkSpace::removeCollisionHandlerForTypeA:andB:" ref="a244d818d3bb52b81f3004d5ba470844c" args="(id a,[andB] id b)" -->
(void) </td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_chipmunk_space.html#a244d818d3bb52b81f3004d5ba470844c">removeCollisionHandlerForTypeA:andB:</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Remove a collision handler. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">(id) </td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_chipmunk_space.html#a3c7c9546e958d23fac51a740ddfbfecd">add:</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Add an object to the space. <a href="#a3c7c9546e958d23fac51a740ddfbfecd"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">(void) </td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_chipmunk_space.html#ab5a858ce3414e5efb2fecf982761b175">addBaseObjects:</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Add a collection of <a class="el" href="protocol_chipmunk_base_object-p.html" title="This protocol is implemented by objects that know how to add themselves to a space.">ChipmunkBaseObject</a> objects to the space. <a href="#ab5a858ce3414e5efb2fecf982761b175"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">(id) </td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_chipmunk_space.html#a59ea2ee0045c5301ecd0f3c5353b372f">remove:</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Remove an object from the space. <a href="#a59ea2ee0045c5301ecd0f3c5353b372f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">(void) </td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_chipmunk_space.html#abed9b7e56ea1d27de7fac3cca1a2fc0a">removeBaseObjects:</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Remove a collection of <a class="el" href="protocol_chipmunk_base_object-p.html" title="This protocol is implemented by objects that know how to add themselves to a space.">ChipmunkBaseObject</a> objects from the space. <a href="#abed9b7e56ea1d27de7fac3cca1a2fc0a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a872d5e8b5336025a069ccd06295b6eda"></a><!-- doxytag: member="ChipmunkSpace::addPostStepCallback:selector:context:" ref="a872d5e8b5336025a069ccd06295b6eda" args="(id target,[selector] SEL selector,[context](deprecated __attribute__)" -->
(void) </td><td class="memItemRight" valign="bottom">- <b>addPostStepCallback:selector:context:</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">(void) </td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_chipmunk_space.html#a2c830350cabce22db65905bfa4337057">addPostStepCallback:selector:key:</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Define a callback to be run just before [<a class="el" href="interface_chipmunk_space.html" title="Chipmunk spaces are simulation containers.">ChipmunkSpace</a> step:] finishes. <a href="#a2c830350cabce22db65905bfa4337057"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aeb8bb804046389c71cdf8532e27ea1d1"></a><!-- doxytag: member="ChipmunkSpace::addPostStepRemoval:" ref="aeb8bb804046389c71cdf8532e27ea1d1" args="(id< ChipmunkObject > obj)" -->
(void) </td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_chipmunk_space.html#aeb8bb804046389c71cdf8532e27ea1d1">addPostStepRemoval:</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Remove the Chipmunk Object from the space at the end of the step: <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af41855579653620ce5310f9ce8887bef"></a><!-- doxytag: member="ChipmunkSpace::pointQueryAll:layers:group:" ref="af41855579653620ce5310f9ce8887bef" args="(cpVect point,[layers] cpLayers layers,[group] id group)" -->
(NSArray *) </td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_chipmunk_space.html#af41855579653620ce5310f9ce8887bef">pointQueryAll:layers:group:</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns a NSArray of all shapes that overlap the given point. The point is treated as having the given group and layers. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a93db71199d83f36b3011d9e9df2b2ce0"></a><!-- doxytag: member="ChipmunkSpace::pointQueryFirst:layers:group:" ref="a93db71199d83f36b3011d9e9df2b2ce0" args="(cpVect point,[layers] cpLayers layers,[group] id group)" -->
(<a class="el" href="interface_chipmunk_shape.html">ChipmunkShape</a> *) </td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_chipmunk_space.html#a93db71199d83f36b3011d9e9df2b2ce0">pointQueryFirst:layers:group:</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the first shape that overlaps the given point. The point is treated as having the given group and layers. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a717a70d5a0437bec43bd41f6d35c9d37"></a><!-- doxytag: member="ChipmunkSpace::segmentQueryAllFrom:to:layers:group:" ref="a717a70d5a0437bec43bd41f6d35c9d37" args="(cpVect start,[to] cpVect end,[layers] cpLayers layers,[group] id group)" -->
(NSArray *) </td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_chipmunk_space.html#a717a70d5a0437bec43bd41f6d35c9d37">segmentQueryAllFrom:to:layers:group:</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Return a NSArray of <a class="el" href="interface_chipmunk_segment_query_info.html" title="Holds collision information from segment queries. You should never need to create one...">ChipmunkSegmentQueryInfo</a> objects for all the shapes that overlap the segment. The objects are unsorted. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a068267fad09180f4bd0d484401ebad41"></a><!-- doxytag: member="ChipmunkSpace::segmentQueryFirstFrom:to:layers:group:" ref="a068267fad09180f4bd0d484401ebad41" args="(cpVect start,[to] cpVect end,[layers] cpLayers layers,[group] id group)" -->
(<a class="el" href="interface_chipmunk_segment_query_info.html">ChipmunkSegmentQueryInfo</a> *) </td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_chipmunk_space.html#a068267fad09180f4bd0d484401ebad41">segmentQueryFirstFrom:to:layers:group:</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the first shape that overlaps the given segment. The segment is treated as having the given group and layers. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9a013766876dc74cb58b4cbb2b42b01a"></a><!-- doxytag: member="ChipmunkSpace::bbQueryAll:layers:group:" ref="a9a013766876dc74cb58b4cbb2b42b01a" args="(cpBB bb,[layers] cpLayers layers,[group] id group)" -->
(NSArray *) </td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_chipmunk_space.html#a9a013766876dc74cb58b4cbb2b42b01a">bbQueryAll:layers:group:</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns a NSArray of all shapes whose bounding boxes overlap the given bounding box. The box is treated as having the given group and layers. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad38f1e3da89b9a3eb3e9dc73df977954"></a><!-- doxytag: member="ChipmunkSpace::shapeQueryAll:" ref="ad38f1e3da89b9a3eb3e9dc73df977954" args="(ChipmunkShape *shape)" -->
(NSArray *) </td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_chipmunk_space.html#ad38f1e3da89b9a3eb3e9dc73df977954">shapeQueryAll:</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns a NSArray of <a class="el" href="interface_chipmunk_shape_query_info.html" title="Holds collision information from segment queries. You should never need to create one...">ChipmunkShapeQueryInfo</a> objects for all the shapes that overlap <code>shape</code>. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aba56451094ddc4286d74a08261bb2948"></a><!-- doxytag: member="ChipmunkSpace::shapeTest:" ref="aba56451094ddc4286d74a08261bb2948" args="(id shape)" -->
(BOOL) </td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_chipmunk_space.html#aba56451094ddc4286d74a08261bb2948">shapeTest:</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns true if the shape overlaps anything in the space. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a26033bbc72a2e2092487d5da1d18d2c7"></a><!-- doxytag: member="ChipmunkSpace::activateShapesTouchingShape:" ref="a26033bbc72a2e2092487d5da1d18d2c7" args="(ChipmunkShape *shape)" -->
(void) </td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_chipmunk_space.html#a26033bbc72a2e2092487d5da1d18d2c7">activateShapesTouchingShape:</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Perform a shape query for shape and call cpBodyActivate() for everythnig it touches. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2f278949798d2944a7465d0beaaa9921"></a><!-- doxytag: member="ChipmunkSpace::resizeStaticHashWithDim:andCount:" ref="a2f278949798d2944a7465d0beaaa9921" args="(cpFloat dim,[andCount] int count)" -->
(void) </td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_chipmunk_space.html#a2f278949798d2944a7465d0beaaa9921">resizeStaticHashWithDim:andCount:</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Retune the performance of the static shapes hash. See the C API documentation for a detailed description. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a03c6fe4c1640fe4b9023f90d56ad05ab"></a><!-- doxytag: member="ChipmunkSpace::resizeActiveHashWithDim:andCount:" ref="a03c6fe4c1640fe4b9023f90d56ad05ab" args="(cpFloat dim,[andCount] int count)" -->
(void) </td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_chipmunk_space.html#a03c6fe4c1640fe4b9023f90d56ad05ab">resizeActiveHashWithDim:andCount:</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Retune the performance of the active shapes hash. See the C API documentation for a detailed description. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7b6994b8a25e813cc349400d0d990779"></a><!-- doxytag: member="ChipmunkSpace::rehashStatic" ref="a7b6994b8a25e813cc349400d0d990779" args="()" -->
(void) </td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_chipmunk_space.html#a7b6994b8a25e813cc349400d0d990779">rehashStatic</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Update all the static shapes. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">(void) </td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_chipmunk_space.html#ababf6296d0413cdb9b97e877e5f1130e">rehashShape:</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Update the collision info for a single shape. <a href="#ababf6296d0413cdb9b97e877e5f1130e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7ca0baa1f9f99376e474f7e9b3bb1309"></a><!-- doxytag: member="ChipmunkSpace::step:" ref="a7ca0baa1f9f99376e474f7e9b3bb1309" args="(cpFloat dt)" -->
(void) </td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_chipmunk_space.html#a7ca0baa1f9f99376e474f7e9b3bb1309">step:</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Step time forward. While variable timesteps may be used, a constant timestep will allow you to reduce CPU usage by using fewer iterations. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a66fe23054085f9d0d2adfe156c43e711"></a><!-- doxytag: member="ChipmunkSpace::addBounds:thickness:elasticity:friction:layers:group:collisionType:" ref="a66fe23054085f9d0d2adfe156c43e711" args="(CGRect bounds,[thickness] cpFloat radius,[elasticity] cpFloat elasticity,[friction] cpFloat friction,[layers] cpLayers layers,[group] id group,[collisionType] id collisionType)" -->
(void) </td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_chipmunk_space.html#a66fe23054085f9d0d2adfe156c43e711">addBounds:thickness:elasticity:friction:layers:group:collisionType:</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Add a border of collision segments around a box. See <a class="el" href="interface_chipmunk_shape.html" title="Abstract base class for collsion shape types.">ChipmunkShape</a> for more information on the other parameters. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a05a254efc2324a71981e2c047009989e"></a><!-- doxytag: member="ChipmunkSpace::addBody:" ref="a05a254efc2324a71981e2c047009989e" args="(ChipmunkBody *obj)" -->
(<a class="el" href="interface_chipmunk_body.html">ChipmunkBody</a> *) </td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_chipmunk_space.html#a05a254efc2324a71981e2c047009989e">addBody:</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Add a body to the space. Normally you would simply use <a class="el" href="interface_chipmunk_space.html#a3c7c9546e958d23fac51a740ddfbfecd" title="Add an object to the space.">add:</a>. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab4ab8547f563a688f812e9700ee32478"></a><!-- doxytag: member="ChipmunkSpace::removeBody:" ref="ab4ab8547f563a688f812e9700ee32478" args="(ChipmunkBody *obj)" -->
(<a class="el" href="interface_chipmunk_body.html">ChipmunkBody</a> *) </td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_chipmunk_space.html#ab4ab8547f563a688f812e9700ee32478">removeBody:</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Remove a body to the space. Normally you would simply use <a class="el" href="interface_chipmunk_space.html#a59ea2ee0045c5301ecd0f3c5353b372f" title="Remove an object from the space.">remove:</a>. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa847faa0fe7676b1bc8bd40ed043f5cd"></a><!-- doxytag: member="ChipmunkSpace::addShape:" ref="aa847faa0fe7676b1bc8bd40ed043f5cd" args="(ChipmunkShape *obj)" -->
(<a class="el" href="interface_chipmunk_shape.html">ChipmunkShape</a> *) </td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_chipmunk_space.html#aa847faa0fe7676b1bc8bd40ed043f5cd">addShape:</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Add a shape to the space. Normally you would simply use <a class="el" href="interface_chipmunk_space.html#a3c7c9546e958d23fac51a740ddfbfecd" title="Add an object to the space.">add:</a>. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a68957396f56b85eacf0be4b5fdef30f7"></a><!-- doxytag: member="ChipmunkSpace::removeShape:" ref="a68957396f56b85eacf0be4b5fdef30f7" args="(ChipmunkShape *obj)" -->
(<a class="el" href="interface_chipmunk_shape.html">ChipmunkShape</a> *) </td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_chipmunk_space.html#a68957396f56b85eacf0be4b5fdef30f7">removeShape:</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Remove a shape to the space. Normally you would simply use <a class="el" href="interface_chipmunk_space.html#a59ea2ee0045c5301ecd0f3c5353b372f" title="Remove an object from the space.">remove:</a>. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1cbd7b480fd84d4dd3765e2c162baced"></a><!-- doxytag: member="ChipmunkSpace::addStaticShape:" ref="a1cbd7b480fd84d4dd3765e2c162baced" args="(ChipmunkShape *obj)" -->
(<a class="el" href="interface_chipmunk_shape.html">ChipmunkShape</a> *) </td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_chipmunk_space.html#a1cbd7b480fd84d4dd3765e2c162baced">addStaticShape:</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Add a static shape to the space. Normally you would simply create a static shape use <a class="el" href="interface_chipmunk_space.html#a3c7c9546e958d23fac51a740ddfbfecd" title="Add an object to the space.">add:</a>. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad6293583f76342660a6b148c590cd588"></a><!-- doxytag: member="ChipmunkSpace::removeStaticShape:" ref="ad6293583f76342660a6b148c590cd588" args="(ChipmunkShape *obj)" -->
(<a class="el" href="interface_chipmunk_shape.html">ChipmunkShape</a> *) </td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_chipmunk_space.html#ad6293583f76342660a6b148c590cd588">removeStaticShape:</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Remove a static shape to the space. Normally you would simply create a static shape use <a class="el" href="interface_chipmunk_space.html#a59ea2ee0045c5301ecd0f3c5353b372f" title="Remove an object from the space.">remove:</a>. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad50a687208dd1149fc83313a51f42348"></a><!-- doxytag: member="ChipmunkSpace::addConstraint:" ref="ad50a687208dd1149fc83313a51f42348" args="(ChipmunkConstraint *obj)" -->
(<a class="el" href="interface_chipmunk_constraint.html">ChipmunkConstraint</a> *) </td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_chipmunk_space.html#ad50a687208dd1149fc83313a51f42348">addConstraint:</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Add a constraint to the space. Normally you would simply use <a class="el" href="interface_chipmunk_space.html#a3c7c9546e958d23fac51a740ddfbfecd" title="Add an object to the space.">add:</a>. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae63ba01f99d88bff473db9b3156e2e94"></a><!-- doxytag: member="ChipmunkSpace::removeConstraint:" ref="ae63ba01f99d88bff473db9b3156e2e94" args="(ChipmunkConstraint *obj)" -->
(<a class="el" href="interface_chipmunk_constraint.html">ChipmunkConstraint</a> *) </td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_chipmunk_space.html#ae63ba01f99d88bff473db9b3156e2e94">removeConstraint:</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Remove a constraint to the space. Normally you would simply use <a class="el" href="interface_chipmunk_space.html#a59ea2ee0045c5301ecd0f3c5353b372f" title="Remove an object from the space.">remove:</a>. <br/></td></tr>
<tr><td colspan="2"><h2><a name="properties"></a>
Properties</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="interface_chipmunk_space.html#a14ae29e48719422333bc51ebfc292553">iterations</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">The iteration count is how many solver passes the space should use when solving collisions and joints (default is 10). <a href="#a14ae29e48719422333bc51ebfc292553"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="interface_chipmunk_space.html#a8c54f83ace39cb9a65ea1f150c32ba1d">elasticIterations</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Deprecated in 5.3.0, should not be needed. <a href="#a8c54f83ace39cb9a65ea1f150c32ba1d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afb02e25c8c4f20a9598b2602c0e6f2e6"></a><!-- doxytag: member="ChipmunkSpace::gravity" ref="afb02e25c8c4f20a9598b2602c0e6f2e6" args="" -->
cpVect </td><td class="memItemRight" valign="bottom"><a class="el" href="interface_chipmunk_space.html#afb02e25c8c4f20a9598b2602c0e6f2e6">gravity</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Global gravity value to use for all rigid bodies in this space (default value is <code>cpvzero</code>). <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">cpFloat </td><td class="memItemRight" valign="bottom"><a class="el" href="interface_chipmunk_space.html#a591e8e360264f67fc7f6f4494dde10b7">damping</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Global viscous damping value to use for all rigid bodies in this space (default value is 1.0 which disables damping). <a href="#a591e8e360264f67fc7f6f4494dde10b7"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad79276e72714d0e3d8025fb51efca906"></a><!-- doxytag: member="ChipmunkSpace::idleSpeedThreshold" ref="ad79276e72714d0e3d8025fb51efca906" args="" -->
cpFloat </td><td class="memItemRight" valign="bottom"><a class="el" href="interface_chipmunk_space.html#ad79276e72714d0e3d8025fb51efca906">idleSpeedThreshold</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">If a body is moving slower than this speed, it is considered idle. The default value is 0, which signals that the space should guess a good value based on the current gravity. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">cpFloat </td><td class="memItemRight" valign="bottom"><a class="el" href="interface_chipmunk_space.html#a8137619872454fb466471ac5af743347">sleepTimeThreshold</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Elapsed time before a group of idle bodies is put to sleep (defaults to infinity which disables sleeping). <a href="#a8137619872454fb466471ac5af743347"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="abea8947ecd2c50ed272d91ae051ceb43"></a><!-- doxytag: member="ChipmunkSpace::space" ref="abea8947ecd2c50ed272d91ae051ceb43" args="" -->
cpSpace * </td><td class="memItemRight" valign="bottom"><a class="el" href="interface_chipmunk_space.html#abea8947ecd2c50ed272d91ae051ceb43">space</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns a pointer to the underlying cpSpace C struct. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="interface_chipmunk_body.html">ChipmunkBody</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="interface_chipmunk_space.html#a858a6a13360cc3bbbb79339b76af1554">staticBody</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">The space's designated static body. <a href="#a858a6a13360cc3bbbb79339b76af1554"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>Chipmunk spaces are simulation containers. </p>
<p>You add a bunch of physics objects to a space (rigid bodies, collision shapes, and joints) and step the entire space forward through time as a whole. </p>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a3c7c9546e958d23fac51a740ddfbfecd"></a><!-- doxytag: member="ChipmunkSpace::add:" ref="a3c7c9546e958d23fac51a740ddfbfecd" args="(NSObject< ChipmunkObject > *obj)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (id) add: </td>
<td></td>
<td class="paramtype">(NSObject< <a class="el" href="protocol_chipmunk_object-p.html">ChipmunkObject</a> > *) </td>
<td class="paramname"> <em>obj</em></td>
<td> </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Add an object to the space. </p>
<p>This can be any object that implements the <a class="el" href="protocol_chipmunk_object-p.html" title="Allows you to add composite objects to a space in a single method call.">ChipmunkObject</a> protocol. This includes all the basic types such as <a class="el" href="interface_chipmunk_body.html" title="Rigid bodies are the basic unit of simulation in Chipmunk.">ChipmunkBody</a>, <a class="el" href="interface_chipmunk_shape.html" title="Abstract base class for collsion shape types.">ChipmunkShape</a> and <a class="el" href="interface_chipmunk_constraint.html" title="Constraints connect two ChipmunkBody objects together.">ChipmunkConstraint</a> as well as any composite game objects you may define that implement the protocol. </p>
<dl class="warning"><dt><b>Warning:</b></dt><dd>This method may not be called from a collision handler callback. See ChipmunkSpace.addPostStepCallback:selector:context: for information on how to do that. </dd></dl>
</div>
</div>
<a class="anchor" id="ab5a858ce3414e5efb2fecf982761b175"></a><!-- doxytag: member="ChipmunkSpace::addBaseObjects:" ref="ab5a858ce3414e5efb2fecf982761b175" args="(id< NSFastEnumeration > objects)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (void) addBaseObjects: </td>
<td></td>
<td class="paramtype">(id< NSFastEnumeration >) </td>
<td class="paramname"> <em>objects</em></td>
<td> </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Add a collection of <a class="el" href="protocol_chipmunk_base_object-p.html" title="This protocol is implemented by objects that know how to add themselves to a space.">ChipmunkBaseObject</a> objects to the space. </p>
<p>The objects must implement the <a class="el" href="protocol_chipmunk_base_object-p.html" title="This protocol is implemented by objects that know how to add themselves to a space.">ChipmunkBaseObject</a> protocol. These include <a class="el" href="interface_chipmunk_body.html" title="Rigid bodies are the basic unit of simulation in Chipmunk.">ChipmunkBody</a>, <a class="el" href="interface_chipmunk_shape.html" title="Abstract base class for collsion shape types.">ChipmunkShape</a> and <a class="el" href="interface_chipmunk_constraint.html" title="Constraints connect two ChipmunkBody objects together.">ChipmunkConstraint</a> objects. </p>
<dl class="warning"><dt><b>Warning:</b></dt><dd>This method may not be called from a collision handler callback. See ChipmunkSpace.addPostStepCallback:selector:context: for information on how to do that. </dd></dl>
</div>
</div>
<a class="anchor" id="a9780fa28138893f83464f025d0d8a167"></a><!-- doxytag: member="ChipmunkSpace::addCollisionHandler:typeA:typeB:begin:preSolve:postSolve:separate:" ref="a9780fa28138893f83464f025d0d8a167" args="(id target,[typeA] id a,[typeB] id b,[begin] SEL begin,[preSolve] SEL preSolve,[postSolve] SEL postSolve,[separate] SEL separate)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (void) addCollisionHandler: </td>
<td></td>
<td class="paramtype">(id) </td>
<td class="paramname"> <em>target</em></td>
</tr>
<tr>
<td class="paramkey">typeA:</td>
<td></td>
<td class="paramtype">(id) </td>
<td class="paramname"> <em>a</em></td>
</tr>
<tr>
<td class="paramkey">typeB:</td>
<td></td>
<td class="paramtype">(id) </td>
<td class="paramname"> <em>b</em></td>
</tr>
<tr>
<td class="paramkey">begin:</td>
<td></td>
<td class="paramtype">(SEL) </td>
<td class="paramname"> <em>begin</em></td>
</tr>
<tr>
<td class="paramkey">preSolve:</td>
<td></td>
<td class="paramtype">(SEL) </td>
<td class="paramname"> <em>preSolve</em></td>
</tr>
<tr>
<td class="paramkey">postSolve:</td>
<td></td>
<td class="paramtype">(SEL) </td>
<td class="paramname"> <em>postSolve</em></td>
</tr>
<tr>
<td class="paramkey">separate:</td>
<td></td>
<td class="paramtype">(SEL) </td>
<td class="paramname"> <em>separate</em></td><td> </td>
</tr>
<tr>
<td></td>
<td></td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Set a collision handler to handle specific collision types. </p>
<p>The methods are called only when shapes with the specified collisionTypes collide.</p>
<p><code>typeA</code> and <code>typeB</code> should be the same object references set to <a class="el" href="interface_chipmunk_shape.html#a8dc205ce246e673d60cc40d2bbd8a693" title="An object reference used as a collision type identifier.">ChipmunkShape.collisionType</a>. They can be any uniquely identifying object. Class and global NSString objects work well as collision types as they are easy to get a reference to and do not require you to allocate any objects.</p>
<p>The expected method selectors are as follows: </p>
<div class="fragment"><pre class="fragment">- (bool)begin:(cpArbiter *)arbiter <a class="code" href="interface_chipmunk_space.html#abea8947ecd2c50ed272d91ae051ceb43" title="Returns a pointer to the underlying cpSpace C struct.">space</a>:(<a class="code" href="interface_chipmunk_space.html" title="Chipmunk spaces are simulation containers.">ChipmunkSpace</a>*)<a class="code" href="interface_chipmunk_space.html#abea8947ecd2c50ed272d91ae051ceb43" title="Returns a pointer to the underlying cpSpace C struct.">space</a>
- (<span class="keywordtype">bool</span>)preSolve:(cpArbiter *)arbiter <a class="code" href="interface_chipmunk_space.html#abea8947ecd2c50ed272d91ae051ceb43" title="Returns a pointer to the underlying cpSpace C struct.">space</a>:(<a class="code" href="interface_chipmunk_space.html" title="Chipmunk spaces are simulation containers.">ChipmunkSpace</a>*)<a class="code" href="interface_chipmunk_space.html#abea8947ecd2c50ed272d91ae051ceb43" title="Returns a pointer to the underlying cpSpace C struct.">space</a>
- (void)postSolve:(cpArbiter *)arbiter <a class="code" href="interface_chipmunk_space.html#abea8947ecd2c50ed272d91ae051ceb43" title="Returns a pointer to the underlying cpSpace C struct.">space</a>:(<a class="code" href="interface_chipmunk_space.html" title="Chipmunk spaces are simulation containers.">ChipmunkSpace</a>*)<a class="code" href="interface_chipmunk_space.html#abea8947ecd2c50ed272d91ae051ceb43" title="Returns a pointer to the underlying cpSpace C struct.">space</a>
- (<span class="keywordtype">void</span>)separate:(cpArbiter *)arbiter <a class="code" href="interface_chipmunk_space.html#abea8947ecd2c50ed272d91ae051ceb43" title="Returns a pointer to the underlying cpSpace C struct.">space</a>:(<a class="code" href="interface_chipmunk_space.html" title="Chipmunk spaces are simulation containers.">ChipmunkSpace</a>*)<a class="code" href="interface_chipmunk_space.html#abea8947ecd2c50ed272d91ae051ceb43" title="Returns a pointer to the underlying cpSpace C struct.">space</a>
</pre></div>
</div>
</div>
<a class="anchor" id="a2c830350cabce22db65905bfa4337057"></a><!-- doxytag: member="ChipmunkSpace::addPostStepCallback:selector:key:" ref="a2c830350cabce22db65905bfa4337057" args="(id target,[selector] SEL selector,[key] id key)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (void) addPostStepCallback: </td>
<td></td>
<td class="paramtype">(id) </td>
<td class="paramname"> <em>target</em></td>
</tr>
<tr>
<td class="paramkey">selector:</td>
<td></td>
<td class="paramtype">(SEL) </td>
<td class="paramname"> <em>selector</em></td>
</tr>
<tr>
<td class="paramkey">key:</td>
<td></td>
<td class="paramtype">(id) </td>
<td class="paramname"> <em>key</em></td><td> </td>
</tr>
<tr>
<td></td>
<td></td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Define a callback to be run just before [<a class="el" href="interface_chipmunk_space.html" title="Chipmunk spaces are simulation containers.">ChipmunkSpace</a> step:] finishes. </p>
<p>The main reason you want to define post-step callbacks is to get around the restriction that you cannot call the add/remove methods from a collision handler callback. Post-step callbacks run right before the next (or current) call to <a class="el" href="interface_chipmunk_space.html#a7ca0baa1f9f99376e474f7e9b3bb1309" title="Step time forward. While variable timesteps may be used, a constant timestep will allow you to reduce...">step:</a> returns when it is safe to add and remove objects. You can only schedule one post-step callback per context value, this prevents you from accidentally removing an object twice. Registering a second callback for the same object will replace the first.</p>
<p>The method signature of the method should be: </p>
<div class="fragment"><pre class="fragment">- (void)postStepCallback:(<span class="keywordtype">id</span>)key</code></pre>
</pre></div><p>This makes it easy to call a removal method on your game controller to remove a game object that died or was destroyed as the result of a collision: </p>
<div class="fragment"><pre class="fragment">[<a class="code" href="interface_chipmunk_space.html#abea8947ecd2c50ed272d91ae051ceb43" title="Returns a pointer to the underlying cpSpace C struct.">space</a> addPostStepCallback:gameController selector:<span class="keyword">@selector</span>(<span class="keyword">remove</span>:) key:gameObject];
</pre></div><dl class="attention"><dt><b>Attention:</b></dt><dd>Not to be confused with post-solve collision handler callbacks. </dd></dl>
<dl class="warning"><dt><b>Warning:</b></dt><dd><code>target</code> and <code>object</code> cannot be retained by the <a class="el" href="interface_chipmunk_space.html" title="Chipmunk spaces are simulation containers.">ChipmunkSpace</a>. If you need to release either after registering the callback, use autorelease to ensure that they won't be deallocated until after [<a class="el" href="interface_chipmunk_space.html" title="Chipmunk spaces are simulation containers.">ChipmunkSpace</a> step:] returns. </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="interface_chipmunk_space.html#aeb8bb804046389c71cdf8532e27ea1d1" title="Remove the Chipmunk Object from the space at the end of the step:">- addPostStepRemoval:</a> </dd></dl>
</div>
</div>
<a class="anchor" id="a3eea3d382fdae0ac1d061416b0c4beaa"></a><!-- doxytag: member="ChipmunkSpace::addShapeAHandler:typeA:typeB:begin:preSolve:postSolve:separate:" ref="a3eea3d382fdae0ac1d061416b0c4beaa" args="(Class klass,[typeA] id a,[typeB] id b,[begin] SEL begin,[preSolve] SEL preSolve,[postSolve] SEL postSolve,[separate](deprecated __attribute__)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (void) addShapeAHandler: </td>
<td></td>
<td class="paramtype">(Class) </td>
<td class="paramname"> <em>klass</em></td>
</tr>
<tr>
<td class="paramkey">typeA:</td>
<td></td>
<td class="paramtype">(id) </td>
<td class="paramname"> <em>a</em></td>
</tr>
<tr>
<td class="paramkey">typeB:</td>
<td></td>
<td class="paramtype">(id) </td>
<td class="paramname"> <em>b</em></td>
</tr>
<tr>
<td class="paramkey">begin:</td>
<td></td>
<td class="paramtype">(SEL) </td>
<td class="paramname"> <em>begin</em></td>
</tr>
<tr>
<td class="paramkey">preSolve:</td>
<td></td>
<td class="paramtype">(SEL) </td>
<td class="paramname"> <em>preSolve</em></td>
</tr>
<tr>
<td class="paramkey">postSolve:</td>
<td></td>
<td class="paramtype">(SEL) </td>
<td class="paramname"> <em>postSolve</em></td><td> </td>
</tr>
<tr>
<td></td>
<td></td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Deprecated in 5.3.0. </p>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000002">Deprecated:</a></b></dt><dd>since 5.3.0 </dd></dl>
</div>
</div>
<a class="anchor" id="aab00351f11a8faa5ead747d4ac7390bc"></a><!-- doxytag: member="ChipmunkSpace::addShapeBHandler:typeA:typeB:begin:preSolve:postSolve:separate:" ref="aab00351f11a8faa5ead747d4ac7390bc" args="(Class klass,[typeA] id a,[typeB] id b,[begin] SEL begin,[preSolve] SEL preSolve,[postSolve] SEL postSolve,[separate](deprecated __attribute__)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (void) addShapeBHandler: </td>
<td></td>
<td class="paramtype">(Class) </td>
<td class="paramname"> <em>klass</em></td>
</tr>
<tr>
<td class="paramkey">typeA:</td>
<td></td>
<td class="paramtype">(id) </td>
<td class="paramname"> <em>a</em></td>
</tr>
<tr>
<td class="paramkey">typeB:</td>
<td></td>
<td class="paramtype">(id) </td>
<td class="paramname"> <em>b</em></td>
</tr>
<tr>
<td class="paramkey">begin:</td>
<td></td>
<td class="paramtype">(SEL) </td>
<td class="paramname"> <em>begin</em></td>
</tr>
<tr>
<td class="paramkey">preSolve:</td>
<td></td>
<td class="paramtype">(SEL) </td>
<td class="paramname"> <em>preSolve</em></td>
</tr>
<tr>
<td class="paramkey">postSolve:</td>
<td></td>
<td class="paramtype">(SEL) </td>
<td class="paramname"> <em>postSolve</em></td><td> </td>
</tr>
<tr>
<td></td>
<td></td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Deprecated in 5.3.0. </p>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000003">Deprecated:</a></b></dt><dd>since 5.3.0 </dd></dl>
</div>
</div>
<a class="anchor" id="ababf6296d0413cdb9b97e877e5f1130e"></a><!-- doxytag: member="ChipmunkSpace::rehashShape:" ref="ababf6296d0413cdb9b97e877e5f1130e" args="(ChipmunkShape *shape)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (void) rehashShape: </td>
<td></td>
<td class="paramtype">(<a class="el" href="interface_chipmunk_shape.html">ChipmunkShape</a> *) </td>
<td class="paramname"> <em>shape</em></td>
<td> </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Update the collision info for a single shape. </p>
<p>Can be used to update individual static shapes that were moved or active shapes that were moved that you want to query against. </p>
</div>
</div>
<a class="anchor" id="a59ea2ee0045c5301ecd0f3c5353b372f"></a><!-- doxytag: member="ChipmunkSpace::remove:" ref="a59ea2ee0045c5301ecd0f3c5353b372f" args="(NSObject< ChipmunkObject > *obj)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (id) remove: </td>
<td></td>
<td class="paramtype">(NSObject< <a class="el" href="protocol_chipmunk_object-p.html">ChipmunkObject</a> > *) </td>
<td class="paramname"> <em>obj</em></td>
<td> </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Remove an object from the space. </p>
<p>This can be any object that implements the <a class="el" href="protocol_chipmunk_object-p.html" title="Allows you to add composite objects to a space in a single method call.">ChipmunkObject</a> protocol. This includes all the basic types such as <a class="el" href="interface_chipmunk_body.html" title="Rigid bodies are the basic unit of simulation in Chipmunk.">ChipmunkBody</a>, <a class="el" href="interface_chipmunk_shape.html" title="Abstract base class for collsion shape types.">ChipmunkShape</a> and <a class="el" href="interface_chipmunk_constraint.html" title="Constraints connect two ChipmunkBody objects together.">ChipmunkConstraint</a> as well as any composite game objects you may define that implement the protocol. </p>
<dl class="warning"><dt><b>Warning:</b></dt><dd>This method may not be called from a collision handler callback. See ChipmunkSpace.addPostStepCallback:selector:context: for information on how to do that. </dd></dl>
</div>
</div>
<a class="anchor" id="abed9b7e56ea1d27de7fac3cca1a2fc0a"></a><!-- doxytag: member="ChipmunkSpace::removeBaseObjects:" ref="abed9b7e56ea1d27de7fac3cca1a2fc0a" args="(id< NSFastEnumeration > objects)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (void) removeBaseObjects: </td>
<td></td>
<td class="paramtype">(id< NSFastEnumeration >) </td>
<td class="paramname"> <em>objects</em></td>
<td> </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Remove a collection of <a class="el" href="protocol_chipmunk_base_object-p.html" title="This protocol is implemented by objects that know how to add themselves to a space.">ChipmunkBaseObject</a> objects from the space. </p>
<p>The objects must implement the <a class="el" href="protocol_chipmunk_base_object-p.html" title="This protocol is implemented by objects that know how to add themselves to a space.">ChipmunkBaseObject</a> protocol. These include <a class="el" href="interface_chipmunk_body.html" title="Rigid bodies are the basic unit of simulation in Chipmunk.">ChipmunkBody</a>, <a class="el" href="interface_chipmunk_shape.html" title="Abstract base class for collsion shape types.">ChipmunkShape</a> and <a class="el" href="interface_chipmunk_constraint.html" title="Constraints connect two ChipmunkBody objects together.">ChipmunkConstraint</a> objects. </p>
<dl class="warning"><dt><b>Warning:</b></dt><dd>This method may not be called from a collision handler callback. See ChipmunkSpace.addPostStepCallback:selector:context: for information on how to do that. </dd></dl>
</div>
</div>
<a class="anchor" id="accf5543d3c96d7bd7d8b48694ea6a28b"></a><!-- doxytag: member="ChipmunkSpace::setDefaultCollisionHandler:begin:preSolve:postSolve:separate:" ref="accf5543d3c96d7bd7d8b48694ea6a28b" args="(id target,[begin] SEL begin,[preSolve] SEL preSolve,[postSolve] SEL postSolve,[separate] SEL separate)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (void) setDefaultCollisionHandler: </td>
<td></td>
<td class="paramtype">(id) </td>
<td class="paramname"> <em>target</em></td>
</tr>
<tr>
<td class="paramkey">begin:</td>
<td></td>
<td class="paramtype">(SEL) </td>
<td class="paramname"> <em>begin</em></td>
</tr>
<tr>
<td class="paramkey">preSolve:</td>
<td></td>
<td class="paramtype">(SEL) </td>
<td class="paramname"> <em>preSolve</em></td>
</tr>
<tr>
<td class="paramkey">postSolve:</td>
<td></td>
<td class="paramtype">(SEL) </td>
<td class="paramname"> <em>postSolve</em></td>
</tr>
<tr>
<td class="paramkey">separate:</td>
<td></td>
<td class="paramtype">(SEL) </td>
<td class="paramname"> <em>separate</em></td><td> </td>
</tr>
<tr>
<td></td>
<td></td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Set the default collision handler. </p>
<p>The default handler is used for all collisions when a specific collision handler cannot be found.</p>
<p>The expected method selectors are as follows: </p>
<div class="fragment"><pre class="fragment">- (bool)begin:(cpArbiter *)arbiter <a class="code" href="interface_chipmunk_space.html#abea8947ecd2c50ed272d91ae051ceb43" title="Returns a pointer to the underlying cpSpace C struct.">space</a>:(<a class="code" href="interface_chipmunk_space.html" title="Chipmunk spaces are simulation containers.">ChipmunkSpace</a>*)<a class="code" href="interface_chipmunk_space.html#abea8947ecd2c50ed272d91ae051ceb43" title="Returns a pointer to the underlying cpSpace C struct.">space</a>
- (<span class="keywordtype">bool</span>)preSolve:(cpArbiter *)arbiter <a class="code" href="interface_chipmunk_space.html#abea8947ecd2c50ed272d91ae051ceb43" title="Returns a pointer to the underlying cpSpace C struct.">space</a>:(<a class="code" href="interface_chipmunk_space.html" title="Chipmunk spaces are simulation containers.">ChipmunkSpace</a>*)<a class="code" href="interface_chipmunk_space.html#abea8947ecd2c50ed272d91ae051ceb43" title="Returns a pointer to the underlying cpSpace C struct.">space</a>
- (void)postSolve:(cpArbiter *)arbiter <a class="code" href="interface_chipmunk_space.html#abea8947ecd2c50ed272d91ae051ceb43" title="Returns a pointer to the underlying cpSpace C struct.">space</a>:(<a class="code" href="interface_chipmunk_space.html" title="Chipmunk spaces are simulation containers.">ChipmunkSpace</a>*)<a class="code" href="interface_chipmunk_space.html#abea8947ecd2c50ed272d91ae051ceb43" title="Returns a pointer to the underlying cpSpace C struct.">space</a>
- (<span class="keywordtype">void</span>)separate:(cpArbiter *)arbiter <a class="code" href="interface_chipmunk_space.html#abea8947ecd2c50ed272d91ae051ceb43" title="Returns a pointer to the underlying cpSpace C struct.">space</a>:(<a class="code" href="interface_chipmunk_space.html" title="Chipmunk spaces are simulation containers.">ChipmunkSpace</a>*)<a class="code" href="interface_chipmunk_space.html#abea8947ecd2c50ed272d91ae051ceb43" title="Returns a pointer to the underlying cpSpace C struct.">space</a>
</pre></div>
</div>
</div>
<hr/><h2>Property Documentation</h2>
<a class="anchor" id="a591e8e360264f67fc7f6f4494dde10b7"></a><!-- doxytag: member="ChipmunkSpace::damping" ref="a591e8e360264f67fc7f6f4494dde10b7" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (cpFloat) damping<code> [read, write, assign]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Global viscous damping value to use for all rigid bodies in this space (default value is 1.0 which disables damping). </p>
<p>This value is the fraction of velocity a body should have after 1 second. A value of 0.9 would mean that each second, a body would have 80% of the velocity it had the previous second. </p>
</div>
</div>
<a class="anchor" id="a8c54f83ace39cb9a65ea1f150c32ba1d"></a><!-- doxytag: member="ChipmunkSpace::elasticIterations" ref="a8c54f83ace39cb9a65ea1f150c32ba1d" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (int) elasticIterations<code> [read, write, assign]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Deprecated in 5.3.0, should not be needed. </p>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000001">Deprecated:</a></b></dt><dd>since 5.3.0 </dd></dl>
</div>
</div>
<a class="anchor" id="a14ae29e48719422333bc51ebfc292553"></a><!-- doxytag: member="ChipmunkSpace::iterations" ref="a14ae29e48719422333bc51ebfc292553" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (int) iterations<code> [read, write, assign]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>The iteration count is how many solver passes the space should use when solving collisions and joints (default is 10). </p>
<p>Fewer iterations mean less CPU usage, but lower quality (mushy looking) physics. </p>
</div>
</div>
<a class="anchor" id="a8137619872454fb466471ac5af743347"></a><!-- doxytag: member="ChipmunkSpace::sleepTimeThreshold" ref="a8137619872454fb466471ac5af743347" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (cpFloat) sleepTimeThreshold<code> [read, write, assign]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Elapsed time before a group of idle bodies is put to sleep (defaults to infinity which disables sleeping). </p>
<p>If an entire group of touching or jointed bodies has been idle for at least this long, the space will put all of the bodies into a sleeping state where they consume very little CPU. </p>
</div>
</div>
<a class="anchor" id="a858a6a13360cc3bbbb79339b76af1554"></a><!-- doxytag: member="ChipmunkSpace::staticBody" ref="a858a6a13360cc3bbbb79339b76af1554" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (<a class="el" href="interface_chipmunk_body.html">ChipmunkBody</a>*) staticBody<code> [read, assign]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>The space's designated static body. </p>
<p>Collision shapes added to the body will automatically be marked as static shapes, and rigid bodies that come to rest while touching or jointed to this body will fall asleep. </p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="_chipmunk_space_8h_source.html">ChipmunkSpace.h</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>Properties</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Mon Dec 13 2010 18:43:39 for Objective Chipmunk by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.1 </small></address>
</body>
</html>
|