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
Quaternion (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="Quaternion (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/Quaternion.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/Polygon.html" title="class in com.badlogic.gdx.math"><B>PREV CLASS</B></A>&nbsp;
74
&nbsp;<A HREF="../../../../com/badlogic/gdx/math/Rectangle.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/Quaternion.html" target="_top"><B>FRAMES</B></A>  &nbsp;
77
&nbsp;<A HREF="Quaternion.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 Quaternion</H2>
109
<PRE>
110
java.lang.Object
111
  <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>com.badlogic.gdx.math.Quaternion</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>Quaternion</B><DT>extends java.lang.Object<DT>implements java.io.Serializable</DL>
119
</PRE>
120
 
121
<P>
122
A simple quaternion class. See http://en.wikipedia.org/wiki/Quaternion for more information.
123
<P>
124
 
125
<P>
126
<DL>
127
<DT><B>Author:</B></DT>
128
  <DD>badlogicgames@gmail.com, vesuvio</DD>
129
<DT><B>See Also:</B><DD><A HREF="../../../../serialized-form.html#com.badlogic.gdx.math.Quaternion">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/Quaternion.html#w">w</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>&nbsp;float</CODE></FONT></TD>
152
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Quaternion.html#x">x</A></B></CODE>
153
 
154
<BR>
155
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
156
</TR>
157
<TR BGCOLOR="white" CLASS="TableRowColor">
158
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
159
<CODE>&nbsp;float</CODE></FONT></TD>
160
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Quaternion.html#y">y</A></B></CODE>
161
 
162
<BR>
163
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</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/Quaternion.html#z">z</A></B></CODE>
169
 
170
<BR>
171
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
172
</TR>
173
</TABLE>
174
&nbsp;
175
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
176
 
177
<A NAME="constructor_summary"><!-- --></A>
178
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
179
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
180
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
181
<B>Constructor Summary</B></FONT></TH>
182
</TR>
183
<TR BGCOLOR="white" CLASS="TableRowColor">
184
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Quaternion.html#Quaternion()">Quaternion</A></B>()</CODE>
185
 
186
<BR>
187
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
188
</TR>
189
<TR BGCOLOR="white" CLASS="TableRowColor">
190
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Quaternion.html#Quaternion(float, float, float, float)">Quaternion</A></B>(float&nbsp;x,
191
           float&nbsp;y,
192
           float&nbsp;z,
193
           float&nbsp;w)</CODE>
194
 
195
<BR>
196
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructor, sets the four components of the quaternion.</TD>
197
</TR>
198
<TR BGCOLOR="white" CLASS="TableRowColor">
199
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Quaternion.html#Quaternion(com.badlogic.gdx.math.Quaternion)">Quaternion</A></B>(<A HREF="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</A>&nbsp;quaternion)</CODE>
200
 
201
<BR>
202
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructor, sets the quaternion components from the given quaternion.</TD>
203
</TR>
204
<TR BGCOLOR="white" CLASS="TableRowColor">
205
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Quaternion.html#Quaternion(com.badlogic.gdx.math.Vector3, float)">Quaternion</A></B>(<A HREF="../../../../com/badlogic/gdx/math/Vector3.html" title="class in com.badlogic.gdx.math">Vector3</A>&nbsp;axis,
206
           float&nbsp;angle)</CODE>
207
 
208
<BR>
209
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructor, sets the quaternion from the given axis vector and the angle around that axis in degrees.</TD>
210
</TR>
211
</TABLE>
212
&nbsp;
213
<!-- ========== METHOD SUMMARY =========== -->
214
 
215
<A NAME="method_summary"><!-- --></A>
216
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
217
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
218
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
219
<B>Method Summary</B></FONT></TH>
220
</TR>
221
<TR BGCOLOR="white" CLASS="TableRowColor">
222
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
223
<CODE>&nbsp;<A HREF="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</A></CODE></FONT></TD>
224
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Quaternion.html#conjugate()">conjugate</A></B>()</CODE>
225
 
226
<BR>
227
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Conjugate the quaternion.</TD>
228
</TR>
229
<TR BGCOLOR="white" CLASS="TableRowColor">
230
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
231
<CODE>&nbsp;<A HREF="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</A></CODE></FONT></TD>
232
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Quaternion.html#cpy()">cpy</A></B>()</CODE>
233
 
234
<BR>
235
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
236
</TR>
237
<TR BGCOLOR="white" CLASS="TableRowColor">
238
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
239
<CODE>&nbsp;float</CODE></FONT></TD>
240
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Quaternion.html#dot(com.badlogic.gdx.math.Quaternion)">dot</A></B>(<A HREF="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</A>&nbsp;other)</CODE>
241
 
242
<BR>
243
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dot product between this and the other quaternion.</TD>
244
</TR>
245
<TR BGCOLOR="white" CLASS="TableRowColor">
246
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
247
<CODE>&nbsp;boolean</CODE></FONT></TD>
248
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Quaternion.html#equals(java.lang.Object)">equals</A></B>(java.lang.Object&nbsp;o)</CODE>
249
 
250
<BR>
251
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
252
</TR>
253
<TR BGCOLOR="white" CLASS="TableRowColor">
254
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
255
<CODE>&nbsp;<A HREF="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</A></CODE></FONT></TD>
256
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Quaternion.html#idt()">idt</A></B>()</CODE>
257
 
258
<BR>
259
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the quaternion to an identity Quaternion</TD>
260
</TR>
261
<TR BGCOLOR="white" CLASS="TableRowColor">
262
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
263
<CODE>&nbsp;float</CODE></FONT></TD>
264
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Quaternion.html#len()">len</A></B>()</CODE>
265
 
266
<BR>
267
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
268
</TR>
269
<TR BGCOLOR="white" CLASS="TableRowColor">
270
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
271
<CODE>&nbsp;float</CODE></FONT></TD>
272
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Quaternion.html#len2()">len2</A></B>()</CODE>
273
 
274
<BR>
275
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
276
</TR>
277
<TR BGCOLOR="white" CLASS="TableRowColor">
278
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
279
<CODE>&nbsp;<A HREF="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</A></CODE></FONT></TD>
280
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Quaternion.html#mul(float)">mul</A></B>(float&nbsp;scalar)</CODE>
281
 
282
<BR>
283
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Multiplies the components of this quaternion with the given scalar.</TD>
284
</TR>
285
<TR BGCOLOR="white" CLASS="TableRowColor">
286
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
287
<CODE>&nbsp;<A HREF="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</A></CODE></FONT></TD>
288
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Quaternion.html#mul(com.badlogic.gdx.math.Quaternion)">mul</A></B>(<A HREF="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</A>&nbsp;q)</CODE>
289
 
290
<BR>
291
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Multiplies this quaternion with another one</TD>
292
</TR>
293
<TR BGCOLOR="white" CLASS="TableRowColor">
294
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
295
<CODE>&nbsp;<A HREF="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</A></CODE></FONT></TD>
296
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Quaternion.html#mulLeft(com.badlogic.gdx.math.Quaternion)">mulLeft</A></B>(<A HREF="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</A>&nbsp;q)</CODE>
297
 
298
<BR>
299
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Multiplies this quaternion with another one in the form of q * this</TD>
300
</TR>
301
<TR BGCOLOR="white" CLASS="TableRowColor">
302
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
303
<CODE>&nbsp;<A HREF="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</A></CODE></FONT></TD>
304
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Quaternion.html#nor()">nor</A></B>()</CODE>
305
 
306
<BR>
307
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Normalizes this quaternion to unit length</TD>
308
</TR>
309
<TR BGCOLOR="white" CLASS="TableRowColor">
310
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
311
<CODE>&nbsp;<A HREF="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</A></CODE></FONT></TD>
312
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Quaternion.html#set(float, float, float, float)">set</A></B>(float&nbsp;x,
313
    float&nbsp;y,
314
    float&nbsp;z,
315
    float&nbsp;w)</CODE>
316
 
317
<BR>
318
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the components of the quaternion</TD>
319
</TR>
320
<TR BGCOLOR="white" CLASS="TableRowColor">
321
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
322
<CODE>&nbsp;<A HREF="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</A></CODE></FONT></TD>
323
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Quaternion.html#set(com.badlogic.gdx.math.Quaternion)">set</A></B>(<A HREF="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</A>&nbsp;quaternion)</CODE>
324
 
325
<BR>
326
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the quaternion components from the given quaternion.</TD>
327
</TR>
328
<TR BGCOLOR="white" CLASS="TableRowColor">
329
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
330
<CODE>&nbsp;<A HREF="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</A></CODE></FONT></TD>
331
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Quaternion.html#set(com.badlogic.gdx.math.Vector3, float)">set</A></B>(<A HREF="../../../../com/badlogic/gdx/math/Vector3.html" title="class in com.badlogic.gdx.math">Vector3</A>&nbsp;axis,
332
    float&nbsp;angle)</CODE>
333
 
334
<BR>
335
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the quaternion components from the given axis and angle around that axis.</TD>
336
</TR>
337
<TR BGCOLOR="white" CLASS="TableRowColor">
338
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
339
<CODE>&nbsp;<A HREF="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</A></CODE></FONT></TD>
340
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Quaternion.html#setEulerAngles(float, float, float)">setEulerAngles</A></B>(float&nbsp;yaw,
341
               float&nbsp;pitch,
342
               float&nbsp;roll)</CODE>
343
 
344
<BR>
345
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the quaternion to the given euler angles.</TD>
346
</TR>
347
<TR BGCOLOR="white" CLASS="TableRowColor">
348
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
349
<CODE>&nbsp;<A HREF="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</A></CODE></FONT></TD>
350
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Quaternion.html#setFromAxes(float, float, float, float, float, float, float, float, float)">setFromAxes</A></B>(float&nbsp;xx,
351
            float&nbsp;xy,
352
            float&nbsp;xz,
353
            float&nbsp;yx,
354
            float&nbsp;yy,
355
            float&nbsp;yz,
356
            float&nbsp;zx,
357
            float&nbsp;zy,
358
            float&nbsp;zz)</CODE>
359
 
360
<BR>
361
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
362
 Sets the Quaternion from the given x-, y- and z-axis which have to be orthonormal.</TD>
363
</TR>
364
<TR BGCOLOR="white" CLASS="TableRowColor">
365
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
366
<CODE>&nbsp;<A HREF="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</A></CODE></FONT></TD>
367
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Quaternion.html#setFromAxis(float, float, float, float)">setFromAxis</A></B>(float&nbsp;x,
368
            float&nbsp;y,
369
            float&nbsp;z,
370
            float&nbsp;angle)</CODE>
371
 
372
<BR>
373
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the quaternion components from the given axis and angle around that axis.</TD>
374
</TR>
375
<TR BGCOLOR="white" CLASS="TableRowColor">
376
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
377
<CODE>&nbsp;<A HREF="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</A></CODE></FONT></TD>
378
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Quaternion.html#setFromAxis(com.badlogic.gdx.math.Vector3, float)">setFromAxis</A></B>(<A HREF="../../../../com/badlogic/gdx/math/Vector3.html" title="class in com.badlogic.gdx.math">Vector3</A>&nbsp;axis,
379
            float&nbsp;angle)</CODE>
380
 
381
<BR>
382
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the quaternion components from the given axis and angle around that axis.</TD>
383
</TR>
384
<TR BGCOLOR="white" CLASS="TableRowColor">
385
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
386
<CODE>&nbsp;<A HREF="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</A></CODE></FONT></TD>
387
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Quaternion.html#setFromCross(float, float, float, float, float, float)">setFromCross</A></B>(float&nbsp;x1,
388
             float&nbsp;y1,
389
             float&nbsp;z1,
390
             float&nbsp;x2,
391
             float&nbsp;y2,
392
             float&nbsp;z2)</CODE>
393
 
394
<BR>
395
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set this quaternion to the rotation between two vectors.</TD>
396
</TR>
397
<TR BGCOLOR="white" CLASS="TableRowColor">
398
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
399
<CODE>&nbsp;<A HREF="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</A></CODE></FONT></TD>
400
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Quaternion.html#setFromCross(com.badlogic.gdx.math.Vector3, com.badlogic.gdx.math.Vector3)">setFromCross</A></B>(<A HREF="../../../../com/badlogic/gdx/math/Vector3.html" title="class in com.badlogic.gdx.math">Vector3</A>&nbsp;v1,
401
             <A HREF="../../../../com/badlogic/gdx/math/Vector3.html" title="class in com.badlogic.gdx.math">Vector3</A>&nbsp;v2)</CODE>
402
 
403
<BR>
404
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set this quaternion to the rotation between two vectors.</TD>
405
</TR>
406
<TR BGCOLOR="white" CLASS="TableRowColor">
407
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
408
<CODE>&nbsp;<A HREF="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</A></CODE></FONT></TD>
409
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Quaternion.html#setFromMatrix(com.badlogic.gdx.math.Matrix4)">setFromMatrix</A></B>(<A HREF="../../../../com/badlogic/gdx/math/Matrix4.html" title="class in com.badlogic.gdx.math">Matrix4</A>&nbsp;matrix)</CODE>
410
 
411
<BR>
412
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
413
</TR>
414
<TR BGCOLOR="white" CLASS="TableRowColor">
415
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
416
<CODE>&nbsp;<A HREF="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</A></CODE></FONT></TD>
417
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Quaternion.html#slerp(com.badlogic.gdx.math.Quaternion, float)">slerp</A></B>(<A HREF="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</A>&nbsp;end,
418
      float&nbsp;alpha)</CODE>
419
 
420
<BR>
421
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Spherical linear interpolation between this quaternion and the other quaternion, based on the alpha value in the range
422
 [0,1].</TD>
423
</TR>
424
<TR BGCOLOR="white" CLASS="TableRowColor">
425
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
426
<CODE>&nbsp;void</CODE></FONT></TD>
427
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Quaternion.html#toMatrix(float[])">toMatrix</A></B>(float[]&nbsp;matrix)</CODE>
428
 
429
<BR>
430
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Fills a 4x4 matrix with the rotation matrix represented by this quaternion.</TD>
431
</TR>
432
<TR BGCOLOR="white" CLASS="TableRowColor">
433
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
434
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
435
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Quaternion.html#toString()">toString</A></B>()</CODE>
436
 
437
<BR>
438
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
439
</TR>
440
<TR BGCOLOR="white" CLASS="TableRowColor">
441
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
442
<CODE>&nbsp;void</CODE></FONT></TD>
443
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Quaternion.html#transform(com.badlogic.gdx.math.Vector3)">transform</A></B>(<A HREF="../../../../com/badlogic/gdx/math/Vector3.html" title="class in com.badlogic.gdx.math">Vector3</A>&nbsp;v)</CODE>
444
 
445
<BR>
446
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Transforms the given vector using this quaternion</TD>
447
</TR>
448
</TABLE>
449
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
450
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
451
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
452
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
453
</TR>
454
<TR BGCOLOR="white" CLASS="TableRowColor">
455
<TD><CODE>clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait</CODE></TD>
456
</TR>
457
</TABLE>
458
&nbsp;
459
<P>
460
 
461
<!-- ============ FIELD DETAIL =========== -->
462
 
463
<A NAME="field_detail"><!-- --></A>
464
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
465
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
466
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
467
<B>Field Detail</B></FONT></TH>
468
</TR>
469
</TABLE>
470
 
471
<A NAME="x"><!-- --></A><H3>
472
x</H3>
473
<PRE>
474
public float <B>x</B></PRE>
475
<DL>
476
<DL>
477
</DL>
478
</DL>
479
<HR>
480
 
481
<A NAME="y"><!-- --></A><H3>
482
y</H3>
483
<PRE>
484
public float <B>y</B></PRE>
485
<DL>
486
<DL>
487
</DL>
488
</DL>
489
<HR>
490
 
491
<A NAME="z"><!-- --></A><H3>
492
z</H3>
493
<PRE>
494
public float <B>z</B></PRE>
495
<DL>
496
<DL>
497
</DL>
498
</DL>
499
<HR>
500
 
501
<A NAME="w"><!-- --></A><H3>
502
w</H3>
503
<PRE>
504
public float <B>w</B></PRE>
505
<DL>
506
<DL>
507
</DL>
508
</DL>
509
 
510
<!-- ========= CONSTRUCTOR DETAIL ======== -->
511
 
512
<A NAME="constructor_detail"><!-- --></A>
513
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
514
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
515
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
516
<B>Constructor Detail</B></FONT></TH>
517
</TR>
518
</TABLE>
519
 
520
<A NAME="Quaternion(float, float, float, float)"><!-- --></A><H3>
521
Quaternion</H3>
522
<PRE>
523
public <B>Quaternion</B>(float&nbsp;x,
524
                  float&nbsp;y,
525
                  float&nbsp;z,
526
                  float&nbsp;w)</PRE>
527
<DL>
528
<DD>Constructor, sets the four components of the quaternion.
529
<P>
530
<DL>
531
<DT><B>Parameters:</B><DD><CODE>x</CODE> - The x-component<DD><CODE>y</CODE> - The y-component<DD><CODE>z</CODE> - The z-component<DD><CODE>w</CODE> - The w-component</DL>
532
</DL>
533
<HR>
534
 
535
<A NAME="Quaternion()"><!-- --></A><H3>
536
Quaternion</H3>
537
<PRE>
538
public <B>Quaternion</B>()</PRE>
539
<DL>
540
</DL>
541
<HR>
542
 
543
<A NAME="Quaternion(com.badlogic.gdx.math.Quaternion)"><!-- --></A><H3>
544
Quaternion</H3>
545
<PRE>
546
public <B>Quaternion</B>(<A HREF="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</A>&nbsp;quaternion)</PRE>
547
<DL>
548
<DD>Constructor, sets the quaternion components from the given quaternion.
549
<P>
550
<DL>
551
<DT><B>Parameters:</B><DD><CODE>quaternion</CODE> - The quaternion to copy.</DL>
552
</DL>
553
<HR>
554
 
555
<A NAME="Quaternion(com.badlogic.gdx.math.Vector3, float)"><!-- --></A><H3>
556
Quaternion</H3>
557
<PRE>
558
public <B>Quaternion</B>(<A HREF="../../../../com/badlogic/gdx/math/Vector3.html" title="class in com.badlogic.gdx.math">Vector3</A>&nbsp;axis,
559
                  float&nbsp;angle)</PRE>
560
<DL>
561
<DD>Constructor, sets the quaternion from the given axis vector and the angle around that axis in degrees.
562
<P>
563
<DL>
564
<DT><B>Parameters:</B><DD><CODE>axis</CODE> - The axis<DD><CODE>angle</CODE> - The angle in degrees.</DL>
565
</DL>
566
 
567
<!-- ============ METHOD DETAIL ========== -->
568
 
569
<A NAME="method_detail"><!-- --></A>
570
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
571
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
572
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
573
<B>Method Detail</B></FONT></TH>
574
</TR>
575
</TABLE>
576
 
577
<A NAME="set(float, float, float, float)"><!-- --></A><H3>
578
set</H3>
579
<PRE>
580
public <A HREF="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</A> <B>set</B>(float&nbsp;x,
581
                      float&nbsp;y,
582
                      float&nbsp;z,
583
                      float&nbsp;w)</PRE>
584
<DL>
585
<DD>Sets the components of the quaternion
586
<P>
587
<DD><DL>
588
</DL>
589
</DD>
590
<DD><DL>
591
<DT><B>Parameters:</B><DD><CODE>x</CODE> - The x-component<DD><CODE>y</CODE> - The y-component<DD><CODE>z</CODE> - The z-component<DD><CODE>w</CODE> - The w-component
592
<DT><B>Returns:</B><DD>This quaternion for chaining</DL>
593
</DD>
594
</DL>
595
<HR>
596
 
597
<A NAME="set(com.badlogic.gdx.math.Quaternion)"><!-- --></A><H3>
598
set</H3>
599
<PRE>
600
public <A HREF="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</A> <B>set</B>(<A HREF="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</A>&nbsp;quaternion)</PRE>
601
<DL>
602
<DD>Sets the quaternion components from the given quaternion.
603
<P>
604
<DD><DL>
605
</DL>
606
</DD>
607
<DD><DL>
608
<DT><B>Parameters:</B><DD><CODE>quaternion</CODE> - The quaternion.
609
<DT><B>Returns:</B><DD>This quaternion for chaining.</DL>
610
</DD>
611
</DL>
612
<HR>
613
 
614
<A NAME="set(com.badlogic.gdx.math.Vector3, float)"><!-- --></A><H3>
615
set</H3>
616
<PRE>
617
public <A HREF="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</A> <B>set</B>(<A HREF="../../../../com/badlogic/gdx/math/Vector3.html" title="class in com.badlogic.gdx.math">Vector3</A>&nbsp;axis,
618
                      float&nbsp;angle)</PRE>
619
<DL>
620
<DD>Sets the quaternion components from the given axis and angle around that axis.
621
<P>
622
<DD><DL>
623
</DL>
624
</DD>
625
<DD><DL>
626
<DT><B>Parameters:</B><DD><CODE>axis</CODE> - The axis<DD><CODE>angle</CODE> - The angle in degrees
627
<DT><B>Returns:</B><DD>This quaternion for chaining.</DL>
628
</DD>
629
</DL>
630
<HR>
631
 
632
<A NAME="cpy()"><!-- --></A><H3>
633
cpy</H3>
634
<PRE>
635
public <A HREF="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</A> <B>cpy</B>()</PRE>
636
<DL>
637
<DD><DL>
638
</DL>
639
</DD>
640
<DD><DL>
641
 
642
<DT><B>Returns:</B><DD>a copy of this quaternion</DL>
643
</DD>
644
</DL>
645
<HR>
646
 
647
<A NAME="len()"><!-- --></A><H3>
648
len</H3>
649
<PRE>
650
public float <B>len</B>()</PRE>
651
<DL>
652
<DD><DL>
653
</DL>
654
</DD>
655
<DD><DL>
656
 
657
<DT><B>Returns:</B><DD>the euclidian length of this quaternion</DL>
658
</DD>
659
</DL>
660
<HR>
661
 
662
<A NAME="toString()"><!-- --></A><H3>
663
toString</H3>
664
<PRE>
665
public java.lang.String <B>toString</B>()</PRE>
666
<DL>
667
<DD>
668
<P>
669
<DD><DL>
670
<DT><B>Overrides:</B><DD><CODE>toString</CODE> in class <CODE>java.lang.Object</CODE></DL>
671
</DD>
672
<DD><DL>
673
</DL>
674
</DD>
675
</DL>
676
<HR>
677
 
678
<A NAME="setEulerAngles(float, float, float)"><!-- --></A><H3>
679
setEulerAngles</H3>
680
<PRE>
681
public <A HREF="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</A> <B>setEulerAngles</B>(float&nbsp;yaw,
682
                                 float&nbsp;pitch,
683
                                 float&nbsp;roll)</PRE>
684
<DL>
685
<DD>Sets the quaternion to the given euler angles.
686
<P>
687
<DD><DL>
688
</DL>
689
</DD>
690
<DD><DL>
691
<DT><B>Parameters:</B><DD><CODE>yaw</CODE> - the yaw in degrees<DD><CODE>pitch</CODE> - the pitch in degress<DD><CODE>roll</CODE> - the roll in degess
692
<DT><B>Returns:</B><DD>this quaternion</DL>
693
</DD>
694
</DL>
695
<HR>
696
 
697
<A NAME="len2()"><!-- --></A><H3>
698
len2</H3>
699
<PRE>
700
public float <B>len2</B>()</PRE>
701
<DL>
702
<DD><DL>
703
</DL>
704
</DD>
705
<DD><DL>
706
 
707
<DT><B>Returns:</B><DD>the length of this quaternion without square root</DL>
708
</DD>
709
</DL>
710
<HR>
711
 
712
<A NAME="nor()"><!-- --></A><H3>
713
nor</H3>
714
<PRE>
715
public <A HREF="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</A> <B>nor</B>()</PRE>
716
<DL>
717
<DD>Normalizes this quaternion to unit length
718
<P>
719
<DD><DL>
720
</DL>
721
</DD>
722
<DD><DL>
723
 
724
<DT><B>Returns:</B><DD>the quaternion for chaining</DL>
725
</DD>
726
</DL>
727
<HR>
728
 
729
<A NAME="conjugate()"><!-- --></A><H3>
730
conjugate</H3>
731
<PRE>
732
public <A HREF="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</A> <B>conjugate</B>()</PRE>
733
<DL>
734
<DD>Conjugate the quaternion.
735
<P>
736
<DD><DL>
737
</DL>
738
</DD>
739
<DD><DL>
740
 
741
<DT><B>Returns:</B><DD>This quaternion for chaining</DL>
742
</DD>
743
</DL>
744
<HR>
745
 
746
<A NAME="transform(com.badlogic.gdx.math.Vector3)"><!-- --></A><H3>
747
transform</H3>
748
<PRE>
749
public void <B>transform</B>(<A HREF="../../../../com/badlogic/gdx/math/Vector3.html" title="class in com.badlogic.gdx.math">Vector3</A>&nbsp;v)</PRE>
750
<DL>
751
<DD>Transforms the given vector using this quaternion
752
<P>
753
<DD><DL>
754
</DL>
755
</DD>
756
<DD><DL>
757
<DT><B>Parameters:</B><DD><CODE>v</CODE> - Vector to transform</DL>
758
</DD>
759
</DL>
760
<HR>
761
 
762
<A NAME="mul(com.badlogic.gdx.math.Quaternion)"><!-- --></A><H3>
763
mul</H3>
764
<PRE>
765
public <A HREF="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</A> <B>mul</B>(<A HREF="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</A>&nbsp;q)</PRE>
766
<DL>
767
<DD>Multiplies this quaternion with another one
768
<P>
769
<DD><DL>
770
</DL>
771
</DD>
772
<DD><DL>
773
<DT><B>Parameters:</B><DD><CODE>q</CODE> - Quaternion to multiply with
774
<DT><B>Returns:</B><DD>This quaternion for chaining</DL>
775
</DD>
776
</DL>
777
<HR>
778
 
779
<A NAME="mulLeft(com.badlogic.gdx.math.Quaternion)"><!-- --></A><H3>
780
mulLeft</H3>
781
<PRE>
782
public <A HREF="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</A> <B>mulLeft</B>(<A HREF="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</A>&nbsp;q)</PRE>
783
<DL>
784
<DD>Multiplies this quaternion with another one in the form of q * this
785
<P>
786
<DD><DL>
787
</DL>
788
</DD>
789
<DD><DL>
790
<DT><B>Parameters:</B><DD><CODE>q</CODE> - Quaternion to multiply with
791
<DT><B>Returns:</B><DD>This quaternion for chaining</DL>
792
</DD>
793
</DL>
794
<HR>
795
 
796
<A NAME="toMatrix(float[])"><!-- --></A><H3>
797
toMatrix</H3>
798
<PRE>
799
public void <B>toMatrix</B>(float[]&nbsp;matrix)</PRE>
800
<DL>
801
<DD>Fills a 4x4 matrix with the rotation matrix represented by this quaternion.
802
<P>
803
<DD><DL>
804
</DL>
805
</DD>
806
<DD><DL>
807
<DT><B>Parameters:</B><DD><CODE>matrix</CODE> - Matrix to fill</DL>
808
</DD>
809
</DL>
810
<HR>
811
 
812
<A NAME="idt()"><!-- --></A><H3>
813
idt</H3>
814
<PRE>
815
public <A HREF="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</A> <B>idt</B>()</PRE>
816
<DL>
817
<DD>Sets the quaternion to an identity Quaternion
818
<P>
819
<DD><DL>
820
</DL>
821
</DD>
822
<DD><DL>
823
 
824
<DT><B>Returns:</B><DD>this quaternion for chaining</DL>
825
</DD>
826
</DL>
827
<HR>
828
 
829
<A NAME="setFromAxis(com.badlogic.gdx.math.Vector3, float)"><!-- --></A><H3>
830
setFromAxis</H3>
831
<PRE>
832
public <A HREF="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</A> <B>setFromAxis</B>(<A HREF="../../../../com/badlogic/gdx/math/Vector3.html" title="class in com.badlogic.gdx.math">Vector3</A>&nbsp;axis,
833
                              float&nbsp;angle)</PRE>
834
<DL>
835
<DD>Sets the quaternion components from the given axis and angle around that axis.
836
<P>
837
<DD><DL>
838
</DL>
839
</DD>
840
<DD><DL>
841
<DT><B>Parameters:</B><DD><CODE>axis</CODE> - The axis<DD><CODE>angle</CODE> - The angle in degrees
842
<DT><B>Returns:</B><DD>This quaternion for chaining.</DL>
843
</DD>
844
</DL>
845
<HR>
846
 
847
<A NAME="setFromAxis(float, float, float, float)"><!-- --></A><H3>
848
setFromAxis</H3>
849
<PRE>
850
public <A HREF="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</A> <B>setFromAxis</B>(float&nbsp;x,
851
                              float&nbsp;y,
852
                              float&nbsp;z,
853
                              float&nbsp;angle)</PRE>
854
<DL>
855
<DD>Sets the quaternion components from the given axis and angle around that axis.
856
<P>
857
<DD><DL>
858
</DL>
859
</DD>
860
<DD><DL>
861
<DT><B>Parameters:</B><DD><CODE>x</CODE> - X direction of the axis<DD><CODE>y</CODE> - Y direction of the axis<DD><CODE>z</CODE> - Z direction of the axis<DD><CODE>angle</CODE> - The angle in degrees
862
<DT><B>Returns:</B><DD>This quaternion for chaining.</DL>
863
</DD>
864
</DL>
865
<HR>
866
 
867
<A NAME="setFromMatrix(com.badlogic.gdx.math.Matrix4)"><!-- --></A><H3>
868
setFromMatrix</H3>
869
<PRE>
870
public <A HREF="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</A> <B>setFromMatrix</B>(<A HREF="../../../../com/badlogic/gdx/math/Matrix4.html" title="class in com.badlogic.gdx.math">Matrix4</A>&nbsp;matrix)</PRE>
871
<DL>
872
<DD><DL>
873
</DL>
874
</DD>
875
<DD><DL>
876
</DL>
877
</DD>
878
</DL>
879
<HR>
880
 
881
<A NAME="setFromAxes(float, float, float, float, float, float, float, float, float)"><!-- --></A><H3>
882
setFromAxes</H3>
883
<PRE>
884
public <A HREF="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</A> <B>setFromAxes</B>(float&nbsp;xx,
885
                              float&nbsp;xy,
886
                              float&nbsp;xz,
887
                              float&nbsp;yx,
888
                              float&nbsp;yy,
889
                              float&nbsp;yz,
890
                              float&nbsp;zx,
891
                              float&nbsp;zy,
892
                              float&nbsp;zz)</PRE>
893
<DL>
894
<DD><p>
895
 Sets the Quaternion from the given x-, y- and z-axis which have to be orthonormal.
896
 </p>
897
 
898
 <p>
899
 Taken from Bones framework for JPCT, see http://www.aptalkarga.com/bones/ which in turn took it from Graphics Gem code at
900
 ftp://ftp.cis.upenn.edu/pub/graphics/shoemake/quatut.ps.Z.
901
 </p>
902
<P>
903
<DD><DL>
904
</DL>
905
</DD>
906
<DD><DL>
907
<DT><B>Parameters:</B><DD><CODE>xx</CODE> - x-axis x-coordinate<DD><CODE>xy</CODE> - x-axis y-coordinate<DD><CODE>xz</CODE> - x-axis z-coordinate<DD><CODE>yx</CODE> - y-axis x-coordinate<DD><CODE>yy</CODE> - y-axis y-coordinate<DD><CODE>yz</CODE> - y-axis z-coordinate<DD><CODE>zx</CODE> - z-axis x-coordinate<DD><CODE>zy</CODE> - z-axis y-coordinate<DD><CODE>zz</CODE> - z-axis z-coordinate</DL>
908
</DD>
909
</DL>
910
<HR>
911
 
912
<A NAME="setFromCross(com.badlogic.gdx.math.Vector3, com.badlogic.gdx.math.Vector3)"><!-- --></A><H3>
913
setFromCross</H3>
914
<PRE>
915
public <A HREF="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</A> <B>setFromCross</B>(<A HREF="../../../../com/badlogic/gdx/math/Vector3.html" title="class in com.badlogic.gdx.math">Vector3</A>&nbsp;v1,
916
                               <A HREF="../../../../com/badlogic/gdx/math/Vector3.html" title="class in com.badlogic.gdx.math">Vector3</A>&nbsp;v2)</PRE>
917
<DL>
918
<DD>Set this quaternion to the rotation between two vectors.
919
<P>
920
<DD><DL>
921
</DL>
922
</DD>
923
<DD><DL>
924
<DT><B>Parameters:</B><DD><CODE>v1</CODE> - The base vector<DD><CODE>v2</CODE> - The target vector
925
<DT><B>Returns:</B><DD>This quaternion for chaining</DL>
926
</DD>
927
</DL>
928
<HR>
929
 
930
<A NAME="setFromCross(float, float, float, float, float, float)"><!-- --></A><H3>
931
setFromCross</H3>
932
<PRE>
933
public <A HREF="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</A> <B>setFromCross</B>(float&nbsp;x1,
934
                               float&nbsp;y1,
935
                               float&nbsp;z1,
936
                               float&nbsp;x2,
937
                               float&nbsp;y2,
938
                               float&nbsp;z2)</PRE>
939
<DL>
940
<DD>Set this quaternion to the rotation between two vectors.
941
<P>
942
<DD><DL>
943
</DL>
944
</DD>
945
<DD><DL>
946
<DT><B>Parameters:</B><DD><CODE>x1</CODE> - The base vectors x value<DD><CODE>y1</CODE> - The base vectors y value<DD><CODE>z1</CODE> - The base vectors z value<DD><CODE>x2</CODE> - The target vector x value<DD><CODE>y2</CODE> - The target vector y value<DD><CODE>z2</CODE> - The target vector z value
947
<DT><B>Returns:</B><DD>This quaternion for chaining</DL>
948
</DD>
949
</DL>
950
<HR>
951
 
952
<A NAME="slerp(com.badlogic.gdx.math.Quaternion, float)"><!-- --></A><H3>
953
slerp</H3>
954
<PRE>
955
public <A HREF="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</A> <B>slerp</B>(<A HREF="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</A>&nbsp;end,
956
                        float&nbsp;alpha)</PRE>
957
<DL>
958
<DD>Spherical linear interpolation between this quaternion and the other quaternion, based on the alpha value in the range
959
 [0,1]. Taken from. Taken from Bones framework for JPCT, see http://www.aptalkarga.com/bones/
960
<P>
961
<DD><DL>
962
</DL>
963
</DD>
964
<DD><DL>
965
<DT><B>Parameters:</B><DD><CODE>end</CODE> - the end quaternion<DD><CODE>alpha</CODE> - alpha in the range [0,1]
966
<DT><B>Returns:</B><DD>this quaternion for chaining</DL>
967
</DD>
968
</DL>
969
<HR>
970
 
971
<A NAME="equals(java.lang.Object)"><!-- --></A><H3>
972
equals</H3>
973
<PRE>
974
public boolean <B>equals</B>(java.lang.Object&nbsp;o)</PRE>
975
<DL>
976
<DD><DL>
977
<DT><B>Overrides:</B><DD><CODE>equals</CODE> in class <CODE>java.lang.Object</CODE></DL>
978
</DD>
979
<DD><DL>
980
</DL>
981
</DD>
982
</DL>
983
<HR>
984
 
985
<A NAME="dot(com.badlogic.gdx.math.Quaternion)"><!-- --></A><H3>
986
dot</H3>
987
<PRE>
988
public float <B>dot</B>(<A HREF="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</A>&nbsp;other)</PRE>
989
<DL>
990
<DD>Dot product between this and the other quaternion.
991
<P>
992
<DD><DL>
993
</DL>
994
</DD>
995
<DD><DL>
996
<DT><B>Parameters:</B><DD><CODE>other</CODE> - the other quaternion.
997
<DT><B>Returns:</B><DD>this quaternion for chaining.</DL>
998
</DD>
999
</DL>
1000
<HR>
1001
 
1002
<A NAME="mul(float)"><!-- --></A><H3>
1003
mul</H3>
1004
<PRE>
1005
public <A HREF="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</A> <B>mul</B>(float&nbsp;scalar)</PRE>
1006
<DL>
1007
<DD>Multiplies the components of this quaternion with the given scalar.
1008
<P>
1009
<DD><DL>
1010
</DL>
1011
</DD>
1012
<DD><DL>
1013
<DT><B>Parameters:</B><DD><CODE>scalar</CODE> - the scalar.
1014
<DT><B>Returns:</B><DD>this quaternion for chaining.</DL>
1015
</DD>
1016
</DL>
1017
<!-- ========= END OF CLASS DATA ========= -->
1018
<HR>
1019
 
1020
 
1021
<!-- ======= START OF BOTTOM NAVBAR ====== -->
1022
<A NAME="navbar_bottom"><!-- --></A>
1023
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
1024
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
1025
<TR>
1026
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
1027
<A NAME="navbar_bottom_firstrow"><!-- --></A>
1028
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
1029
  <TR ALIGN="center" VALIGN="top">
1030
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
1031
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
1032
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
1033
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/Quaternion.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
1034
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
1035
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
1036
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
1037
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
1038
  </TR>
1039
</TABLE>
1040
</TD>
1041
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
1042
libgdx API</EM>
1043
</TD>
1044
</TR>
1045
 
1046
<TR>
1047
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
1048
&nbsp;<A HREF="../../../../com/badlogic/gdx/math/Polygon.html" title="class in com.badlogic.gdx.math"><B>PREV CLASS</B></A>&nbsp;
1049
&nbsp;<A HREF="../../../../com/badlogic/gdx/math/Rectangle.html" title="class in com.badlogic.gdx.math"><B>NEXT CLASS</B></A></FONT></TD>
1050
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
1051
  <A HREF="../../../../index.html?com/badlogic/gdx/math/Quaternion.html" target="_top"><B>FRAMES</B></A>  &nbsp;
1052
&nbsp;<A HREF="Quaternion.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
1053
&nbsp;<SCRIPT type="text/javascript">
1054
  <!--
1055
  if(window==top) {
1056
    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
1057
  }
1058
  //-->
1059
</SCRIPT>
1060
<NOSCRIPT>
1061
  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
1062
</NOSCRIPT>
1063
 
1064
 
1065
</FONT></TD>
1066
</TR>
1067
<TR>
1068
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
1069
  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>
1070
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
1071
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>
1072
</TR>
1073
</TABLE>
1074
<A NAME="skip-navbar_bottom"></A>
1075
<!-- ======== END OF BOTTOM NAVBAR ======= -->
1076
 
1077
<HR>
1078
 
1079
                                <div style="font-size:9pt"><i>
1080
                                Copyright 2010 Mario Zechner (contact@badlogicgames.com), Nathan Sweet (admin@esotericsoftware.com)
1081
                                </i></div>
1082
 
1083
</BODY>
1084
</HTML>