Subversion Repositories AndroidProjects

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
307 chris 1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2
<!--NewPage-->
3
<HTML>
4
<HEAD>
5
<!-- Generated by javadoc (build 1.6.0_26) on Sun Jun 03 02:18:09 CEST 2012 -->
6
<TITLE>
7
World (libgdx API)
8
</TITLE>
9
 
10
<META NAME="date" CONTENT="2012-06-03">
11
 
12
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">
13
 
14
<SCRIPT type="text/javascript">
15
function windowTitle()
16
{
17
    if (location.href.indexOf('is-external=true') == -1) {
18
        parent.document.title="World (libgdx API)";
19
    }
20
}
21
</SCRIPT>
22
<NOSCRIPT>
23
</NOSCRIPT>
24
 
25
</HEAD>
26
 
27
<BODY BGCOLOR="white" onload="windowTitle();">
28
<HR>
29
 
30
 
31
<!-- ========= START OF TOP NAVBAR ======= -->
32
<A NAME="navbar_top"><!-- --></A>
33
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
34
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
35
<TR>
36
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
37
<A NAME="navbar_top_firstrow"><!-- --></A>
38
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
39
  <TR ALIGN="center" VALIGN="top">
40
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
41
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
42
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
43
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/World.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
44
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
45
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
46
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
47
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
48
  </TR>
49
</TABLE>
50
</TD>
51
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
52
 
53
                                libgdx API
54
                                <style>
55
                                body, td, th { font-family:Helvetica, Tahoma, Arial, sans-serif; font-size:10pt }
56
                                pre, code, tt { font-size:9pt; font-family:Lucida Console, Courier New, sans-serif }
57
                                h1, h2, h3, .FrameTitleFont, .FrameHeadingFont, .TableHeadingColor font { font-size:105%;  font-weight:bold }
58
                                .TableHeadingColor { background:#EEEEFF; }
59
                                a { text-decoration:none }
60
                                a:hover { text-decoration:underline }
61
                                a:link, a:visited { color:blue }
62
                                table { border:0px }
63
                                .TableRowColor td:first-child { border-left:1px solid black }
64
                                .TableRowColor td { border:0px; border-bottom:1px solid black; border-right:1px solid black }
65
                                hr { border:0px; border-bottom:1px solid #333366; }
66
                                </style>
67
                        </EM>
68
</TD>
69
</TR>
70
 
71
<TR>
72
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
73
&nbsp;<A HREF="../../../../../com/badlogic/gdx/physics/box2d/Transform.html" title="class in com.badlogic.gdx.physics.box2d"><B>PREV CLASS</B></A>&nbsp;
74
&nbsp;<A HREF="../../../../../com/badlogic/gdx/physics/box2d/WorldManifold.html" title="class in com.badlogic.gdx.physics.box2d"><B>NEXT CLASS</B></A></FONT></TD>
75
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
76
  <A HREF="../../../../../index.html?com/badlogic/gdx/physics/box2d/World.html" target="_top"><B>FRAMES</B></A>  &nbsp;
77
&nbsp;<A HREF="World.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
78
&nbsp;<SCRIPT type="text/javascript">
79
  <!--
80
  if(window==top) {
81
    document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
82
  }
83
  //-->
84
</SCRIPT>
85
<NOSCRIPT>
86
  <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
87
</NOSCRIPT>
88
 
89
 
90
</FONT></TD>
91
</TR>
92
<TR>
93
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
94
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
95
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
96
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
97
</TR>
98
</TABLE>
99
<A NAME="skip-navbar_top"></A>
100
<!-- ========= END OF TOP NAVBAR ========= -->
101
 
102
<HR>
103
<!-- ======== START OF CLASS DATA ======== -->
104
<H2>
105
<FONT SIZE="-1">
106
com.badlogic.gdx.physics.box2d</FONT>
107
<BR>
108
Class World</H2>
109
<PRE>
110
java.lang.Object
111
  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>com.badlogic.gdx.physics.box2d.World</B>
112
</PRE>
113
<DL>
114
<DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../../../com/badlogic/gdx/utils/Disposable.html" title="interface in com.badlogic.gdx.utils">Disposable</A></DD>
115
</DL>
116
<HR>
117
<DL>
118
<DT><PRE>public final class <B>World</B><DT>extends java.lang.Object<DT>implements <A HREF="../../../../../com/badlogic/gdx/utils/Disposable.html" title="interface in com.badlogic.gdx.utils">Disposable</A></DL>
119
</PRE>
120
 
121
<P>
122
The world class manages all physics entities, dynamic simulation, and asynchronous queries. The world also contains efficient
123
 memory management facilities.
124
<P>
125
 
126
<P>
127
<DL>
128
<DT><B>Author:</B></DT>
129
  <DD>mzechner</DD>
130
</DL>
131
<HR>
132
 
133
<P>
134
<!-- =========== FIELD SUMMARY =========== -->
135
 
136
<A NAME="field_summary"><!-- --></A>
137
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
138
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
139
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
140
<B>Field Summary</B></FONT></TH>
141
</TR>
142
<TR BGCOLOR="white" CLASS="TableRowColor">
143
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
144
<CODE>protected &nbsp;<A HREF="../../../../../com/badlogic/gdx/utils/LongMap.html" title="class in com.badlogic.gdx.utils">LongMap</A>&lt;<A HREF="../../../../../com/badlogic/gdx/physics/box2d/Body.html" title="class in com.badlogic.gdx.physics.box2d">Body</A>&gt;</CODE></FONT></TD>
145
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/physics/box2d/World.html#bodies">bodies</A></B></CODE>
146
 
147
<BR>
148
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;all known bodies</TD>
149
</TR>
150
<TR BGCOLOR="white" CLASS="TableRowColor">
151
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
152
<CODE>protected &nbsp;<A HREF="../../../../../com/badlogic/gdx/physics/box2d/ContactFilter.html" title="interface in com.badlogic.gdx.physics.box2d">ContactFilter</A></CODE></FONT></TD>
153
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/physics/box2d/World.html#contactFilter">contactFilter</A></B></CODE>
154
 
155
<BR>
156
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Contact filter</TD>
157
</TR>
158
<TR BGCOLOR="white" CLASS="TableRowColor">
159
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
160
<CODE>protected &nbsp;<A HREF="../../../../../com/badlogic/gdx/physics/box2d/ContactListener.html" title="interface in com.badlogic.gdx.physics.box2d">ContactListener</A></CODE></FONT></TD>
161
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/physics/box2d/World.html#contactListener">contactListener</A></B></CODE>
162
 
163
<BR>
164
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Contact listener</TD>
165
</TR>
166
<TR BGCOLOR="white" CLASS="TableRowColor">
167
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
168
<CODE>protected &nbsp;<A HREF="../../../../../com/badlogic/gdx/utils/LongMap.html" title="class in com.badlogic.gdx.utils">LongMap</A>&lt;<A HREF="../../../../../com/badlogic/gdx/physics/box2d/Fixture.html" title="class in com.badlogic.gdx.physics.box2d">Fixture</A>&gt;</CODE></FONT></TD>
169
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/physics/box2d/World.html#fixtures">fixtures</A></B></CODE>
170
 
171
<BR>
172
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;all known fixtures</TD>
173
</TR>
174
<TR BGCOLOR="white" CLASS="TableRowColor">
175
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
176
<CODE>protected &nbsp;<A HREF="../../../../../com/badlogic/gdx/utils/Pool.html" title="class in com.badlogic.gdx.utils">Pool</A>&lt;<A HREF="../../../../../com/badlogic/gdx/physics/box2d/Body.html" title="class in com.badlogic.gdx.physics.box2d">Body</A>&gt;</CODE></FONT></TD>
177
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/physics/box2d/World.html#freeBodies">freeBodies</A></B></CODE>
178
 
179
<BR>
180
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pool for bodies</TD>
181
</TR>
182
<TR BGCOLOR="white" CLASS="TableRowColor">
183
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
184
<CODE>protected &nbsp;<A HREF="../../../../../com/badlogic/gdx/utils/Pool.html" title="class in com.badlogic.gdx.utils">Pool</A>&lt;<A HREF="../../../../../com/badlogic/gdx/physics/box2d/Fixture.html" title="class in com.badlogic.gdx.physics.box2d">Fixture</A>&gt;</CODE></FONT></TD>
185
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/physics/box2d/World.html#freeFixtures">freeFixtures</A></B></CODE>
186
 
187
<BR>
188
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pool for fixtures</TD>
189
</TR>
190
<TR BGCOLOR="white" CLASS="TableRowColor">
191
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
192
<CODE>protected &nbsp;<A HREF="../../../../../com/badlogic/gdx/utils/LongMap.html" title="class in com.badlogic.gdx.utils">LongMap</A>&lt;<A HREF="../../../../../com/badlogic/gdx/physics/box2d/Joint.html" title="class in com.badlogic.gdx.physics.box2d">Joint</A>&gt;</CODE></FONT></TD>
193
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/physics/box2d/World.html#joints">joints</A></B></CODE>
194
 
195
<BR>
196
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;all known joints</TD>
197
</TR>
198
</TABLE>
199
&nbsp;
200
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
201
 
202
<A NAME="constructor_summary"><!-- --></A>
203
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
204
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
205
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
206
<B>Constructor Summary</B></FONT></TH>
207
</TR>
208
<TR BGCOLOR="white" CLASS="TableRowColor">
209
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/physics/box2d/World.html#World(com.badlogic.gdx.math.Vector2, boolean)">World</A></B>(<A HREF="../../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math">Vector2</A>&nbsp;gravity,
210
      boolean&nbsp;doSleep)</CODE>
211
 
212
<BR>
213
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Construct a world object.</TD>
214
</TR>
215
</TABLE>
216
&nbsp;
217
<!-- ========== METHOD SUMMARY =========== -->
218
 
219
<A NAME="method_summary"><!-- --></A>
220
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
221
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
222
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
223
<B>Method Summary</B></FONT></TH>
224
</TR>
225
<TR BGCOLOR="white" CLASS="TableRowColor">
226
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
227
<CODE>&nbsp;void</CODE></FONT></TD>
228
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/physics/box2d/World.html#clearForces()">clearForces</A></B>()</CODE>
229
 
230
<BR>
231
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Manually clear the force buffer on all bodies.</TD>
232
</TR>
233
<TR BGCOLOR="white" CLASS="TableRowColor">
234
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
235
<CODE>&nbsp;<A HREF="../../../../../com/badlogic/gdx/physics/box2d/Body.html" title="class in com.badlogic.gdx.physics.box2d">Body</A></CODE></FONT></TD>
236
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/physics/box2d/World.html#createBody(com.badlogic.gdx.physics.box2d.BodyDef)">createBody</A></B>(<A HREF="../../../../../com/badlogic/gdx/physics/box2d/BodyDef.html" title="class in com.badlogic.gdx.physics.box2d">BodyDef</A>&nbsp;def)</CODE>
237
 
238
<BR>
239
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a rigid body given a definition.</TD>
240
</TR>
241
<TR BGCOLOR="white" CLASS="TableRowColor">
242
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
243
<CODE>&nbsp;<A HREF="../../../../../com/badlogic/gdx/physics/box2d/Joint.html" title="class in com.badlogic.gdx.physics.box2d">Joint</A></CODE></FONT></TD>
244
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/physics/box2d/World.html#createJoint(com.badlogic.gdx.physics.box2d.JointDef)">createJoint</A></B>(<A HREF="../../../../../com/badlogic/gdx/physics/box2d/JointDef.html" title="class in com.badlogic.gdx.physics.box2d">JointDef</A>&nbsp;def)</CODE>
245
 
246
<BR>
247
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a joint to constrain bodies together.</TD>
248
</TR>
249
<TR BGCOLOR="white" CLASS="TableRowColor">
250
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
251
<CODE>&nbsp;void</CODE></FONT></TD>
252
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/physics/box2d/World.html#destroyBody(com.badlogic.gdx.physics.box2d.Body)">destroyBody</A></B>(<A HREF="../../../../../com/badlogic/gdx/physics/box2d/Body.html" title="class in com.badlogic.gdx.physics.box2d">Body</A>&nbsp;body)</CODE>
253
 
254
<BR>
255
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Destroy a rigid body given a definition.</TD>
256
</TR>
257
<TR BGCOLOR="white" CLASS="TableRowColor">
258
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
259
<CODE>&nbsp;void</CODE></FONT></TD>
260
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/physics/box2d/World.html#destroyJoint(com.badlogic.gdx.physics.box2d.Joint)">destroyJoint</A></B>(<A HREF="../../../../../com/badlogic/gdx/physics/box2d/Joint.html" title="class in com.badlogic.gdx.physics.box2d">Joint</A>&nbsp;joint)</CODE>
261
 
262
<BR>
263
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Destroy a joint.</TD>
264
</TR>
265
<TR BGCOLOR="white" CLASS="TableRowColor">
266
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
267
<CODE>&nbsp;void</CODE></FONT></TD>
268
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/physics/box2d/World.html#dispose()">dispose</A></B>()</CODE>
269
 
270
<BR>
271
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Releases all resources of this object.</TD>
272
</TR>
273
<TR BGCOLOR="white" CLASS="TableRowColor">
274
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
275
<CODE>&nbsp;boolean</CODE></FONT></TD>
276
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/physics/box2d/World.html#getAutoClearForces()">getAutoClearForces</A></B>()</CODE>
277
 
278
<BR>
279
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the flag that controls automatic clearing of forces after each time step.</TD>
280
</TR>
281
<TR BGCOLOR="white" CLASS="TableRowColor">
282
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
283
<CODE>&nbsp;java.util.Iterator&lt;<A HREF="../../../../../com/badlogic/gdx/physics/box2d/Body.html" title="class in com.badlogic.gdx.physics.box2d">Body</A>&gt;</CODE></FONT></TD>
284
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/physics/box2d/World.html#getBodies()">getBodies</A></B>()</CODE>
285
 
286
<BR>
287
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
288
</TR>
289
<TR BGCOLOR="white" CLASS="TableRowColor">
290
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
291
<CODE>&nbsp;int</CODE></FONT></TD>
292
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/physics/box2d/World.html#getBodyCount()">getBodyCount</A></B>()</CODE>
293
 
294
<BR>
295
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the number of bodies.</TD>
296
</TR>
297
<TR BGCOLOR="white" CLASS="TableRowColor">
298
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
299
<CODE>&nbsp;int</CODE></FONT></TD>
300
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/physics/box2d/World.html#getContactCount()">getContactCount</A></B>()</CODE>
301
 
302
<BR>
303
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the number of contacts (each may have 0 or more contact points).</TD>
304
</TR>
305
<TR BGCOLOR="white" CLASS="TableRowColor">
306
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
307
<CODE>&nbsp;java.util.List&lt;<A HREF="../../../../../com/badlogic/gdx/physics/box2d/Contact.html" title="class in com.badlogic.gdx.physics.box2d">Contact</A>&gt;</CODE></FONT></TD>
308
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/physics/box2d/World.html#getContactList()">getContactList</A></B>()</CODE>
309
 
310
<BR>
311
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the list of <A HREF="../../../../../com/badlogic/gdx/physics/box2d/Contact.html" title="class in com.badlogic.gdx.physics.box2d"><CODE>Contact</CODE></A> instances produced by the last call to <A HREF="../../../../../com/badlogic/gdx/physics/box2d/World.html#step(float, int, int)"><CODE>step(float, int, int)</CODE></A>.</TD>
312
</TR>
313
<TR BGCOLOR="white" CLASS="TableRowColor">
314
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
315
<CODE>&nbsp;<A HREF="../../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math">Vector2</A></CODE></FONT></TD>
316
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/physics/box2d/World.html#getGravity()">getGravity</A></B>()</CODE>
317
 
318
<BR>
319
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
320
</TR>
321
<TR BGCOLOR="white" CLASS="TableRowColor">
322
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
323
<CODE>&nbsp;int</CODE></FONT></TD>
324
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/physics/box2d/World.html#getJointCount()">getJointCount</A></B>()</CODE>
325
 
326
<BR>
327
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the number of joints.</TD>
328
</TR>
329
<TR BGCOLOR="white" CLASS="TableRowColor">
330
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
331
<CODE>&nbsp;java.util.Iterator&lt;<A HREF="../../../../../com/badlogic/gdx/physics/box2d/Joint.html" title="class in com.badlogic.gdx.physics.box2d">Joint</A>&gt;</CODE></FONT></TD>
332
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/physics/box2d/World.html#getJoints()">getJoints</A></B>()</CODE>
333
 
334
<BR>
335
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
336
</TR>
337
<TR BGCOLOR="white" CLASS="TableRowColor">
338
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
339
<CODE>&nbsp;int</CODE></FONT></TD>
340
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/physics/box2d/World.html#getProxyCount()">getProxyCount</A></B>()</CODE>
341
 
342
<BR>
343
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the number of broad-phase proxies.</TD>
344
</TR>
345
<TR BGCOLOR="white" CLASS="TableRowColor">
346
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
347
<CODE>static&nbsp;float</CODE></FONT></TD>
348
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/physics/box2d/World.html#getVelocityThreshold()">getVelocityThreshold</A></B>()</CODE>
349
 
350
<BR>
351
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
352
</TR>
353
<TR BGCOLOR="white" CLASS="TableRowColor">
354
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
355
<CODE>&nbsp;boolean</CODE></FONT></TD>
356
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/physics/box2d/World.html#isLocked()">isLocked</A></B>()</CODE>
357
 
358
<BR>
359
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Is the world locked (in the middle of a time step).</TD>
360
</TR>
361
<TR BGCOLOR="white" CLASS="TableRowColor">
362
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
363
<CODE>&nbsp;void</CODE></FONT></TD>
364
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/physics/box2d/World.html#QueryAABB(com.badlogic.gdx.physics.box2d.QueryCallback, float, float, float, float)">QueryAABB</A></B>(<A HREF="../../../../../com/badlogic/gdx/physics/box2d/QueryCallback.html" title="interface in com.badlogic.gdx.physics.box2d">QueryCallback</A>&nbsp;callback,
365
          float&nbsp;lowerX,
366
          float&nbsp;lowerY,
367
          float&nbsp;upperX,
368
          float&nbsp;upperY)</CODE>
369
 
370
<BR>
371
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Query the world for all fixtures that potentially overlap the provided AABB.</TD>
372
</TR>
373
<TR BGCOLOR="white" CLASS="TableRowColor">
374
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
375
<CODE>&nbsp;void</CODE></FONT></TD>
376
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/physics/box2d/World.html#rayCast(com.badlogic.gdx.physics.box2d.RayCastCallback, com.badlogic.gdx.math.Vector2, com.badlogic.gdx.math.Vector2)">rayCast</A></B>(<A HREF="../../../../../com/badlogic/gdx/physics/box2d/RayCastCallback.html" title="interface in com.badlogic.gdx.physics.box2d">RayCastCallback</A>&nbsp;callback,
377
        <A HREF="../../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math">Vector2</A>&nbsp;point1,
378
        <A HREF="../../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math">Vector2</A>&nbsp;point2)</CODE>
379
 
380
<BR>
381
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Ray-cast the world for all fixtures in the path of the ray.</TD>
382
</TR>
383
<TR BGCOLOR="white" CLASS="TableRowColor">
384
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
385
<CODE>&nbsp;void</CODE></FONT></TD>
386
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/physics/box2d/World.html#setAutoClearForces(boolean)">setAutoClearForces</A></B>(boolean&nbsp;flag)</CODE>
387
 
388
<BR>
389
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set flag to control automatic clearing of forces after each time step.</TD>
390
</TR>
391
<TR BGCOLOR="white" CLASS="TableRowColor">
392
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
393
<CODE>&nbsp;void</CODE></FONT></TD>
394
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/physics/box2d/World.html#setContactFilter(com.badlogic.gdx.physics.box2d.ContactFilter)">setContactFilter</A></B>(<A HREF="../../../../../com/badlogic/gdx/physics/box2d/ContactFilter.html" title="interface in com.badlogic.gdx.physics.box2d">ContactFilter</A>&nbsp;filter)</CODE>
395
 
396
<BR>
397
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Register a contact filter to provide specific control over collision.</TD>
398
</TR>
399
<TR BGCOLOR="white" CLASS="TableRowColor">
400
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
401
<CODE>&nbsp;void</CODE></FONT></TD>
402
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/physics/box2d/World.html#setContactListener(com.badlogic.gdx.physics.box2d.ContactListener)">setContactListener</A></B>(<A HREF="../../../../../com/badlogic/gdx/physics/box2d/ContactListener.html" title="interface in com.badlogic.gdx.physics.box2d">ContactListener</A>&nbsp;listener)</CODE>
403
 
404
<BR>
405
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Register a contact event listener.</TD>
406
</TR>
407
<TR BGCOLOR="white" CLASS="TableRowColor">
408
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
409
<CODE>&nbsp;void</CODE></FONT></TD>
410
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/physics/box2d/World.html#setContinuousPhysics(boolean)">setContinuousPhysics</A></B>(boolean&nbsp;flag)</CODE>
411
 
412
<BR>
413
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Enable/disable continuous physics.</TD>
414
</TR>
415
<TR BGCOLOR="white" CLASS="TableRowColor">
416
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
417
<CODE>&nbsp;void</CODE></FONT></TD>
418
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/physics/box2d/World.html#setDestructionListener(com.badlogic.gdx.physics.box2d.DestructionListener)">setDestructionListener</A></B>(<A HREF="../../../../../com/badlogic/gdx/physics/box2d/DestructionListener.html" title="interface in com.badlogic.gdx.physics.box2d">DestructionListener</A>&nbsp;listener)</CODE>
419
 
420
<BR>
421
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Register a destruction listener.</TD>
422
</TR>
423
<TR BGCOLOR="white" CLASS="TableRowColor">
424
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
425
<CODE>&nbsp;void</CODE></FONT></TD>
426
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/physics/box2d/World.html#setGravity(com.badlogic.gdx.math.Vector2)">setGravity</A></B>(<A HREF="../../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math">Vector2</A>&nbsp;gravity)</CODE>
427
 
428
<BR>
429
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Change the global gravity vector.</TD>
430
</TR>
431
<TR BGCOLOR="white" CLASS="TableRowColor">
432
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
433
<CODE>static&nbsp;void</CODE></FONT></TD>
434
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/physics/box2d/World.html#setVelocityThreshold(float)">setVelocityThreshold</A></B>(float&nbsp;threshold)</CODE>
435
 
436
<BR>
437
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the box2d velocity threshold globally, for all World instances.</TD>
438
</TR>
439
<TR BGCOLOR="white" CLASS="TableRowColor">
440
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
441
<CODE>&nbsp;void</CODE></FONT></TD>
442
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/physics/box2d/World.html#setWarmStarting(boolean)">setWarmStarting</A></B>(boolean&nbsp;flag)</CODE>
443
 
444
<BR>
445
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Enable/disable warm starting.</TD>
446
</TR>
447
<TR BGCOLOR="white" CLASS="TableRowColor">
448
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
449
<CODE>&nbsp;void</CODE></FONT></TD>
450
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/physics/box2d/World.html#step(float, int, int)">step</A></B>(float&nbsp;timeStep,
451
     int&nbsp;velocityIterations,
452
     int&nbsp;positionIterations)</CODE>
453
 
454
<BR>
455
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Take a time step.</TD>
456
</TR>
457
</TABLE>
458
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
459
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
460
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
461
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
462
</TR>
463
<TR BGCOLOR="white" CLASS="TableRowColor">
464
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
465
</TR>
466
</TABLE>
467
&nbsp;
468
<P>
469
 
470
<!-- ============ FIELD DETAIL =========== -->
471
 
472
<A NAME="field_detail"><!-- --></A>
473
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
474
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
475
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
476
<B>Field Detail</B></FONT></TH>
477
</TR>
478
</TABLE>
479
 
480
<A NAME="freeBodies"><!-- --></A><H3>
481
freeBodies</H3>
482
<PRE>
483
protected final <A HREF="../../../../../com/badlogic/gdx/utils/Pool.html" title="class in com.badlogic.gdx.utils">Pool</A>&lt;<A HREF="../../../../../com/badlogic/gdx/physics/box2d/Body.html" title="class in com.badlogic.gdx.physics.box2d">Body</A>&gt; <B>freeBodies</B></PRE>
484
<DL>
485
<DD>pool for bodies
486
<P>
487
<DL>
488
</DL>
489
</DL>
490
<HR>
491
 
492
<A NAME="freeFixtures"><!-- --></A><H3>
493
freeFixtures</H3>
494
<PRE>
495
protected final <A HREF="../../../../../com/badlogic/gdx/utils/Pool.html" title="class in com.badlogic.gdx.utils">Pool</A>&lt;<A HREF="../../../../../com/badlogic/gdx/physics/box2d/Fixture.html" title="class in com.badlogic.gdx.physics.box2d">Fixture</A>&gt; <B>freeFixtures</B></PRE>
496
<DL>
497
<DD>pool for fixtures
498
<P>
499
<DL>
500
</DL>
501
</DL>
502
<HR>
503
 
504
<A NAME="bodies"><!-- --></A><H3>
505
bodies</H3>
506
<PRE>
507
protected final <A HREF="../../../../../com/badlogic/gdx/utils/LongMap.html" title="class in com.badlogic.gdx.utils">LongMap</A>&lt;<A HREF="../../../../../com/badlogic/gdx/physics/box2d/Body.html" title="class in com.badlogic.gdx.physics.box2d">Body</A>&gt; <B>bodies</B></PRE>
508
<DL>
509
<DD>all known bodies
510
<P>
511
<DL>
512
</DL>
513
</DL>
514
<HR>
515
 
516
<A NAME="fixtures"><!-- --></A><H3>
517
fixtures</H3>
518
<PRE>
519
protected final <A HREF="../../../../../com/badlogic/gdx/utils/LongMap.html" title="class in com.badlogic.gdx.utils">LongMap</A>&lt;<A HREF="../../../../../com/badlogic/gdx/physics/box2d/Fixture.html" title="class in com.badlogic.gdx.physics.box2d">Fixture</A>&gt; <B>fixtures</B></PRE>
520
<DL>
521
<DD>all known fixtures
522
<P>
523
<DL>
524
</DL>
525
</DL>
526
<HR>
527
 
528
<A NAME="joints"><!-- --></A><H3>
529
joints</H3>
530
<PRE>
531
protected final <A HREF="../../../../../com/badlogic/gdx/utils/LongMap.html" title="class in com.badlogic.gdx.utils">LongMap</A>&lt;<A HREF="../../../../../com/badlogic/gdx/physics/box2d/Joint.html" title="class in com.badlogic.gdx.physics.box2d">Joint</A>&gt; <B>joints</B></PRE>
532
<DL>
533
<DD>all known joints
534
<P>
535
<DL>
536
</DL>
537
</DL>
538
<HR>
539
 
540
<A NAME="contactFilter"><!-- --></A><H3>
541
contactFilter</H3>
542
<PRE>
543
protected <A HREF="../../../../../com/badlogic/gdx/physics/box2d/ContactFilter.html" title="interface in com.badlogic.gdx.physics.box2d">ContactFilter</A> <B>contactFilter</B></PRE>
544
<DL>
545
<DD>Contact filter
546
<P>
547
<DL>
548
</DL>
549
</DL>
550
<HR>
551
 
552
<A NAME="contactListener"><!-- --></A><H3>
553
contactListener</H3>
554
<PRE>
555
protected <A HREF="../../../../../com/badlogic/gdx/physics/box2d/ContactListener.html" title="interface in com.badlogic.gdx.physics.box2d">ContactListener</A> <B>contactListener</B></PRE>
556
<DL>
557
<DD>Contact listener
558
<P>
559
<DL>
560
</DL>
561
</DL>
562
 
563
<!-- ========= CONSTRUCTOR DETAIL ======== -->
564
 
565
<A NAME="constructor_detail"><!-- --></A>
566
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
567
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
568
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
569
<B>Constructor Detail</B></FONT></TH>
570
</TR>
571
</TABLE>
572
 
573
<A NAME="World(com.badlogic.gdx.math.Vector2, boolean)"><!-- --></A><H3>
574
World</H3>
575
<PRE>
576
public <B>World</B>(<A HREF="../../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math">Vector2</A>&nbsp;gravity,
577
             boolean&nbsp;doSleep)</PRE>
578
<DL>
579
<DD>Construct a world object.
580
<P>
581
<DL>
582
<DT><B>Parameters:</B><DD><CODE>gravity</CODE> - the world gravity vector.<DD><CODE>doSleep</CODE> - improve performance by not simulating inactive bodies.</DL>
583
</DL>
584
 
585
<!-- ============ METHOD DETAIL ========== -->
586
 
587
<A NAME="method_detail"><!-- --></A>
588
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
589
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
590
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
591
<B>Method Detail</B></FONT></TH>
592
</TR>
593
</TABLE>
594
 
595
<A NAME="setDestructionListener(com.badlogic.gdx.physics.box2d.DestructionListener)"><!-- --></A><H3>
596
setDestructionListener</H3>
597
<PRE>
598
public void <B>setDestructionListener</B>(<A HREF="../../../../../com/badlogic/gdx/physics/box2d/DestructionListener.html" title="interface in com.badlogic.gdx.physics.box2d">DestructionListener</A>&nbsp;listener)</PRE>
599
<DL>
600
<DD>Register a destruction listener. The listener is owned by you and must remain in scope.
601
<P>
602
<DD><DL>
603
</DL>
604
</DD>
605
<DD><DL>
606
</DL>
607
</DD>
608
</DL>
609
<HR>
610
 
611
<A NAME="setContactFilter(com.badlogic.gdx.physics.box2d.ContactFilter)"><!-- --></A><H3>
612
setContactFilter</H3>
613
<PRE>
614
public void <B>setContactFilter</B>(<A HREF="../../../../../com/badlogic/gdx/physics/box2d/ContactFilter.html" title="interface in com.badlogic.gdx.physics.box2d">ContactFilter</A>&nbsp;filter)</PRE>
615
<DL>
616
<DD>Register a contact filter to provide specific control over collision. Otherwise the default filter is used
617
 (b2_defaultFilter). The listener is owned by you and must remain in scope.
618
<P>
619
<DD><DL>
620
</DL>
621
</DD>
622
<DD><DL>
623
</DL>
624
</DD>
625
</DL>
626
<HR>
627
 
628
<A NAME="setContactListener(com.badlogic.gdx.physics.box2d.ContactListener)"><!-- --></A><H3>
629
setContactListener</H3>
630
<PRE>
631
public void <B>setContactListener</B>(<A HREF="../../../../../com/badlogic/gdx/physics/box2d/ContactListener.html" title="interface in com.badlogic.gdx.physics.box2d">ContactListener</A>&nbsp;listener)</PRE>
632
<DL>
633
<DD>Register a contact event listener. The listener is owned by you and must remain in scope.
634
<P>
635
<DD><DL>
636
</DL>
637
</DD>
638
<DD><DL>
639
</DL>
640
</DD>
641
</DL>
642
<HR>
643
 
644
<A NAME="createBody(com.badlogic.gdx.physics.box2d.BodyDef)"><!-- --></A><H3>
645
createBody</H3>
646
<PRE>
647
public <A HREF="../../../../../com/badlogic/gdx/physics/box2d/Body.html" title="class in com.badlogic.gdx.physics.box2d">Body</A> <B>createBody</B>(<A HREF="../../../../../com/badlogic/gdx/physics/box2d/BodyDef.html" title="class in com.badlogic.gdx.physics.box2d">BodyDef</A>&nbsp;def)</PRE>
648
<DL>
649
<DD>Create a rigid body given a definition. No reference to the definition is retained.
650
<P>
651
<DD><DL>
652
</DL>
653
</DD>
654
<DD><DL>
655
</DL>
656
</DD>
657
</DL>
658
<HR>
659
 
660
<A NAME="destroyBody(com.badlogic.gdx.physics.box2d.Body)"><!-- --></A><H3>
661
destroyBody</H3>
662
<PRE>
663
public void <B>destroyBody</B>(<A HREF="../../../../../com/badlogic/gdx/physics/box2d/Body.html" title="class in com.badlogic.gdx.physics.box2d">Body</A>&nbsp;body)</PRE>
664
<DL>
665
<DD>Destroy a rigid body given a definition. No reference to the definition is retained. This function is locked during
666
 callbacks.
667
<P>
668
<DD><DL>
669
</DL>
670
</DD>
671
<DD><DL>
672
</DL>
673
</DD>
674
</DL>
675
<HR>
676
 
677
<A NAME="createJoint(com.badlogic.gdx.physics.box2d.JointDef)"><!-- --></A><H3>
678
createJoint</H3>
679
<PRE>
680
public <A HREF="../../../../../com/badlogic/gdx/physics/box2d/Joint.html" title="class in com.badlogic.gdx.physics.box2d">Joint</A> <B>createJoint</B>(<A HREF="../../../../../com/badlogic/gdx/physics/box2d/JointDef.html" title="class in com.badlogic.gdx.physics.box2d">JointDef</A>&nbsp;def)</PRE>
681
<DL>
682
<DD>Create a joint to constrain bodies together. No reference to the definition is retained. This may cause the connected bodies
683
 to cease colliding.
684
<P>
685
<DD><DL>
686
</DL>
687
</DD>
688
<DD><DL>
689
</DL>
690
</DD>
691
</DL>
692
<HR>
693
 
694
<A NAME="destroyJoint(com.badlogic.gdx.physics.box2d.Joint)"><!-- --></A><H3>
695
destroyJoint</H3>
696
<PRE>
697
public void <B>destroyJoint</B>(<A HREF="../../../../../com/badlogic/gdx/physics/box2d/Joint.html" title="class in com.badlogic.gdx.physics.box2d">Joint</A>&nbsp;joint)</PRE>
698
<DL>
699
<DD>Destroy a joint. This may cause the connected bodies to begin colliding.
700
<P>
701
<DD><DL>
702
</DL>
703
</DD>
704
<DD><DL>
705
</DL>
706
</DD>
707
</DL>
708
<HR>
709
 
710
<A NAME="step(float, int, int)"><!-- --></A><H3>
711
step</H3>
712
<PRE>
713
public void <B>step</B>(float&nbsp;timeStep,
714
                 int&nbsp;velocityIterations,
715
                 int&nbsp;positionIterations)</PRE>
716
<DL>
717
<DD>Take a time step. This performs collision detection, integration, and constraint solution.
718
<P>
719
<DD><DL>
720
</DL>
721
</DD>
722
<DD><DL>
723
<DT><B>Parameters:</B><DD><CODE>timeStep</CODE> - the amount of time to simulate, this should not vary.<DD><CODE>velocityIterations</CODE> - for the velocity constraint solver.<DD><CODE>positionIterations</CODE> - for the position constraint solver.</DL>
724
</DD>
725
</DL>
726
<HR>
727
 
728
<A NAME="clearForces()"><!-- --></A><H3>
729
clearForces</H3>
730
<PRE>
731
public void <B>clearForces</B>()</PRE>
732
<DL>
733
<DD>Manually clear the force buffer on all bodies. By default, forces are cleared automatically after each call to Step. The
734
 default behavior is modified by calling SetAutoClearForces. The purpose of this function is to support sub-stepping.
735
 Sub-stepping is often used to maintain a fixed sized time step under a variable frame-rate. When you perform sub-stepping
736
 you will disable auto clearing of forces and instead call ClearForces after all sub-steps are complete in one pass of your
737
 game loop. <A HREF="../../../../../com/badlogic/gdx/physics/box2d/World.html#setAutoClearForces(boolean)"><CODE>setAutoClearForces(boolean)</CODE></A>
738
<P>
739
<DD><DL>
740
</DL>
741
</DD>
742
<DD><DL>
743
</DL>
744
</DD>
745
</DL>
746
<HR>
747
 
748
<A NAME="setWarmStarting(boolean)"><!-- --></A><H3>
749
setWarmStarting</H3>
750
<PRE>
751
public void <B>setWarmStarting</B>(boolean&nbsp;flag)</PRE>
752
<DL>
753
<DD>Enable/disable warm starting. For testing.
754
<P>
755
<DD><DL>
756
</DL>
757
</DD>
758
<DD><DL>
759
</DL>
760
</DD>
761
</DL>
762
<HR>
763
 
764
<A NAME="setContinuousPhysics(boolean)"><!-- --></A><H3>
765
setContinuousPhysics</H3>
766
<PRE>
767
public void <B>setContinuousPhysics</B>(boolean&nbsp;flag)</PRE>
768
<DL>
769
<DD>Enable/disable continuous physics. For testing.
770
<P>
771
<DD><DL>
772
</DL>
773
</DD>
774
<DD><DL>
775
</DL>
776
</DD>
777
</DL>
778
<HR>
779
 
780
<A NAME="getProxyCount()"><!-- --></A><H3>
781
getProxyCount</H3>
782
<PRE>
783
public int <B>getProxyCount</B>()</PRE>
784
<DL>
785
<DD>Get the number of broad-phase proxies.
786
<P>
787
<DD><DL>
788
</DL>
789
</DD>
790
<DD><DL>
791
</DL>
792
</DD>
793
</DL>
794
<HR>
795
 
796
<A NAME="getBodyCount()"><!-- --></A><H3>
797
getBodyCount</H3>
798
<PRE>
799
public int <B>getBodyCount</B>()</PRE>
800
<DL>
801
<DD>Get the number of bodies.
802
<P>
803
<DD><DL>
804
</DL>
805
</DD>
806
<DD><DL>
807
</DL>
808
</DD>
809
</DL>
810
<HR>
811
 
812
<A NAME="getJointCount()"><!-- --></A><H3>
813
getJointCount</H3>
814
<PRE>
815
public int <B>getJointCount</B>()</PRE>
816
<DL>
817
<DD>Get the number of joints.
818
<P>
819
<DD><DL>
820
</DL>
821
</DD>
822
<DD><DL>
823
</DL>
824
</DD>
825
</DL>
826
<HR>
827
 
828
<A NAME="getContactCount()"><!-- --></A><H3>
829
getContactCount</H3>
830
<PRE>
831
public int <B>getContactCount</B>()</PRE>
832
<DL>
833
<DD>Get the number of contacts (each may have 0 or more contact points).
834
<P>
835
<DD><DL>
836
</DL>
837
</DD>
838
<DD><DL>
839
</DL>
840
</DD>
841
</DL>
842
<HR>
843
 
844
<A NAME="setGravity(com.badlogic.gdx.math.Vector2)"><!-- --></A><H3>
845
setGravity</H3>
846
<PRE>
847
public void <B>setGravity</B>(<A HREF="../../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math">Vector2</A>&nbsp;gravity)</PRE>
848
<DL>
849
<DD>Change the global gravity vector.
850
<P>
851
<DD><DL>
852
</DL>
853
</DD>
854
<DD><DL>
855
</DL>
856
</DD>
857
</DL>
858
<HR>
859
 
860
<A NAME="getGravity()"><!-- --></A><H3>
861
getGravity</H3>
862
<PRE>
863
public <A HREF="../../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math">Vector2</A> <B>getGravity</B>()</PRE>
864
<DL>
865
<DD><DL>
866
</DL>
867
</DD>
868
<DD><DL>
869
</DL>
870
</DD>
871
</DL>
872
<HR>
873
 
874
<A NAME="isLocked()"><!-- --></A><H3>
875
isLocked</H3>
876
<PRE>
877
public boolean <B>isLocked</B>()</PRE>
878
<DL>
879
<DD>Is the world locked (in the middle of a time step).
880
<P>
881
<DD><DL>
882
</DL>
883
</DD>
884
<DD><DL>
885
</DL>
886
</DD>
887
</DL>
888
<HR>
889
 
890
<A NAME="setAutoClearForces(boolean)"><!-- --></A><H3>
891
setAutoClearForces</H3>
892
<PRE>
893
public void <B>setAutoClearForces</B>(boolean&nbsp;flag)</PRE>
894
<DL>
895
<DD>Set flag to control automatic clearing of forces after each time step.
896
<P>
897
<DD><DL>
898
</DL>
899
</DD>
900
<DD><DL>
901
</DL>
902
</DD>
903
</DL>
904
<HR>
905
 
906
<A NAME="getAutoClearForces()"><!-- --></A><H3>
907
getAutoClearForces</H3>
908
<PRE>
909
public boolean <B>getAutoClearForces</B>()</PRE>
910
<DL>
911
<DD>Get the flag that controls automatic clearing of forces after each time step.
912
<P>
913
<DD><DL>
914
</DL>
915
</DD>
916
<DD><DL>
917
</DL>
918
</DD>
919
</DL>
920
<HR>
921
 
922
<A NAME="QueryAABB(com.badlogic.gdx.physics.box2d.QueryCallback, float, float, float, float)"><!-- --></A><H3>
923
QueryAABB</H3>
924
<PRE>
925
public void <B>QueryAABB</B>(<A HREF="../../../../../com/badlogic/gdx/physics/box2d/QueryCallback.html" title="interface in com.badlogic.gdx.physics.box2d">QueryCallback</A>&nbsp;callback,
926
                      float&nbsp;lowerX,
927
                      float&nbsp;lowerY,
928
                      float&nbsp;upperX,
929
                      float&nbsp;upperY)</PRE>
930
<DL>
931
<DD>Query the world for all fixtures that potentially overlap the provided AABB.
932
<P>
933
<DD><DL>
934
</DL>
935
</DD>
936
<DD><DL>
937
<DT><B>Parameters:</B><DD><CODE>callback</CODE> - a user implemented callback class.<DD><CODE>lowerX</CODE> - the x coordinate of the lower left corner<DD><CODE>lowerY</CODE> - the y coordinate of the lower left corner<DD><CODE>upperX</CODE> - the x coordinate of the upper right corner<DD><CODE>upperY</CODE> - the y coordinate of the upper right corner</DL>
938
</DD>
939
</DL>
940
<HR>
941
 
942
<A NAME="getContactList()"><!-- --></A><H3>
943
getContactList</H3>
944
<PRE>
945
public java.util.List&lt;<A HREF="../../../../../com/badlogic/gdx/physics/box2d/Contact.html" title="class in com.badlogic.gdx.physics.box2d">Contact</A>&gt; <B>getContactList</B>()</PRE>
946
<DL>
947
<DD>Returns the list of <A HREF="../../../../../com/badlogic/gdx/physics/box2d/Contact.html" title="class in com.badlogic.gdx.physics.box2d"><CODE>Contact</CODE></A> instances produced by the last call to <A HREF="../../../../../com/badlogic/gdx/physics/box2d/World.html#step(float, int, int)"><CODE>step(float, int, int)</CODE></A>. Note that the
948
 returned list will have O(1) access times when using indexing. contacts are created and destroyed in the middle of a time
949
 step. Use <A HREF="../../../../../com/badlogic/gdx/physics/box2d/ContactListener.html" title="interface in com.badlogic.gdx.physics.box2d"><CODE>ContactListener</CODE></A> to avoid missing contacts
950
<P>
951
<DD><DL>
952
</DL>
953
</DD>
954
<DD><DL>
955
 
956
<DT><B>Returns:</B><DD>the contact list</DL>
957
</DD>
958
</DL>
959
<HR>
960
 
961
<A NAME="getBodies()"><!-- --></A><H3>
962
getBodies</H3>
963
<PRE>
964
public java.util.Iterator&lt;<A HREF="../../../../../com/badlogic/gdx/physics/box2d/Body.html" title="class in com.badlogic.gdx.physics.box2d">Body</A>&gt; <B>getBodies</B>()</PRE>
965
<DL>
966
<DD><DL>
967
</DL>
968
</DD>
969
<DD><DL>
970
 
971
<DT><B>Returns:</B><DD>all bodies currently in the simulation</DL>
972
</DD>
973
</DL>
974
<HR>
975
 
976
<A NAME="getJoints()"><!-- --></A><H3>
977
getJoints</H3>
978
<PRE>
979
public java.util.Iterator&lt;<A HREF="../../../../../com/badlogic/gdx/physics/box2d/Joint.html" title="class in com.badlogic.gdx.physics.box2d">Joint</A>&gt; <B>getJoints</B>()</PRE>
980
<DL>
981
<DD><DL>
982
</DL>
983
</DD>
984
<DD><DL>
985
 
986
<DT><B>Returns:</B><DD>all joints currently in the simulation</DL>
987
</DD>
988
</DL>
989
<HR>
990
 
991
<A NAME="dispose()"><!-- --></A><H3>
992
dispose</H3>
993
<PRE>
994
public void <B>dispose</B>()</PRE>
995
<DL>
996
<DD><B>Description copied from interface: <CODE><A HREF="../../../../../com/badlogic/gdx/utils/Disposable.html#dispose()">Disposable</A></CODE></B></DD>
997
<DD>Releases all resources of this object.
998
<P>
999
<DD><DL>
1000
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../com/badlogic/gdx/utils/Disposable.html#dispose()">dispose</A></CODE> in interface <CODE><A HREF="../../../../../com/badlogic/gdx/utils/Disposable.html" title="interface in com.badlogic.gdx.utils">Disposable</A></CODE></DL>
1001
</DD>
1002
<DD><DL>
1003
</DL>
1004
</DD>
1005
</DL>
1006
<HR>
1007
 
1008
<A NAME="setVelocityThreshold(float)"><!-- --></A><H3>
1009
setVelocityThreshold</H3>
1010
<PRE>
1011
public static void <B>setVelocityThreshold</B>(float&nbsp;threshold)</PRE>
1012
<DL>
1013
<DD>Sets the box2d velocity threshold globally, for all World instances.
1014
<P>
1015
<DD><DL>
1016
</DL>
1017
</DD>
1018
<DD><DL>
1019
<DT><B>Parameters:</B><DD><CODE>threshold</CODE> - the threshold, default 1.0f</DL>
1020
</DD>
1021
</DL>
1022
<HR>
1023
 
1024
<A NAME="getVelocityThreshold()"><!-- --></A><H3>
1025
getVelocityThreshold</H3>
1026
<PRE>
1027
public static float <B>getVelocityThreshold</B>()</PRE>
1028
<DL>
1029
<DD><DL>
1030
</DL>
1031
</DD>
1032
<DD><DL>
1033
 
1034
<DT><B>Returns:</B><DD>the global box2d velocity threshold.</DL>
1035
</DD>
1036
</DL>
1037
<HR>
1038
 
1039
<A NAME="rayCast(com.badlogic.gdx.physics.box2d.RayCastCallback, com.badlogic.gdx.math.Vector2, com.badlogic.gdx.math.Vector2)"><!-- --></A><H3>
1040
rayCast</H3>
1041
<PRE>
1042
public void <B>rayCast</B>(<A HREF="../../../../../com/badlogic/gdx/physics/box2d/RayCastCallback.html" title="interface in com.badlogic.gdx.physics.box2d">RayCastCallback</A>&nbsp;callback,
1043
                    <A HREF="../../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math">Vector2</A>&nbsp;point1,
1044
                    <A HREF="../../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math">Vector2</A>&nbsp;point2)</PRE>
1045
<DL>
1046
<DD>Ray-cast the world for all fixtures in the path of the ray. The ray-cast ignores shapes that contain the starting point.
1047
<P>
1048
<DD><DL>
1049
</DL>
1050
</DD>
1051
<DD><DL>
1052
<DT><B>Parameters:</B><DD><CODE>callback</CODE> - a user implemented callback class.<DD><CODE>point1</CODE> - the ray starting point<DD><CODE>point2</CODE> - the ray ending point</DL>
1053
</DD>
1054
</DL>
1055
<!-- ========= END OF CLASS DATA ========= -->
1056
<HR>
1057
 
1058
 
1059
<!-- ======= START OF BOTTOM NAVBAR ====== -->
1060
<A NAME="navbar_bottom"><!-- --></A>
1061
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
1062
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
1063
<TR>
1064
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
1065
<A NAME="navbar_bottom_firstrow"><!-- --></A>
1066
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
1067
  <TR ALIGN="center" VALIGN="top">
1068
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
1069
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
1070
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
1071
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/World.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
1072
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
1073
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
1074
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
1075
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
1076
  </TR>
1077
</TABLE>
1078
</TD>
1079
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
1080
libgdx API</EM>
1081
</TD>
1082
</TR>
1083
 
1084
<TR>
1085
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
1086
&nbsp;<A HREF="../../../../../com/badlogic/gdx/physics/box2d/Transform.html" title="class in com.badlogic.gdx.physics.box2d"><B>PREV CLASS</B></A>&nbsp;
1087
&nbsp;<A HREF="../../../../../com/badlogic/gdx/physics/box2d/WorldManifold.html" title="class in com.badlogic.gdx.physics.box2d"><B>NEXT CLASS</B></A></FONT></TD>
1088
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
1089
  <A HREF="../../../../../index.html?com/badlogic/gdx/physics/box2d/World.html" target="_top"><B>FRAMES</B></A>  &nbsp;
1090
&nbsp;<A HREF="World.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
1091
&nbsp;<SCRIPT type="text/javascript">
1092
  <!--
1093
  if(window==top) {
1094
    document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
1095
  }
1096
  //-->
1097
</SCRIPT>
1098
<NOSCRIPT>
1099
  <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
1100
</NOSCRIPT>
1101
 
1102
 
1103
</FONT></TD>
1104
</TR>
1105
<TR>
1106
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
1107
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
1108
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
1109
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
1110
</TR>
1111
</TABLE>
1112
<A NAME="skip-navbar_bottom"></A>
1113
<!-- ======== END OF BOTTOM NAVBAR ======= -->
1114
 
1115
<HR>
1116
 
1117
                                <div style="font-size:9pt"><i>
1118
                                Copyright 2010 Mario Zechner (contact@badlogicgames.com), Nathan Sweet (admin@esotericsoftware.com)
1119
                                </i></div>
1120
 
1121
</BODY>
1122
</HTML>