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:10 CET 2013 -->
6
<TITLE>
7
GearJoint (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="GearJoint (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/GearJoint.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/joints/FrictionJointDef.html" title="class in com.badlogic.gdx.physics.box2d.joints"><B>PREV CLASS</B></A>&nbsp;
74
&nbsp;<A HREF="../../../../../../com/badlogic/gdx/physics/box2d/joints/GearJointDef.html" title="class in com.badlogic.gdx.physics.box2d.joints"><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/joints/GearJoint.html" target="_top"><B>FRAMES</B></A>  &nbsp;
77
&nbsp;<A HREF="GearJoint.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="#fields_inherited_from_class_com.badlogic.gdx.physics.box2d.Joint">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;FIELD&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.joints</FONT>
107
<BR>
108
Class GearJoint</H2>
109
<PRE>
110
java.lang.Object
111
  <IMG SRC="../../../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../../../com/badlogic/gdx/physics/box2d/Joint.html" title="class in com.badlogic.gdx.physics.box2d">com.badlogic.gdx.physics.box2d.Joint</A>
112
      <IMG SRC="../../../../../../resources/inherit.gif" ALT="extended by "><B>com.badlogic.gdx.physics.box2d.joints.GearJoint</B>
113
</PRE>
114
<HR>
115
<DL>
116
<DT><PRE>public class <B>GearJoint</B><DT>extends <A HREF="../../../../../../com/badlogic/gdx/physics/box2d/Joint.html" title="class in com.badlogic.gdx.physics.box2d">Joint</A></DL>
117
</PRE>
118
 
119
<P>
120
A gear joint is used to connect two joints together. Either joint can be a revolute or prismatic joint. You specify a gear
121
 ratio to bind the motions together: coordinate1 + ratio * coordinate2 = constant The ratio can be negative or positive. If one
122
 joint is a revolute joint and the other joint is a prismatic joint, then the ratio will have units of length or units of
123
 1/length.
124
<P>
125
 
126
<P>
127
<HR>
128
 
129
<P>
130
<!-- =========== FIELD SUMMARY =========== -->
131
 
132
<A NAME="field_summary"><!-- --></A>
133
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
134
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
135
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
136
<B>Field Summary</B></FONT></TH>
137
</TR>
138
</TABLE>
139
&nbsp;<A NAME="fields_inherited_from_class_com.badlogic.gdx.physics.box2d.Joint"><!-- --></A>
140
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
141
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
142
<TH ALIGN="left"><B>Fields inherited from class com.badlogic.gdx.physics.box2d.<A HREF="../../../../../../com/badlogic/gdx/physics/box2d/Joint.html" title="class in com.badlogic.gdx.physics.box2d">Joint</A></B></TH>
143
</TR>
144
<TR BGCOLOR="white" CLASS="TableRowColor">
145
<TD><CODE><A HREF="../../../../../../com/badlogic/gdx/physics/box2d/Joint.html#addr">addr</A>, <A HREF="../../../../../../com/badlogic/gdx/physics/box2d/Joint.html#jointEdgeA">jointEdgeA</A>, <A HREF="../../../../../../com/badlogic/gdx/physics/box2d/Joint.html#jointEdgeB">jointEdgeB</A></CODE></TD>
146
</TR>
147
</TABLE>
148
&nbsp;
149
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
150
 
151
<A NAME="constructor_summary"><!-- --></A>
152
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
153
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
154
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
155
<B>Constructor Summary</B></FONT></TH>
156
</TR>
157
<TR BGCOLOR="white" CLASS="TableRowColor">
158
<TD><CODE><B><A HREF="../../../../../../com/badlogic/gdx/physics/box2d/joints/GearJoint.html#GearJoint(com.badlogic.gdx.physics.box2d.World, long)">GearJoint</A></B>(<A HREF="../../../../../../com/badlogic/gdx/physics/box2d/World.html" title="class in com.badlogic.gdx.physics.box2d">World</A>&nbsp;world,
159
          long&nbsp;addr)</CODE>
160
 
161
<BR>
162
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
163
</TR>
164
</TABLE>
165
&nbsp;
166
<!-- ========== METHOD SUMMARY =========== -->
167
 
168
<A NAME="method_summary"><!-- --></A>
169
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
170
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
171
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
172
<B>Method Summary</B></FONT></TH>
173
</TR>
174
<TR BGCOLOR="white" CLASS="TableRowColor">
175
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
176
<CODE>&nbsp;float</CODE></FONT></TD>
177
<TD><CODE><B><A HREF="../../../../../../com/badlogic/gdx/physics/box2d/joints/GearJoint.html#getRatio()">getRatio</A></B>()</CODE>
178
 
179
<BR>
180
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set/Get the gear ratio.</TD>
181
</TR>
182
<TR BGCOLOR="white" CLASS="TableRowColor">
183
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
184
<CODE>&nbsp;void</CODE></FONT></TD>
185
<TD><CODE><B><A HREF="../../../../../../com/badlogic/gdx/physics/box2d/joints/GearJoint.html#setRatio(float)">setRatio</A></B>(float&nbsp;ratio)</CODE>
186
 
187
<BR>
188
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set/Get the gear ratio.</TD>
189
</TR>
190
</TABLE>
191
&nbsp;<A NAME="methods_inherited_from_class_com.badlogic.gdx.physics.box2d.Joint"><!-- --></A>
192
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
193
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
194
<TH ALIGN="left"><B>Methods inherited from class com.badlogic.gdx.physics.box2d.<A HREF="../../../../../../com/badlogic/gdx/physics/box2d/Joint.html" title="class in com.badlogic.gdx.physics.box2d">Joint</A></B></TH>
195
</TR>
196
<TR BGCOLOR="white" CLASS="TableRowColor">
197
<TD><CODE><A HREF="../../../../../../com/badlogic/gdx/physics/box2d/Joint.html#getAnchorA()">getAnchorA</A>, <A HREF="../../../../../../com/badlogic/gdx/physics/box2d/Joint.html#getAnchorB()">getAnchorB</A>, <A HREF="../../../../../../com/badlogic/gdx/physics/box2d/Joint.html#getBodyA()">getBodyA</A>, <A HREF="../../../../../../com/badlogic/gdx/physics/box2d/Joint.html#getBodyB()">getBodyB</A>, <A HREF="../../../../../../com/badlogic/gdx/physics/box2d/Joint.html#getReactionForce(float)">getReactionForce</A>, <A HREF="../../../../../../com/badlogic/gdx/physics/box2d/Joint.html#getReactionTorque(float)">getReactionTorque</A>, <A HREF="../../../../../../com/badlogic/gdx/physics/box2d/Joint.html#getType()">getType</A>, <A HREF="../../../../../../com/badlogic/gdx/physics/box2d/Joint.html#isActive()">isActive</A></CODE></TD>
198
</TR>
199
</TABLE>
200
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
201
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
202
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
203
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
204
</TR>
205
<TR BGCOLOR="white" CLASS="TableRowColor">
206
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
207
</TR>
208
</TABLE>
209
&nbsp;
210
<P>
211
 
212
<!-- ========= CONSTRUCTOR DETAIL ======== -->
213
 
214
<A NAME="constructor_detail"><!-- --></A>
215
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
216
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
217
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
218
<B>Constructor Detail</B></FONT></TH>
219
</TR>
220
</TABLE>
221
 
222
<A NAME="GearJoint(com.badlogic.gdx.physics.box2d.World, long)"><!-- --></A><H3>
223
GearJoint</H3>
224
<PRE>
225
public <B>GearJoint</B>(<A HREF="../../../../../../com/badlogic/gdx/physics/box2d/World.html" title="class in com.badlogic.gdx.physics.box2d">World</A>&nbsp;world,
226
                 long&nbsp;addr)</PRE>
227
<DL>
228
</DL>
229
 
230
<!-- ============ METHOD DETAIL ========== -->
231
 
232
<A NAME="method_detail"><!-- --></A>
233
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
234
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
235
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
236
<B>Method Detail</B></FONT></TH>
237
</TR>
238
</TABLE>
239
 
240
<A NAME="setRatio(float)"><!-- --></A><H3>
241
setRatio</H3>
242
<PRE>
243
public void <B>setRatio</B>(float&nbsp;ratio)</PRE>
244
<DL>
245
<DD>Set/Get the gear ratio.
246
<P>
247
<DD><DL>
248
</DL>
249
</DD>
250
</DL>
251
<HR>
252
 
253
<A NAME="getRatio()"><!-- --></A><H3>
254
getRatio</H3>
255
<PRE>
256
public float <B>getRatio</B>()</PRE>
257
<DL>
258
<DD>Set/Get the gear ratio.
259
<P>
260
<DD><DL>
261
</DL>
262
</DD>
263
</DL>
264
<!-- ========= END OF CLASS DATA ========= -->
265
<HR>
266
 
267
 
268
<!-- ======= START OF BOTTOM NAVBAR ====== -->
269
<A NAME="navbar_bottom"><!-- --></A>
270
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
271
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
272
<TR>
273
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
274
<A NAME="navbar_bottom_firstrow"><!-- --></A>
275
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
276
  <TR ALIGN="center" VALIGN="top">
277
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
278
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
279
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
280
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/GearJoint.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
281
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
282
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
283
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
284
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
285
  </TR>
286
</TABLE>
287
</TD>
288
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
289
libgdx API</EM>
290
</TD>
291
</TR>
292
 
293
<TR>
294
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
295
&nbsp;<A HREF="../../../../../../com/badlogic/gdx/physics/box2d/joints/FrictionJointDef.html" title="class in com.badlogic.gdx.physics.box2d.joints"><B>PREV CLASS</B></A>&nbsp;
296
&nbsp;<A HREF="../../../../../../com/badlogic/gdx/physics/box2d/joints/GearJointDef.html" title="class in com.badlogic.gdx.physics.box2d.joints"><B>NEXT CLASS</B></A></FONT></TD>
297
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
298
  <A HREF="../../../../../../index.html?com/badlogic/gdx/physics/box2d/joints/GearJoint.html" target="_top"><B>FRAMES</B></A>  &nbsp;
299
&nbsp;<A HREF="GearJoint.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
300
&nbsp;<SCRIPT type="text/javascript">
301
  <!--
302
  if(window==top) {
303
    document.writeln('<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
304
  }
305
  //-->
306
</SCRIPT>
307
<NOSCRIPT>
308
  <A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>
309
</NOSCRIPT>
310
 
311
 
312
</FONT></TD>
313
</TR>
314
<TR>
315
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
316
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#fields_inherited_from_class_com.badlogic.gdx.physics.box2d.Joint">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
317
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
318
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
319
</TR>
320
</TABLE>
321
<A NAME="skip-navbar_bottom"></A>
322
<!-- ======== END OF BOTTOM NAVBAR ======= -->
323
 
324
<HR>
325
 
326
                                <div style="font-size:9pt"><i>
327
                                Copyright 2010 Mario Zechner (contact@badlogicgames.com), Nathan Sweet (admin@esotericsoftware.com)
328
                                </i></div>
329
 
330
</BODY>
331
</HTML>