Subversion Repositories AndroidProjects

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
356 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 Jan 27 20:37:07 CET 2013 -->
6
<TITLE>
7
Rectangle (libgdx API)
8
</TITLE>
9
 
10
<META NAME="date" CONTENT="2013-01-27">
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="Rectangle (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/Rectangle.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/math/Quaternion.html" title="class in com.badlogic.gdx.math"><B>PREV CLASS</B></A>&nbsp;
74
&nbsp;<A HREF="../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math"><B>NEXT CLASS</B></A></FONT></TD>
75
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
76
  <A HREF="../../../../index.html?com/badlogic/gdx/math/Rectangle.html" target="_top"><B>FRAMES</B></A>  &nbsp;
77
&nbsp;<A HREF="Rectangle.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.math</FONT>
107
<BR>
108
Class Rectangle</H2>
109
<PRE>
110
java.lang.Object
111
  <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>com.badlogic.gdx.math.Rectangle</B>
112
</PRE>
113
<DL>
114
<DT><B>All Implemented Interfaces:</B> <DD>java.io.Serializable</DD>
115
</DL>
116
<HR>
117
<DL>
118
<DT><PRE>public class <B>Rectangle</B><DT>extends java.lang.Object<DT>implements java.io.Serializable</DL>
119
</PRE>
120
 
121
<P>
122
Encapsulates a 2D rectangle defined by it's bottom corner point and its extends in x (width) and y (height).
123
<P>
124
 
125
<P>
126
<DL>
127
<DT><B>Author:</B></DT>
128
  <DD>badlogicgames@gmail.com</DD>
129
<DT><B>See Also:</B><DD><A HREF="../../../../serialized-form.html#com.badlogic.gdx.math.Rectangle">Serialized Form</A></DL>
130
<HR>
131
 
132
<P>
133
<!-- =========== FIELD SUMMARY =========== -->
134
 
135
<A NAME="field_summary"><!-- --></A>
136
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
137
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
138
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
139
<B>Field Summary</B></FONT></TH>
140
</TR>
141
<TR BGCOLOR="white" CLASS="TableRowColor">
142
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
143
<CODE>&nbsp;float</CODE></FONT></TD>
144
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Rectangle.html#height">height</A></B></CODE>
145
 
146
<BR>
147
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
148
</TR>
149
<TR BGCOLOR="white" CLASS="TableRowColor">
150
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
151
<CODE>static&nbsp;<A HREF="../../../../com/badlogic/gdx/math/Rectangle.html" title="class in com.badlogic.gdx.math">Rectangle</A></CODE></FONT></TD>
152
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Rectangle.html#tmp">tmp</A></B></CODE>
153
 
154
<BR>
155
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Static temporary rectangle.</TD>
156
</TR>
157
<TR BGCOLOR="white" CLASS="TableRowColor">
158
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
159
<CODE>static&nbsp;<A HREF="../../../../com/badlogic/gdx/math/Rectangle.html" title="class in com.badlogic.gdx.math">Rectangle</A></CODE></FONT></TD>
160
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Rectangle.html#tmp2">tmp2</A></B></CODE>
161
 
162
<BR>
163
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Static temporary rectangle.</TD>
164
</TR>
165
<TR BGCOLOR="white" CLASS="TableRowColor">
166
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
167
<CODE>&nbsp;float</CODE></FONT></TD>
168
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Rectangle.html#width">width</A></B></CODE>
169
 
170
<BR>
171
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
172
</TR>
173
<TR BGCOLOR="white" CLASS="TableRowColor">
174
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
175
<CODE>&nbsp;float</CODE></FONT></TD>
176
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Rectangle.html#x">x</A></B></CODE>
177
 
178
<BR>
179
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
180
</TR>
181
<TR BGCOLOR="white" CLASS="TableRowColor">
182
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
183
<CODE>&nbsp;float</CODE></FONT></TD>
184
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Rectangle.html#y">y</A></B></CODE>
185
 
186
<BR>
187
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
188
</TR>
189
</TABLE>
190
&nbsp;
191
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
192
 
193
<A NAME="constructor_summary"><!-- --></A>
194
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
195
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
196
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
197
<B>Constructor Summary</B></FONT></TH>
198
</TR>
199
<TR BGCOLOR="white" CLASS="TableRowColor">
200
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Rectangle.html#Rectangle()">Rectangle</A></B>()</CODE>
201
 
202
<BR>
203
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructs a new rectangle with all values set to zero</TD>
204
</TR>
205
<TR BGCOLOR="white" CLASS="TableRowColor">
206
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Rectangle.html#Rectangle(float, float, float, float)">Rectangle</A></B>(float&nbsp;x,
207
          float&nbsp;y,
208
          float&nbsp;width,
209
          float&nbsp;height)</CODE>
210
 
211
<BR>
212
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructs a new rectangle with the given corner point in the bottom left and dimensions.</TD>
213
</TR>
214
<TR BGCOLOR="white" CLASS="TableRowColor">
215
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Rectangle.html#Rectangle(com.badlogic.gdx.math.Rectangle)">Rectangle</A></B>(<A HREF="../../../../com/badlogic/gdx/math/Rectangle.html" title="class in com.badlogic.gdx.math">Rectangle</A>&nbsp;rect)</CODE>
216
 
217
<BR>
218
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructs a rectangle based on the given rectangle</TD>
219
</TR>
220
</TABLE>
221
&nbsp;
222
<!-- ========== METHOD SUMMARY =========== -->
223
 
224
<A NAME="method_summary"><!-- --></A>
225
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
226
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
227
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
228
<B>Method Summary</B></FONT></TH>
229
</TR>
230
<TR BGCOLOR="white" CLASS="TableRowColor">
231
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
232
<CODE>&nbsp;boolean</CODE></FONT></TD>
233
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Rectangle.html#contains(float, float)">contains</A></B>(float&nbsp;x,
234
         float&nbsp;y)</CODE>
235
 
236
<BR>
237
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
238
</TR>
239
<TR BGCOLOR="white" CLASS="TableRowColor">
240
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
241
<CODE>&nbsp;boolean</CODE></FONT></TD>
242
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Rectangle.html#contains(com.badlogic.gdx.math.Rectangle)">contains</A></B>(<A HREF="../../../../com/badlogic/gdx/math/Rectangle.html" title="class in com.badlogic.gdx.math">Rectangle</A>&nbsp;rectangle)</CODE>
243
 
244
<BR>
245
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
246
</TR>
247
<TR BGCOLOR="white" CLASS="TableRowColor">
248
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
249
<CODE>&nbsp;float</CODE></FONT></TD>
250
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Rectangle.html#getHeight()">getHeight</A></B>()</CODE>
251
 
252
<BR>
253
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
254
</TR>
255
<TR BGCOLOR="white" CLASS="TableRowColor">
256
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
257
<CODE>&nbsp;float</CODE></FONT></TD>
258
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Rectangle.html#getWidth()">getWidth</A></B>()</CODE>
259
 
260
<BR>
261
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
262
</TR>
263
<TR BGCOLOR="white" CLASS="TableRowColor">
264
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
265
<CODE>&nbsp;float</CODE></FONT></TD>
266
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Rectangle.html#getX()">getX</A></B>()</CODE>
267
 
268
<BR>
269
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
270
</TR>
271
<TR BGCOLOR="white" CLASS="TableRowColor">
272
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
273
<CODE>&nbsp;float</CODE></FONT></TD>
274
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Rectangle.html#getY()">getY</A></B>()</CODE>
275
 
276
<BR>
277
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
278
</TR>
279
<TR BGCOLOR="white" CLASS="TableRowColor">
280
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
281
<CODE>&nbsp;void</CODE></FONT></TD>
282
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Rectangle.html#merge(com.badlogic.gdx.math.Rectangle)">merge</A></B>(<A HREF="../../../../com/badlogic/gdx/math/Rectangle.html" title="class in com.badlogic.gdx.math">Rectangle</A>&nbsp;rect)</CODE>
283
 
284
<BR>
285
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Merges this rectangle with the other rectangle.</TD>
286
</TR>
287
<TR BGCOLOR="white" CLASS="TableRowColor">
288
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
289
<CODE>&nbsp;boolean</CODE></FONT></TD>
290
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Rectangle.html#overlaps(com.badlogic.gdx.math.Rectangle)">overlaps</A></B>(<A HREF="../../../../com/badlogic/gdx/math/Rectangle.html" title="class in com.badlogic.gdx.math">Rectangle</A>&nbsp;rectangle)</CODE>
291
 
292
<BR>
293
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
294
</TR>
295
<TR BGCOLOR="white" CLASS="TableRowColor">
296
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
297
<CODE>&nbsp;void</CODE></FONT></TD>
298
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Rectangle.html#set(float, float, float, float)">set</A></B>(float&nbsp;x,
299
    float&nbsp;y,
300
    float&nbsp;width,
301
    float&nbsp;height)</CODE>
302
 
303
<BR>
304
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
305
</TR>
306
<TR BGCOLOR="white" CLASS="TableRowColor">
307
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
308
<CODE>&nbsp;void</CODE></FONT></TD>
309
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Rectangle.html#set(com.badlogic.gdx.math.Rectangle)">set</A></B>(<A HREF="../../../../com/badlogic/gdx/math/Rectangle.html" title="class in com.badlogic.gdx.math">Rectangle</A>&nbsp;rect)</CODE>
310
 
311
<BR>
312
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the values of the given rectangle to this rectangle.</TD>
313
</TR>
314
<TR BGCOLOR="white" CLASS="TableRowColor">
315
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
316
<CODE>&nbsp;void</CODE></FONT></TD>
317
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Rectangle.html#setHeight(float)">setHeight</A></B>(float&nbsp;height)</CODE>
318
 
319
<BR>
320
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the height of this rectangle</TD>
321
</TR>
322
<TR BGCOLOR="white" CLASS="TableRowColor">
323
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
324
<CODE>&nbsp;void</CODE></FONT></TD>
325
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Rectangle.html#setWidth(float)">setWidth</A></B>(float&nbsp;width)</CODE>
326
 
327
<BR>
328
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the width of this rectangle</TD>
329
</TR>
330
<TR BGCOLOR="white" CLASS="TableRowColor">
331
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
332
<CODE>&nbsp;void</CODE></FONT></TD>
333
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Rectangle.html#setX(float)">setX</A></B>(float&nbsp;x)</CODE>
334
 
335
<BR>
336
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the x-coordinate of the bottom left corner</TD>
337
</TR>
338
<TR BGCOLOR="white" CLASS="TableRowColor">
339
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
340
<CODE>&nbsp;void</CODE></FONT></TD>
341
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Rectangle.html#setY(float)">setY</A></B>(float&nbsp;y)</CODE>
342
 
343
<BR>
344
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the y-coordinate of the bottom left corner</TD>
345
</TR>
346
<TR BGCOLOR="white" CLASS="TableRowColor">
347
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
348
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
349
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Rectangle.html#toString()">toString</A></B>()</CODE>
350
 
351
<BR>
352
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
353
</TR>
354
</TABLE>
355
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
356
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
357
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
358
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
359
</TR>
360
<TR BGCOLOR="white" CLASS="TableRowColor">
361
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait</CODE></TD>
362
</TR>
363
</TABLE>
364
&nbsp;
365
<P>
366
 
367
<!-- ============ FIELD DETAIL =========== -->
368
 
369
<A NAME="field_detail"><!-- --></A>
370
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
371
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
372
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
373
<B>Field Detail</B></FONT></TH>
374
</TR>
375
</TABLE>
376
 
377
<A NAME="tmp"><!-- --></A><H3>
378
tmp</H3>
379
<PRE>
380
public static final <A HREF="../../../../com/badlogic/gdx/math/Rectangle.html" title="class in com.badlogic.gdx.math">Rectangle</A> <B>tmp</B></PRE>
381
<DL>
382
<DD>Static temporary rectangle. Use with care! Use only when sure other code will not also use this.
383
<P>
384
<DL>
385
</DL>
386
</DL>
387
<HR>
388
 
389
<A NAME="tmp2"><!-- --></A><H3>
390
tmp2</H3>
391
<PRE>
392
public static final <A HREF="../../../../com/badlogic/gdx/math/Rectangle.html" title="class in com.badlogic.gdx.math">Rectangle</A> <B>tmp2</B></PRE>
393
<DL>
394
<DD>Static temporary rectangle. Use with care! Use only when sure other code will not also use this.
395
<P>
396
<DL>
397
</DL>
398
</DL>
399
<HR>
400
 
401
<A NAME="x"><!-- --></A><H3>
402
x</H3>
403
<PRE>
404
public float <B>x</B></PRE>
405
<DL>
406
<DL>
407
</DL>
408
</DL>
409
<HR>
410
 
411
<A NAME="y"><!-- --></A><H3>
412
y</H3>
413
<PRE>
414
public float <B>y</B></PRE>
415
<DL>
416
<DL>
417
</DL>
418
</DL>
419
<HR>
420
 
421
<A NAME="width"><!-- --></A><H3>
422
width</H3>
423
<PRE>
424
public float <B>width</B></PRE>
425
<DL>
426
<DL>
427
</DL>
428
</DL>
429
<HR>
430
 
431
<A NAME="height"><!-- --></A><H3>
432
height</H3>
433
<PRE>
434
public float <B>height</B></PRE>
435
<DL>
436
<DL>
437
</DL>
438
</DL>
439
 
440
<!-- ========= CONSTRUCTOR DETAIL ======== -->
441
 
442
<A NAME="constructor_detail"><!-- --></A>
443
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
444
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
445
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
446
<B>Constructor Detail</B></FONT></TH>
447
</TR>
448
</TABLE>
449
 
450
<A NAME="Rectangle()"><!-- --></A><H3>
451
Rectangle</H3>
452
<PRE>
453
public <B>Rectangle</B>()</PRE>
454
<DL>
455
<DD>Constructs a new rectangle with all values set to zero
456
<P>
457
</DL>
458
<HR>
459
 
460
<A NAME="Rectangle(float, float, float, float)"><!-- --></A><H3>
461
Rectangle</H3>
462
<PRE>
463
public <B>Rectangle</B>(float&nbsp;x,
464
                 float&nbsp;y,
465
                 float&nbsp;width,
466
                 float&nbsp;height)</PRE>
467
<DL>
468
<DD>Constructs a new rectangle with the given corner point in the bottom left and dimensions.
469
<P>
470
<DL>
471
<DT><B>Parameters:</B><DD><CODE>x</CODE> - The corner point x-coordinate<DD><CODE>y</CODE> - The corner point y-coordinate<DD><CODE>width</CODE> - The width<DD><CODE>height</CODE> - The height</DL>
472
</DL>
473
<HR>
474
 
475
<A NAME="Rectangle(com.badlogic.gdx.math.Rectangle)"><!-- --></A><H3>
476
Rectangle</H3>
477
<PRE>
478
public <B>Rectangle</B>(<A HREF="../../../../com/badlogic/gdx/math/Rectangle.html" title="class in com.badlogic.gdx.math">Rectangle</A>&nbsp;rect)</PRE>
479
<DL>
480
<DD>Constructs a rectangle based on the given rectangle
481
<P>
482
<DL>
483
<DT><B>Parameters:</B><DD><CODE>rect</CODE> - The rectangle</DL>
484
</DL>
485
 
486
<!-- ============ METHOD DETAIL ========== -->
487
 
488
<A NAME="method_detail"><!-- --></A>
489
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
490
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
491
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
492
<B>Method Detail</B></FONT></TH>
493
</TR>
494
</TABLE>
495
 
496
<A NAME="getX()"><!-- --></A><H3>
497
getX</H3>
498
<PRE>
499
public float <B>getX</B>()</PRE>
500
<DL>
501
<DD><DL>
502
</DL>
503
</DD>
504
<DD><DL>
505
 
506
<DT><B>Returns:</B><DD>the x-coordinate of the bottom left corner</DL>
507
</DD>
508
</DL>
509
<HR>
510
 
511
<A NAME="setX(float)"><!-- --></A><H3>
512
setX</H3>
513
<PRE>
514
public void <B>setX</B>(float&nbsp;x)</PRE>
515
<DL>
516
<DD>Sets the x-coordinate of the bottom left corner
517
<P>
518
<DD><DL>
519
</DL>
520
</DD>
521
<DD><DL>
522
<DT><B>Parameters:</B><DD><CODE>x</CODE> - The x-coordinate</DL>
523
</DD>
524
</DL>
525
<HR>
526
 
527
<A NAME="getY()"><!-- --></A><H3>
528
getY</H3>
529
<PRE>
530
public float <B>getY</B>()</PRE>
531
<DL>
532
<DD><DL>
533
</DL>
534
</DD>
535
<DD><DL>
536
 
537
<DT><B>Returns:</B><DD>the y-coordinate of the bottom left corner</DL>
538
</DD>
539
</DL>
540
<HR>
541
 
542
<A NAME="setY(float)"><!-- --></A><H3>
543
setY</H3>
544
<PRE>
545
public void <B>setY</B>(float&nbsp;y)</PRE>
546
<DL>
547
<DD>Sets the y-coordinate of the bottom left corner
548
<P>
549
<DD><DL>
550
</DL>
551
</DD>
552
<DD><DL>
553
<DT><B>Parameters:</B><DD><CODE>y</CODE> - The y-coordinate</DL>
554
</DD>
555
</DL>
556
<HR>
557
 
558
<A NAME="getWidth()"><!-- --></A><H3>
559
getWidth</H3>
560
<PRE>
561
public float <B>getWidth</B>()</PRE>
562
<DL>
563
<DD><DL>
564
</DL>
565
</DD>
566
<DD><DL>
567
 
568
<DT><B>Returns:</B><DD>the width</DL>
569
</DD>
570
</DL>
571
<HR>
572
 
573
<A NAME="setWidth(float)"><!-- --></A><H3>
574
setWidth</H3>
575
<PRE>
576
public void <B>setWidth</B>(float&nbsp;width)</PRE>
577
<DL>
578
<DD>Sets the width of this rectangle
579
<P>
580
<DD><DL>
581
</DL>
582
</DD>
583
<DD><DL>
584
<DT><B>Parameters:</B><DD><CODE>width</CODE> - The width</DL>
585
</DD>
586
</DL>
587
<HR>
588
 
589
<A NAME="getHeight()"><!-- --></A><H3>
590
getHeight</H3>
591
<PRE>
592
public float <B>getHeight</B>()</PRE>
593
<DL>
594
<DD><DL>
595
</DL>
596
</DD>
597
<DD><DL>
598
 
599
<DT><B>Returns:</B><DD>the height</DL>
600
</DD>
601
</DL>
602
<HR>
603
 
604
<A NAME="setHeight(float)"><!-- --></A><H3>
605
setHeight</H3>
606
<PRE>
607
public void <B>setHeight</B>(float&nbsp;height)</PRE>
608
<DL>
609
<DD>Sets the height of this rectangle
610
<P>
611
<DD><DL>
612
</DL>
613
</DD>
614
<DD><DL>
615
<DT><B>Parameters:</B><DD><CODE>height</CODE> - The height</DL>
616
</DD>
617
</DL>
618
<HR>
619
 
620
<A NAME="contains(com.badlogic.gdx.math.Rectangle)"><!-- --></A><H3>
621
contains</H3>
622
<PRE>
623
public boolean <B>contains</B>(<A HREF="../../../../com/badlogic/gdx/math/Rectangle.html" title="class in com.badlogic.gdx.math">Rectangle</A>&nbsp;rectangle)</PRE>
624
<DL>
625
<DD><DL>
626
</DL>
627
</DD>
628
<DD><DL>
629
<DT><B>Parameters:</B><DD><CODE>rectangle</CODE> - the other <A HREF="../../../../com/badlogic/gdx/math/Rectangle.html" title="class in com.badlogic.gdx.math"><CODE>Rectangle</CODE></A>.
630
<DT><B>Returns:</B><DD>whether the other rectangle is contained in this rectangle.</DL>
631
</DD>
632
</DL>
633
<HR>
634
 
635
<A NAME="overlaps(com.badlogic.gdx.math.Rectangle)"><!-- --></A><H3>
636
overlaps</H3>
637
<PRE>
638
public boolean <B>overlaps</B>(<A HREF="../../../../com/badlogic/gdx/math/Rectangle.html" title="class in com.badlogic.gdx.math">Rectangle</A>&nbsp;rectangle)</PRE>
639
<DL>
640
<DD><DL>
641
</DL>
642
</DD>
643
<DD><DL>
644
<DT><B>Parameters:</B><DD><CODE>rectangle</CODE> - the other <A HREF="../../../../com/badlogic/gdx/math/Rectangle.html" title="class in com.badlogic.gdx.math"><CODE>Rectangle</CODE></A>
645
<DT><B>Returns:</B><DD>whether this rectangle overlaps the other rectangle.</DL>
646
</DD>
647
</DL>
648
<HR>
649
 
650
<A NAME="set(float, float, float, float)"><!-- --></A><H3>
651
set</H3>
652
<PRE>
653
public void <B>set</B>(float&nbsp;x,
654
                float&nbsp;y,
655
                float&nbsp;width,
656
                float&nbsp;height)</PRE>
657
<DL>
658
<DD><DL>
659
</DL>
660
</DD>
661
<DD><DL>
662
</DL>
663
</DD>
664
</DL>
665
<HR>
666
 
667
<A NAME="contains(float, float)"><!-- --></A><H3>
668
contains</H3>
669
<PRE>
670
public boolean <B>contains</B>(float&nbsp;x,
671
                        float&nbsp;y)</PRE>
672
<DL>
673
<DD><DL>
674
</DL>
675
</DD>
676
<DD><DL>
677
<DT><B>Parameters:</B><DD><CODE>x</CODE> - point x coordinate<DD><CODE>y</CODE> - point y coordinate
678
<DT><B>Returns:</B><DD>whether the point is contained in the rectangle</DL>
679
</DD>
680
</DL>
681
<HR>
682
 
683
<A NAME="set(com.badlogic.gdx.math.Rectangle)"><!-- --></A><H3>
684
set</H3>
685
<PRE>
686
public void <B>set</B>(<A HREF="../../../../com/badlogic/gdx/math/Rectangle.html" title="class in com.badlogic.gdx.math">Rectangle</A>&nbsp;rect)</PRE>
687
<DL>
688
<DD>Sets the values of the given rectangle to this rectangle.
689
<P>
690
<DD><DL>
691
</DL>
692
</DD>
693
<DD><DL>
694
<DT><B>Parameters:</B><DD><CODE>rect</CODE> - the other rectangle</DL>
695
</DD>
696
</DL>
697
<HR>
698
 
699
<A NAME="merge(com.badlogic.gdx.math.Rectangle)"><!-- --></A><H3>
700
merge</H3>
701
<PRE>
702
public void <B>merge</B>(<A HREF="../../../../com/badlogic/gdx/math/Rectangle.html" title="class in com.badlogic.gdx.math">Rectangle</A>&nbsp;rect)</PRE>
703
<DL>
704
<DD>Merges this rectangle with the other rectangle.
705
<P>
706
<DD><DL>
707
</DL>
708
</DD>
709
<DD><DL>
710
<DT><B>Parameters:</B><DD><CODE>rect</CODE> - the other rectangle</DL>
711
</DD>
712
</DL>
713
<HR>
714
 
715
<A NAME="toString()"><!-- --></A><H3>
716
toString</H3>
717
<PRE>
718
public java.lang.String <B>toString</B>()</PRE>
719
<DL>
720
<DD><DL>
721
<DT><B>Overrides:</B><DD><CODE>toString</CODE> in class <CODE>java.lang.Object</CODE></DL>
722
</DD>
723
<DD><DL>
724
</DL>
725
</DD>
726
</DL>
727
<!-- ========= END OF CLASS DATA ========= -->
728
<HR>
729
 
730
 
731
<!-- ======= START OF BOTTOM NAVBAR ====== -->
732
<A NAME="navbar_bottom"><!-- --></A>
733
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
734
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
735
<TR>
736
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
737
<A NAME="navbar_bottom_firstrow"><!-- --></A>
738
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
739
  <TR ALIGN="center" VALIGN="top">
740
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
741
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
742
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
743
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/Rectangle.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
744
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
745
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
746
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
747
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
748
  </TR>
749
</TABLE>
750
</TD>
751
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
752
libgdx API</EM>
753
</TD>
754
</TR>
755
 
756
<TR>
757
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
758
&nbsp;<A HREF="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math"><B>PREV CLASS</B></A>&nbsp;
759
&nbsp;<A HREF="../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math"><B>NEXT CLASS</B></A></FONT></TD>
760
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
761
  <A HREF="../../../../index.html?com/badlogic/gdx/math/Rectangle.html" target="_top"><B>FRAMES</B></A>  &nbsp;
762
&nbsp;<A HREF="Rectangle.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
763
&nbsp;<SCRIPT type="text/javascript">
764
  <!--
765
  if(window==top) {
766
    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
767
  }
768
  //-->
769
</SCRIPT>
770
<NOSCRIPT>
771
  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
772
</NOSCRIPT>
773
 
774
 
775
</FONT></TD>
776
</TR>
777
<TR>
778
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
779
  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>
780
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
781
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>
782
</TR>
783
</TABLE>
784
<A NAME="skip-navbar_bottom"></A>
785
<!-- ======== END OF BOTTOM NAVBAR ======= -->
786
 
787
<HR>
788
 
789
                                <div style="font-size:9pt"><i>
790
                                Copyright 2010 Mario Zechner (contact@badlogicgames.com), Nathan Sweet (admin@esotericsoftware.com)
791
                                </i></div>
792
 
793
</BODY>
794
</HTML>