mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-07 20:31:51 +09:00
1970 lines
91 KiB
HTML
1970 lines
91 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
<!-- NewPage -->
|
|
<html lang="en">
|
|
<head>
|
|
<!-- Generated by javadoc (1.8.0_101) on Sat Jun 10 08:04:08 CEST 2017 -->
|
|
<title>Quaternion (libgdx API)</title>
|
|
<meta name="date" content="2017-06-10">
|
|
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
|
|
<script type="text/javascript" src="../../../../script.js"></script>
|
|
</head>
|
|
<body>
|
|
<script type="text/javascript"><!--
|
|
try {
|
|
if (location.href.indexOf('is-external=true') == -1) {
|
|
parent.document.title="Quaternion (libgdx API)";
|
|
}
|
|
}
|
|
catch(err) {
|
|
}
|
|
//-->
|
|
var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":9,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10,"i21":10,"i22":10,"i23":10,"i24":10,"i25":10,"i26":10,"i27":10,"i28":10,"i29":10,"i30":10,"i31":9,"i32":10,"i33":9,"i34":10,"i35":10,"i36":10,"i37":10,"i38":10,"i39":10,"i40":10,"i41":10,"i42":10,"i43":10,"i44":10,"i45":10,"i46":10,"i47":10,"i48":10,"i49":10,"i50":10,"i51":10,"i52":10,"i53":10,"i54":10,"i55":10,"i56":10,"i57":10,"i58":10,"i59":10,"i60":10,"i61":10,"i62":10};
|
|
var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
|
|
var altColor = "altColor";
|
|
var rowColor = "rowColor";
|
|
var tableTab = "tableTab";
|
|
var activeTableTab = "activeTableTab";
|
|
</script>
|
|
<noscript>
|
|
<div>JavaScript is disabled on your browser.</div>
|
|
</noscript>
|
|
<!-- ========= START OF TOP NAVBAR ======= -->
|
|
<div class="topNav"><a name="navbar.top">
|
|
<!-- -->
|
|
</a>
|
|
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
|
|
<a name="navbar.top.firstrow">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="navList" title="Navigation">
|
|
<li><a href="../../../../overview-summary.html">Overview</a></li>
|
|
<li><a href="package-summary.html">Package</a></li>
|
|
<li class="navBarCell1Rev">Class</li>
|
|
<li><a href="class-use/Quaternion.html">Use</a></li>
|
|
<li><a href="package-tree.html">Tree</a></li>
|
|
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
|
|
<li><a href="../../../../index-all.html">Index</a></li>
|
|
<li><a href="../../../../help-doc.html">Help</a></li>
|
|
</ul>
|
|
<div class="aboutLanguage">
|
|
libgdx API
|
|
<style>
|
|
body, td, th { font-family:Helvetica, Tahoma, Arial, sans-serif; font-size:10pt }
|
|
pre, code, tt { font-size:9pt; font-family:Lucida Console, Courier New, sans-serif }
|
|
h1, h2, h3, .FrameTitleFont, .FrameHeadingFont, .TableHeadingColor font { font-size:105%; font-weight:bold }
|
|
.TableHeadingColor { background:#EEEEFF; }
|
|
a { text-decoration:none }
|
|
a:hover { text-decoration:underline }
|
|
a:link, a:visited { color:blue }
|
|
table { border:0px }
|
|
.TableRowColor td:first-child { border-left:1px solid black }
|
|
.TableRowColor td { border:0px; border-bottom:1px solid black; border-right:1px solid black }
|
|
hr { border:0px; border-bottom:1px solid #333366; }
|
|
</style>
|
|
</div>
|
|
</div>
|
|
<div class="subNav">
|
|
<ul class="navList">
|
|
<li><a href="../../../../com/badlogic/gdx/math/Polyline.html" title="class in com.badlogic.gdx.math"><span class="typeNameLink">Prev Class</span></a></li>
|
|
<li><a href="../../../../com/badlogic/gdx/math/RandomXS128.html" title="class in com.badlogic.gdx.math"><span class="typeNameLink">Next Class</span></a></li>
|
|
</ul>
|
|
<ul class="navList">
|
|
<li><a href="../../../../index.html?com/badlogic/gdx/math/Quaternion.html" target="_top">Frames</a></li>
|
|
<li><a href="Quaternion.html" target="_top">No Frames</a></li>
|
|
</ul>
|
|
<ul class="navList" id="allclasses_navbar_top">
|
|
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
|
|
</ul>
|
|
<div>
|
|
<script type="text/javascript"><!--
|
|
allClassesLink = document.getElementById("allclasses_navbar_top");
|
|
if(window==top) {
|
|
allClassesLink.style.display = "block";
|
|
}
|
|
else {
|
|
allClassesLink.style.display = "none";
|
|
}
|
|
//-->
|
|
</script>
|
|
</div>
|
|
<div>
|
|
<ul class="subNavList">
|
|
<li>Summary: </li>
|
|
<li>Nested | </li>
|
|
<li><a href="#field.summary">Field</a> | </li>
|
|
<li><a href="#constructor.summary">Constr</a> | </li>
|
|
<li><a href="#method.summary">Method</a></li>
|
|
</ul>
|
|
<ul class="subNavList">
|
|
<li>Detail: </li>
|
|
<li><a href="#field.detail">Field</a> | </li>
|
|
<li><a href="#constructor.detail">Constr</a> | </li>
|
|
<li><a href="#method.detail">Method</a></li>
|
|
</ul>
|
|
</div>
|
|
<a name="skip.navbar.top">
|
|
<!-- -->
|
|
</a></div>
|
|
<!-- ========= END OF TOP NAVBAR ========= -->
|
|
<!-- ======== START OF CLASS DATA ======== -->
|
|
<div class="header">
|
|
<div class="subTitle">com.badlogic.gdx.math</div>
|
|
<h2 title="Class Quaternion" class="title">Class Quaternion</h2>
|
|
</div>
|
|
<div class="contentContainer">
|
|
<ul class="inheritance">
|
|
<li>java.lang.Object</li>
|
|
<li>
|
|
<ul class="inheritance">
|
|
<li>com.badlogic.gdx.math.Quaternion</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<div class="description">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<dl>
|
|
<dt>All Implemented Interfaces:</dt>
|
|
<dd>java.io.Serializable</dd>
|
|
</dl>
|
|
<hr>
|
|
<br>
|
|
<pre>public class <span class="typeNameLabel">Quaternion</span>
|
|
extends java.lang.Object
|
|
implements java.io.Serializable</pre>
|
|
<div class="block">A simple quaternion class.</div>
|
|
<dl>
|
|
<dt><span class="simpleTagLabel">Author:</span></dt>
|
|
<dd>badlogicgames@gmail.com, vesuvio, xoppa</dd>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="http://en.wikipedia.org/wiki/Quaternion">http://en.wikipedia.org/wiki/Quaternion</a>,
|
|
<a href="../../../../serialized-form.html#com.badlogic.gdx.math.Quaternion">Serialized Form</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="summary">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<!-- =========== FIELD SUMMARY =========== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="field.summary">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Field Summary</h3>
|
|
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
|
|
<caption><span>Fields</span><span class="tabEnd"> </span></caption>
|
|
<tr>
|
|
<th class="colFirst" scope="col">Modifier and Type</th>
|
|
<th class="colLast" scope="col">Field and Description</th>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>float</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/math/Quaternion.html#w">w</a></span></code> </td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>float</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/math/Quaternion.html#x">x</a></span></code> </td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>float</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/math/Quaternion.html#y">y</a></span></code> </td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>float</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/math/Quaternion.html#z">z</a></span></code> </td>
|
|
</tr>
|
|
</table>
|
|
</li>
|
|
</ul>
|
|
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="constructor.summary">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Constructor Summary</h3>
|
|
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
|
|
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
|
|
<tr>
|
|
<th class="colOne" scope="col">Constructor and Description</th>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/math/Quaternion.html#Quaternion--">Quaternion</a></span>()</code> </td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/math/Quaternion.html#Quaternion-float-float-float-float-">Quaternion</a></span>(float x,
|
|
float y,
|
|
float z,
|
|
float w)</code>
|
|
<div class="block">Constructor, sets the four components of the quaternion.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/math/Quaternion.html#Quaternion-com.badlogic.gdx.math.Quaternion-">Quaternion</a></span>(<a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a> quaternion)</code>
|
|
<div class="block">Constructor, sets the quaternion components from the given quaternion.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/math/Quaternion.html#Quaternion-com.badlogic.gdx.math.Vector3-float-">Quaternion</a></span>(<a href="../../../../com/badlogic/gdx/math/Vector3.html" title="class in com.badlogic.gdx.math">Vector3</a> axis,
|
|
float angle)</code>
|
|
<div class="block">Constructor, sets the quaternion from the given axis vector and the angle around that axis in degrees.</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</li>
|
|
</ul>
|
|
<!-- ========== METHOD SUMMARY =========== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="method.summary">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Method Summary</h3>
|
|
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
|
|
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption>
|
|
<tr>
|
|
<th class="colFirst" scope="col">Modifier and Type</th>
|
|
<th class="colLast" scope="col">Method and Description</th>
|
|
</tr>
|
|
<tr id="i0" class="altColor">
|
|
<td class="colFirst"><code><a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/math/Quaternion.html#add-float-float-float-float-">add</a></span>(float qx,
|
|
float qy,
|
|
float qz,
|
|
float qw)</code>
|
|
<div class="block">Add the x,y,z,w components of the passed in quaternion to the ones of this quaternion</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i1" class="rowColor">
|
|
<td class="colFirst"><code><a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/math/Quaternion.html#add-com.badlogic.gdx.math.Quaternion-">add</a></span>(<a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a> quaternion)</code>
|
|
<div class="block">Add the x,y,z,w components of the passed in quaternion to the ones of this quaternion</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i2" class="altColor">
|
|
<td class="colFirst"><code><a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/math/Quaternion.html#conjugate--">conjugate</a></span>()</code>
|
|
<div class="block">Conjugate the quaternion.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i3" class="rowColor">
|
|
<td class="colFirst"><code><a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/math/Quaternion.html#cpy--">cpy</a></span>()</code> </td>
|
|
</tr>
|
|
<tr id="i4" class="altColor">
|
|
<td class="colFirst"><code>float</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/math/Quaternion.html#dot-float-float-float-float-">dot</a></span>(float x,
|
|
float y,
|
|
float z,
|
|
float w)</code>
|
|
<div class="block">Get the dot product between this and the other quaternion (commutative).</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i5" class="rowColor">
|
|
<td class="colFirst"><code>static float</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/math/Quaternion.html#dot-float-float-float-float-float-float-float-float-">dot</a></span>(float x1,
|
|
float y1,
|
|
float z1,
|
|
float w1,
|
|
float x2,
|
|
float y2,
|
|
float z2,
|
|
float w2)</code>
|
|
<div class="block">Get the dot product between the two quaternions (commutative).</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i6" class="altColor">
|
|
<td class="colFirst"><code>float</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/math/Quaternion.html#dot-com.badlogic.gdx.math.Quaternion-">dot</a></span>(<a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a> other)</code>
|
|
<div class="block">Get the dot product between this and the other quaternion (commutative).</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i7" class="rowColor">
|
|
<td class="colFirst"><code>boolean</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/math/Quaternion.html#equals-java.lang.Object-">equals</a></span>(java.lang.Object obj)</code> </td>
|
|
</tr>
|
|
<tr id="i8" class="altColor">
|
|
<td class="colFirst"><code><a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/math/Quaternion.html#exp-float-">exp</a></span>(float alpha)</code>
|
|
<div class="block">Calculates (this quaternion)^alpha where alpha is a real number and stores the result in this quaternion.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i9" class="rowColor">
|
|
<td class="colFirst"><code>float</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/math/Quaternion.html#getAngle--">getAngle</a></span>()</code>
|
|
<div class="block">Get the angle in degrees of the rotation this quaternion represents.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i10" class="altColor">
|
|
<td class="colFirst"><code>float</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/math/Quaternion.html#getAngleAround-float-float-float-">getAngleAround</a></span>(float axisX,
|
|
float axisY,
|
|
float axisZ)</code>
|
|
<div class="block">Get the angle in degrees of the rotation around the specified axis.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i11" class="rowColor">
|
|
<td class="colFirst"><code>float</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/math/Quaternion.html#getAngleAround-com.badlogic.gdx.math.Vector3-">getAngleAround</a></span>(<a href="../../../../com/badlogic/gdx/math/Vector3.html" title="class in com.badlogic.gdx.math">Vector3</a> axis)</code>
|
|
<div class="block">Get the angle in degrees of the rotation around the specified axis.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i12" class="altColor">
|
|
<td class="colFirst"><code>float</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/math/Quaternion.html#getAngleAroundRad-float-float-float-">getAngleAroundRad</a></span>(float axisX,
|
|
float axisY,
|
|
float axisZ)</code>
|
|
<div class="block">Get the angle in radians of the rotation around the specified axis.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i13" class="rowColor">
|
|
<td class="colFirst"><code>float</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/math/Quaternion.html#getAngleAroundRad-com.badlogic.gdx.math.Vector3-">getAngleAroundRad</a></span>(<a href="../../../../com/badlogic/gdx/math/Vector3.html" title="class in com.badlogic.gdx.math">Vector3</a> axis)</code>
|
|
<div class="block">Get the angle in radians of the rotation around the specified axis.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i14" class="altColor">
|
|
<td class="colFirst"><code>float</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/math/Quaternion.html#getAngleRad--">getAngleRad</a></span>()</code>
|
|
<div class="block">Get the angle in radians of the rotation this quaternion represents.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i15" class="rowColor">
|
|
<td class="colFirst"><code>float</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/math/Quaternion.html#getAxisAngle-com.badlogic.gdx.math.Vector3-">getAxisAngle</a></span>(<a href="../../../../com/badlogic/gdx/math/Vector3.html" title="class in com.badlogic.gdx.math">Vector3</a> axis)</code>
|
|
<div class="block">Get the axis angle representation of the rotation in degrees.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i16" class="altColor">
|
|
<td class="colFirst"><code>float</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/math/Quaternion.html#getAxisAngleRad-com.badlogic.gdx.math.Vector3-">getAxisAngleRad</a></span>(<a href="../../../../com/badlogic/gdx/math/Vector3.html" title="class in com.badlogic.gdx.math">Vector3</a> axis)</code>
|
|
<div class="block">Get the axis-angle representation of the rotation in radians.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i17" class="rowColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/math/Quaternion.html#getGimbalPole--">getGimbalPole</a></span>()</code>
|
|
<div class="block">Get the pole of the gimbal lock, if any.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i18" class="altColor">
|
|
<td class="colFirst"><code>float</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/math/Quaternion.html#getPitch--">getPitch</a></span>()</code>
|
|
<div class="block">Get the pitch euler angle in degrees, which is the rotation around the x axis.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i19" class="rowColor">
|
|
<td class="colFirst"><code>float</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/math/Quaternion.html#getPitchRad--">getPitchRad</a></span>()</code>
|
|
<div class="block">Get the pitch euler angle in radians, which is the rotation around the x axis.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i20" class="altColor">
|
|
<td class="colFirst"><code>float</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/math/Quaternion.html#getRoll--">getRoll</a></span>()</code>
|
|
<div class="block">Get the roll euler angle in degrees, which is the rotation around the z axis.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i21" class="rowColor">
|
|
<td class="colFirst"><code>float</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/math/Quaternion.html#getRollRad--">getRollRad</a></span>()</code>
|
|
<div class="block">Get the roll euler angle in radians, which is the rotation around the z axis.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i22" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/math/Quaternion.html#getSwingTwist-float-float-float-com.badlogic.gdx.math.Quaternion-com.badlogic.gdx.math.Quaternion-">getSwingTwist</a></span>(float axisX,
|
|
float axisY,
|
|
float axisZ,
|
|
<a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a> swing,
|
|
<a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a> twist)</code>
|
|
<div class="block">Get the swing rotation and twist rotation for the specified axis.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i23" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/math/Quaternion.html#getSwingTwist-com.badlogic.gdx.math.Vector3-com.badlogic.gdx.math.Quaternion-com.badlogic.gdx.math.Quaternion-">getSwingTwist</a></span>(<a href="../../../../com/badlogic/gdx/math/Vector3.html" title="class in com.badlogic.gdx.math">Vector3</a> axis,
|
|
<a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a> swing,
|
|
<a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a> twist)</code>
|
|
<div class="block">Get the swing rotation and twist rotation for the specified axis.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i24" class="altColor">
|
|
<td class="colFirst"><code>float</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/math/Quaternion.html#getYaw--">getYaw</a></span>()</code>
|
|
<div class="block">Get the yaw euler angle in degrees, which is the rotation around the y axis.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i25" class="rowColor">
|
|
<td class="colFirst"><code>float</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/math/Quaternion.html#getYawRad--">getYawRad</a></span>()</code>
|
|
<div class="block">Get the yaw euler angle in radians, which is the rotation around the y axis.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i26" class="altColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/math/Quaternion.html#hashCode--">hashCode</a></span>()</code> </td>
|
|
</tr>
|
|
<tr id="i27" class="rowColor">
|
|
<td class="colFirst"><code><a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/math/Quaternion.html#idt--">idt</a></span>()</code>
|
|
<div class="block">Sets the quaternion to an identity Quaternion</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i28" class="altColor">
|
|
<td class="colFirst"><code>boolean</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/math/Quaternion.html#isIdentity--">isIdentity</a></span>()</code> </td>
|
|
</tr>
|
|
<tr id="i29" class="rowColor">
|
|
<td class="colFirst"><code>boolean</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/math/Quaternion.html#isIdentity-float-">isIdentity</a></span>(float tolerance)</code> </td>
|
|
</tr>
|
|
<tr id="i30" class="altColor">
|
|
<td class="colFirst"><code>float</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/math/Quaternion.html#len--">len</a></span>()</code> </td>
|
|
</tr>
|
|
<tr id="i31" class="rowColor">
|
|
<td class="colFirst"><code>static float</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/math/Quaternion.html#len-float-float-float-float-">len</a></span>(float x,
|
|
float y,
|
|
float z,
|
|
float w)</code> </td>
|
|
</tr>
|
|
<tr id="i32" class="altColor">
|
|
<td class="colFirst"><code>float</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/math/Quaternion.html#len2--">len2</a></span>()</code> </td>
|
|
</tr>
|
|
<tr id="i33" class="rowColor">
|
|
<td class="colFirst"><code>static float</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/math/Quaternion.html#len2-float-float-float-float-">len2</a></span>(float x,
|
|
float y,
|
|
float z,
|
|
float w)</code> </td>
|
|
</tr>
|
|
<tr id="i34" class="altColor">
|
|
<td class="colFirst"><code><a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/math/Quaternion.html#mul-float-">mul</a></span>(float scalar)</code>
|
|
<div class="block">Multiplies the components of this quaternion with the given scalar.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i35" class="rowColor">
|
|
<td class="colFirst"><code><a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/math/Quaternion.html#mul-float-float-float-float-">mul</a></span>(float x,
|
|
float y,
|
|
float z,
|
|
float w)</code>
|
|
<div class="block">Multiplies this quaternion with another one in the form of this = this * other</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i36" class="altColor">
|
|
<td class="colFirst"><code><a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/math/Quaternion.html#mul-com.badlogic.gdx.math.Quaternion-">mul</a></span>(<a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a> other)</code>
|
|
<div class="block">Multiplies this quaternion with another one in the form of this = this * other</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i37" class="rowColor">
|
|
<td class="colFirst"><code><a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/math/Quaternion.html#mulLeft-float-float-float-float-">mulLeft</a></span>(float x,
|
|
float y,
|
|
float z,
|
|
float w)</code>
|
|
<div class="block">Multiplies this quaternion with another one in the form of this = other * this</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i38" class="altColor">
|
|
<td class="colFirst"><code><a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/math/Quaternion.html#mulLeft-com.badlogic.gdx.math.Quaternion-">mulLeft</a></span>(<a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a> other)</code>
|
|
<div class="block">Multiplies this quaternion with another one in the form of this = other * this</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i39" class="rowColor">
|
|
<td class="colFirst"><code><a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/math/Quaternion.html#nor--">nor</a></span>()</code>
|
|
<div class="block">Normalizes this quaternion to unit length</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i40" class="altColor">
|
|
<td class="colFirst"><code><a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/math/Quaternion.html#set-float-float-float-float-">set</a></span>(float x,
|
|
float y,
|
|
float z,
|
|
float w)</code>
|
|
<div class="block">Sets the components of the quaternion</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i41" class="rowColor">
|
|
<td class="colFirst"><code><a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/math/Quaternion.html#set-com.badlogic.gdx.math.Quaternion-">set</a></span>(<a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a> quaternion)</code>
|
|
<div class="block">Sets the quaternion components from the given quaternion.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i42" class="altColor">
|
|
<td class="colFirst"><code><a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/math/Quaternion.html#set-com.badlogic.gdx.math.Vector3-float-">set</a></span>(<a href="../../../../com/badlogic/gdx/math/Vector3.html" title="class in com.badlogic.gdx.math">Vector3</a> axis,
|
|
float angle)</code>
|
|
<div class="block">Sets the quaternion components from the given axis and angle around that axis.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i43" class="rowColor">
|
|
<td class="colFirst"><code><a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/math/Quaternion.html#setEulerAngles-float-float-float-">setEulerAngles</a></span>(float yaw,
|
|
float pitch,
|
|
float roll)</code>
|
|
<div class="block">Sets the quaternion to the given euler angles in degrees.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i44" class="altColor">
|
|
<td class="colFirst"><code><a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/math/Quaternion.html#setEulerAnglesRad-float-float-float-">setEulerAnglesRad</a></span>(float yaw,
|
|
float pitch,
|
|
float roll)</code>
|
|
<div class="block">Sets the quaternion to the given euler angles in radians.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i45" class="rowColor">
|
|
<td class="colFirst"><code><a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/math/Quaternion.html#setFromAxes-boolean-float-float-float-float-float-float-float-float-float-">setFromAxes</a></span>(boolean normalizeAxes,
|
|
float xx,
|
|
float xy,
|
|
float xz,
|
|
float yx,
|
|
float yy,
|
|
float yz,
|
|
float zx,
|
|
float zy,
|
|
float zz)</code>
|
|
<div class="block">
|
|
Sets the Quaternion from the given x-, y- and z-axis.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i46" class="altColor">
|
|
<td class="colFirst"><code><a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/math/Quaternion.html#setFromAxes-float-float-float-float-float-float-float-float-float-">setFromAxes</a></span>(float xx,
|
|
float xy,
|
|
float xz,
|
|
float yx,
|
|
float yy,
|
|
float yz,
|
|
float zx,
|
|
float zy,
|
|
float zz)</code>
|
|
<div class="block">
|
|
Sets the Quaternion from the given x-, y- and z-axis which have to be orthonormal.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i47" class="rowColor">
|
|
<td class="colFirst"><code><a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/math/Quaternion.html#setFromAxis-float-float-float-float-">setFromAxis</a></span>(float x,
|
|
float y,
|
|
float z,
|
|
float degrees)</code>
|
|
<div class="block">Sets the quaternion components from the given axis and angle around that axis.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i48" class="altColor">
|
|
<td class="colFirst"><code><a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/math/Quaternion.html#setFromAxis-com.badlogic.gdx.math.Vector3-float-">setFromAxis</a></span>(<a href="../../../../com/badlogic/gdx/math/Vector3.html" title="class in com.badlogic.gdx.math">Vector3</a> axis,
|
|
float degrees)</code>
|
|
<div class="block">Sets the quaternion components from the given axis and angle around that axis.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i49" class="rowColor">
|
|
<td class="colFirst"><code><a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/math/Quaternion.html#setFromAxisRad-float-float-float-float-">setFromAxisRad</a></span>(float x,
|
|
float y,
|
|
float z,
|
|
float radians)</code>
|
|
<div class="block">Sets the quaternion components from the given axis and angle around that axis.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i50" class="altColor">
|
|
<td class="colFirst"><code><a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/math/Quaternion.html#setFromAxisRad-com.badlogic.gdx.math.Vector3-float-">setFromAxisRad</a></span>(<a href="../../../../com/badlogic/gdx/math/Vector3.html" title="class in com.badlogic.gdx.math">Vector3</a> axis,
|
|
float radians)</code>
|
|
<div class="block">Sets the quaternion components from the given axis and angle around that axis.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i51" class="rowColor">
|
|
<td class="colFirst"><code><a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/math/Quaternion.html#setFromCross-float-float-float-float-float-float-">setFromCross</a></span>(float x1,
|
|
float y1,
|
|
float z1,
|
|
float x2,
|
|
float y2,
|
|
float z2)</code>
|
|
<div class="block">Set this quaternion to the rotation between two vectors.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i52" class="altColor">
|
|
<td class="colFirst"><code><a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/math/Quaternion.html#setFromCross-com.badlogic.gdx.math.Vector3-com.badlogic.gdx.math.Vector3-">setFromCross</a></span>(<a href="../../../../com/badlogic/gdx/math/Vector3.html" title="class in com.badlogic.gdx.math">Vector3</a> v1,
|
|
<a href="../../../../com/badlogic/gdx/math/Vector3.html" title="class in com.badlogic.gdx.math">Vector3</a> v2)</code>
|
|
<div class="block">Set this quaternion to the rotation between two vectors.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i53" class="rowColor">
|
|
<td class="colFirst"><code><a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/math/Quaternion.html#setFromMatrix-boolean-com.badlogic.gdx.math.Matrix3-">setFromMatrix</a></span>(boolean normalizeAxes,
|
|
<a href="../../../../com/badlogic/gdx/math/Matrix3.html" title="class in com.badlogic.gdx.math">Matrix3</a> matrix)</code>
|
|
<div class="block">Sets the Quaternion from the given matrix, optionally removing any scaling.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i54" class="altColor">
|
|
<td class="colFirst"><code><a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/math/Quaternion.html#setFromMatrix-boolean-com.badlogic.gdx.math.Matrix4-">setFromMatrix</a></span>(boolean normalizeAxes,
|
|
<a href="../../../../com/badlogic/gdx/math/Matrix4.html" title="class in com.badlogic.gdx.math">Matrix4</a> matrix)</code>
|
|
<div class="block">Sets the Quaternion from the given matrix, optionally removing any scaling.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i55" class="rowColor">
|
|
<td class="colFirst"><code><a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/math/Quaternion.html#setFromMatrix-com.badlogic.gdx.math.Matrix3-">setFromMatrix</a></span>(<a href="../../../../com/badlogic/gdx/math/Matrix3.html" title="class in com.badlogic.gdx.math">Matrix3</a> matrix)</code>
|
|
<div class="block">Sets the Quaternion from the given rotation matrix, which must not contain scaling.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i56" class="altColor">
|
|
<td class="colFirst"><code><a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/math/Quaternion.html#setFromMatrix-com.badlogic.gdx.math.Matrix4-">setFromMatrix</a></span>(<a href="../../../../com/badlogic/gdx/math/Matrix4.html" title="class in com.badlogic.gdx.math">Matrix4</a> matrix)</code>
|
|
<div class="block">Sets the Quaternion from the given rotation matrix, which must not contain scaling.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i57" class="rowColor">
|
|
<td class="colFirst"><code><a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/math/Quaternion.html#slerp-com.badlogic.gdx.math.Quaternion:A-">slerp</a></span>(<a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a>[] q)</code>
|
|
<div class="block">Spherical linearly interpolates multiple quaternions and stores the result in this Quaternion.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i58" class="altColor">
|
|
<td class="colFirst"><code><a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/math/Quaternion.html#slerp-com.badlogic.gdx.math.Quaternion:A-float:A-">slerp</a></span>(<a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a>[] q,
|
|
float[] w)</code>
|
|
<div class="block">Spherical linearly interpolates multiple quaternions by the given weights and stores the result in this Quaternion.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i59" class="rowColor">
|
|
<td class="colFirst"><code><a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/math/Quaternion.html#slerp-com.badlogic.gdx.math.Quaternion-float-">slerp</a></span>(<a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a> end,
|
|
float alpha)</code>
|
|
<div class="block">Spherical linear interpolation between this quaternion and the other quaternion, based on the alpha value in the range
|
|
[0,1].</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i60" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/math/Quaternion.html#toMatrix-float:A-">toMatrix</a></span>(float[] matrix)</code>
|
|
<div class="block">Fills a 4x4 matrix with the rotation matrix represented by this quaternion.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i61" class="rowColor">
|
|
<td class="colFirst"><code>java.lang.String</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/math/Quaternion.html#toString--">toString</a></span>()</code> </td>
|
|
</tr>
|
|
<tr id="i62" class="altColor">
|
|
<td class="colFirst"><code><a href="../../../../com/badlogic/gdx/math/Vector3.html" title="class in com.badlogic.gdx.math">Vector3</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/math/Quaternion.html#transform-com.badlogic.gdx.math.Vector3-">transform</a></span>(<a href="../../../../com/badlogic/gdx/math/Vector3.html" title="class in com.badlogic.gdx.math">Vector3</a> v)</code>
|
|
<div class="block">Transforms the given vector using this quaternion</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Methods inherited from class java.lang.Object</h3>
|
|
<code>clone, finalize, getClass, notify, notifyAll, wait, wait, wait</code></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="details">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<!-- ============ FIELD DETAIL =========== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="field.detail">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Field Detail</h3>
|
|
<a name="x">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>x</h4>
|
|
<pre>public float x</pre>
|
|
</li>
|
|
</ul>
|
|
<a name="y">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>y</h4>
|
|
<pre>public float y</pre>
|
|
</li>
|
|
</ul>
|
|
<a name="z">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>z</h4>
|
|
<pre>public float z</pre>
|
|
</li>
|
|
</ul>
|
|
<a name="w">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>w</h4>
|
|
<pre>public float w</pre>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<!-- ========= CONSTRUCTOR DETAIL ======== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="constructor.detail">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Constructor Detail</h3>
|
|
<a name="Quaternion-float-float-float-float-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>Quaternion</h4>
|
|
<pre>public Quaternion(float x,
|
|
float y,
|
|
float z,
|
|
float w)</pre>
|
|
<div class="block">Constructor, sets the four components of the quaternion.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>x</code> - The x-component</dd>
|
|
<dd><code>y</code> - The y-component</dd>
|
|
<dd><code>z</code> - The z-component</dd>
|
|
<dd><code>w</code> - The w-component</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="Quaternion--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>Quaternion</h4>
|
|
<pre>public Quaternion()</pre>
|
|
</li>
|
|
</ul>
|
|
<a name="Quaternion-com.badlogic.gdx.math.Quaternion-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>Quaternion</h4>
|
|
<pre>public Quaternion(<a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a> quaternion)</pre>
|
|
<div class="block">Constructor, sets the quaternion components from the given quaternion.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>quaternion</code> - The quaternion to copy.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="Quaternion-com.badlogic.gdx.math.Vector3-float-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>Quaternion</h4>
|
|
<pre>public Quaternion(<a href="../../../../com/badlogic/gdx/math/Vector3.html" title="class in com.badlogic.gdx.math">Vector3</a> axis,
|
|
float angle)</pre>
|
|
<div class="block">Constructor, sets the quaternion from the given axis vector and the angle around that axis in degrees.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>axis</code> - The axis</dd>
|
|
<dd><code>angle</code> - The angle in degrees.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<!-- ============ METHOD DETAIL ========== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="method.detail">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Method Detail</h3>
|
|
<a name="set-float-float-float-float-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>set</h4>
|
|
<pre>public <a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a> set(float x,
|
|
float y,
|
|
float z,
|
|
float w)</pre>
|
|
<div class="block">Sets the components of the quaternion</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>x</code> - The x-component</dd>
|
|
<dd><code>y</code> - The y-component</dd>
|
|
<dd><code>z</code> - The z-component</dd>
|
|
<dd><code>w</code> - The w-component</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>This quaternion for chaining</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="set-com.badlogic.gdx.math.Quaternion-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>set</h4>
|
|
<pre>public <a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a> set(<a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a> quaternion)</pre>
|
|
<div class="block">Sets the quaternion components from the given quaternion.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>quaternion</code> - The quaternion.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>This quaternion for chaining.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="set-com.badlogic.gdx.math.Vector3-float-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>set</h4>
|
|
<pre>public <a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a> set(<a href="../../../../com/badlogic/gdx/math/Vector3.html" title="class in com.badlogic.gdx.math">Vector3</a> axis,
|
|
float angle)</pre>
|
|
<div class="block">Sets the quaternion components from the given axis and angle around that axis.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>axis</code> - The axis</dd>
|
|
<dd><code>angle</code> - The angle in degrees</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>This quaternion for chaining.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="cpy--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>cpy</h4>
|
|
<pre>public <a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a> cpy()</pre>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>a copy of this quaternion</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="len-float-float-float-float-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>len</h4>
|
|
<pre>public static final float len(float x,
|
|
float y,
|
|
float z,
|
|
float w)</pre>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the euclidean length of the specified quaternion</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="len--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>len</h4>
|
|
<pre>public float len()</pre>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the euclidean length of this quaternion</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="toString--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>toString</h4>
|
|
<pre>public java.lang.String toString()</pre>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
|
|
<dd><code>toString</code> in class <code>java.lang.Object</code></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="setEulerAngles-float-float-float-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>setEulerAngles</h4>
|
|
<pre>public <a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a> setEulerAngles(float yaw,
|
|
float pitch,
|
|
float roll)</pre>
|
|
<div class="block">Sets the quaternion to the given euler angles in degrees.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>yaw</code> - the rotation around the y axis in degrees</dd>
|
|
<dd><code>pitch</code> - the rotation around the x axis in degrees</dd>
|
|
<dd><code>roll</code> - the rotation around the z axis degrees</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>this quaternion</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="setEulerAnglesRad-float-float-float-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>setEulerAnglesRad</h4>
|
|
<pre>public <a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a> setEulerAnglesRad(float yaw,
|
|
float pitch,
|
|
float roll)</pre>
|
|
<div class="block">Sets the quaternion to the given euler angles in radians.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>yaw</code> - the rotation around the y axis in radians</dd>
|
|
<dd><code>pitch</code> - the rotation around the x axis in radians</dd>
|
|
<dd><code>roll</code> - the rotation around the z axis in radians</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>this quaternion</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getGimbalPole--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getGimbalPole</h4>
|
|
<pre>public int getGimbalPole()</pre>
|
|
<div class="block">Get the pole of the gimbal lock, if any.</div>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>positive (+1) for north pole, negative (-1) for south pole, zero (0) when no gimbal lock</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getRollRad--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getRollRad</h4>
|
|
<pre>public float getRollRad()</pre>
|
|
<div class="block">Get the roll euler angle in radians, which is the rotation around the z axis. Requires that this quaternion is normalized.</div>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the rotation around the z axis in radians (between -PI and +PI)</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getRoll--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getRoll</h4>
|
|
<pre>public float getRoll()</pre>
|
|
<div class="block">Get the roll euler angle in degrees, which is the rotation around the z axis. Requires that this quaternion is normalized.</div>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the rotation around the z axis in degrees (between -180 and +180)</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getPitchRad--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getPitchRad</h4>
|
|
<pre>public float getPitchRad()</pre>
|
|
<div class="block">Get the pitch euler angle in radians, which is the rotation around the x axis. Requires that this quaternion is normalized.</div>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the rotation around the x axis in radians (between -(PI/2) and +(PI/2))</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getPitch--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getPitch</h4>
|
|
<pre>public float getPitch()</pre>
|
|
<div class="block">Get the pitch euler angle in degrees, which is the rotation around the x axis. Requires that this quaternion is normalized.</div>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the rotation around the x axis in degrees (between -90 and +90)</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getYawRad--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getYawRad</h4>
|
|
<pre>public float getYawRad()</pre>
|
|
<div class="block">Get the yaw euler angle in radians, which is the rotation around the y axis. Requires that this quaternion is normalized.</div>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the rotation around the y axis in radians (between -PI and +PI)</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getYaw--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getYaw</h4>
|
|
<pre>public float getYaw()</pre>
|
|
<div class="block">Get the yaw euler angle in degrees, which is the rotation around the y axis. Requires that this quaternion is normalized.</div>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the rotation around the y axis in degrees (between -180 and +180)</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="len2-float-float-float-float-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>len2</h4>
|
|
<pre>public static final float len2(float x,
|
|
float y,
|
|
float z,
|
|
float w)</pre>
|
|
</li>
|
|
</ul>
|
|
<a name="len2--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>len2</h4>
|
|
<pre>public float len2()</pre>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the length of this quaternion without square root</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="nor--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>nor</h4>
|
|
<pre>public <a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a> nor()</pre>
|
|
<div class="block">Normalizes this quaternion to unit length</div>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the quaternion for chaining</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="conjugate--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>conjugate</h4>
|
|
<pre>public <a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a> conjugate()</pre>
|
|
<div class="block">Conjugate the quaternion.</div>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>This quaternion for chaining</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="transform-com.badlogic.gdx.math.Vector3-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>transform</h4>
|
|
<pre>public <a href="../../../../com/badlogic/gdx/math/Vector3.html" title="class in com.badlogic.gdx.math">Vector3</a> transform(<a href="../../../../com/badlogic/gdx/math/Vector3.html" title="class in com.badlogic.gdx.math">Vector3</a> v)</pre>
|
|
<div class="block">Transforms the given vector using this quaternion</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>v</code> - Vector to transform</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="mul-com.badlogic.gdx.math.Quaternion-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>mul</h4>
|
|
<pre>public <a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a> mul(<a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a> other)</pre>
|
|
<div class="block">Multiplies this quaternion with another one in the form of this = this * other</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>other</code> - Quaternion to multiply with</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>This quaternion for chaining</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="mul-float-float-float-float-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>mul</h4>
|
|
<pre>public <a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a> mul(float x,
|
|
float y,
|
|
float z,
|
|
float w)</pre>
|
|
<div class="block">Multiplies this quaternion with another one in the form of this = this * other</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>x</code> - the x component of the other quaternion to multiply with</dd>
|
|
<dd><code>y</code> - the y component of the other quaternion to multiply with</dd>
|
|
<dd><code>z</code> - the z component of the other quaternion to multiply with</dd>
|
|
<dd><code>w</code> - the w component of the other quaternion to multiply with</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>This quaternion for chaining</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="mulLeft-com.badlogic.gdx.math.Quaternion-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>mulLeft</h4>
|
|
<pre>public <a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a> mulLeft(<a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a> other)</pre>
|
|
<div class="block">Multiplies this quaternion with another one in the form of this = other * this</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>other</code> - Quaternion to multiply with</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>This quaternion for chaining</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="mulLeft-float-float-float-float-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>mulLeft</h4>
|
|
<pre>public <a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a> mulLeft(float x,
|
|
float y,
|
|
float z,
|
|
float w)</pre>
|
|
<div class="block">Multiplies this quaternion with another one in the form of this = other * this</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>x</code> - the x component of the other quaternion to multiply with</dd>
|
|
<dd><code>y</code> - the y component of the other quaternion to multiply with</dd>
|
|
<dd><code>z</code> - the z component of the other quaternion to multiply with</dd>
|
|
<dd><code>w</code> - the w component of the other quaternion to multiply with</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>This quaternion for chaining</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="add-com.badlogic.gdx.math.Quaternion-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>add</h4>
|
|
<pre>public <a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a> add(<a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a> quaternion)</pre>
|
|
<div class="block">Add the x,y,z,w components of the passed in quaternion to the ones of this quaternion</div>
|
|
</li>
|
|
</ul>
|
|
<a name="add-float-float-float-float-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>add</h4>
|
|
<pre>public <a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a> add(float qx,
|
|
float qy,
|
|
float qz,
|
|
float qw)</pre>
|
|
<div class="block">Add the x,y,z,w components of the passed in quaternion to the ones of this quaternion</div>
|
|
</li>
|
|
</ul>
|
|
<a name="toMatrix-float:A-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>toMatrix</h4>
|
|
<pre>public void toMatrix(float[] matrix)</pre>
|
|
<div class="block">Fills a 4x4 matrix with the rotation matrix represented by this quaternion.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>matrix</code> - Matrix to fill</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="idt--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>idt</h4>
|
|
<pre>public <a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a> idt()</pre>
|
|
<div class="block">Sets the quaternion to an identity Quaternion</div>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>this quaternion for chaining</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="isIdentity--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>isIdentity</h4>
|
|
<pre>public boolean isIdentity()</pre>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>If this quaternion is an identity Quaternion</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="isIdentity-float-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>isIdentity</h4>
|
|
<pre>public boolean isIdentity(float tolerance)</pre>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>If this quaternion is an identity Quaternion</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="setFromAxis-com.badlogic.gdx.math.Vector3-float-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>setFromAxis</h4>
|
|
<pre>public <a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a> setFromAxis(<a href="../../../../com/badlogic/gdx/math/Vector3.html" title="class in com.badlogic.gdx.math">Vector3</a> axis,
|
|
float degrees)</pre>
|
|
<div class="block">Sets the quaternion components from the given axis and angle around that axis.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>axis</code> - The axis</dd>
|
|
<dd><code>degrees</code> - The angle in degrees</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>This quaternion for chaining.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="setFromAxisRad-com.badlogic.gdx.math.Vector3-float-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>setFromAxisRad</h4>
|
|
<pre>public <a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a> setFromAxisRad(<a href="../../../../com/badlogic/gdx/math/Vector3.html" title="class in com.badlogic.gdx.math">Vector3</a> axis,
|
|
float radians)</pre>
|
|
<div class="block">Sets the quaternion components from the given axis and angle around that axis.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>axis</code> - The axis</dd>
|
|
<dd><code>radians</code> - The angle in radians</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>This quaternion for chaining.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="setFromAxis-float-float-float-float-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>setFromAxis</h4>
|
|
<pre>public <a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a> setFromAxis(float x,
|
|
float y,
|
|
float z,
|
|
float degrees)</pre>
|
|
<div class="block">Sets the quaternion components from the given axis and angle around that axis.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>x</code> - X direction of the axis</dd>
|
|
<dd><code>y</code> - Y direction of the axis</dd>
|
|
<dd><code>z</code> - Z direction of the axis</dd>
|
|
<dd><code>degrees</code> - The angle in degrees</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>This quaternion for chaining.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="setFromAxisRad-float-float-float-float-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>setFromAxisRad</h4>
|
|
<pre>public <a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a> setFromAxisRad(float x,
|
|
float y,
|
|
float z,
|
|
float radians)</pre>
|
|
<div class="block">Sets the quaternion components from the given axis and angle around that axis.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>x</code> - X direction of the axis</dd>
|
|
<dd><code>y</code> - Y direction of the axis</dd>
|
|
<dd><code>z</code> - Z direction of the axis</dd>
|
|
<dd><code>radians</code> - The angle in radians</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>This quaternion for chaining.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="setFromMatrix-boolean-com.badlogic.gdx.math.Matrix4-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>setFromMatrix</h4>
|
|
<pre>public <a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a> setFromMatrix(boolean normalizeAxes,
|
|
<a href="../../../../com/badlogic/gdx/math/Matrix4.html" title="class in com.badlogic.gdx.math">Matrix4</a> matrix)</pre>
|
|
<div class="block">Sets the Quaternion from the given matrix, optionally removing any scaling.</div>
|
|
</li>
|
|
</ul>
|
|
<a name="setFromMatrix-com.badlogic.gdx.math.Matrix4-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>setFromMatrix</h4>
|
|
<pre>public <a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a> setFromMatrix(<a href="../../../../com/badlogic/gdx/math/Matrix4.html" title="class in com.badlogic.gdx.math">Matrix4</a> matrix)</pre>
|
|
<div class="block">Sets the Quaternion from the given rotation matrix, which must not contain scaling.</div>
|
|
</li>
|
|
</ul>
|
|
<a name="setFromMatrix-boolean-com.badlogic.gdx.math.Matrix3-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>setFromMatrix</h4>
|
|
<pre>public <a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a> setFromMatrix(boolean normalizeAxes,
|
|
<a href="../../../../com/badlogic/gdx/math/Matrix3.html" title="class in com.badlogic.gdx.math">Matrix3</a> matrix)</pre>
|
|
<div class="block">Sets the Quaternion from the given matrix, optionally removing any scaling.</div>
|
|
</li>
|
|
</ul>
|
|
<a name="setFromMatrix-com.badlogic.gdx.math.Matrix3-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>setFromMatrix</h4>
|
|
<pre>public <a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a> setFromMatrix(<a href="../../../../com/badlogic/gdx/math/Matrix3.html" title="class in com.badlogic.gdx.math">Matrix3</a> matrix)</pre>
|
|
<div class="block">Sets the Quaternion from the given rotation matrix, which must not contain scaling.</div>
|
|
</li>
|
|
</ul>
|
|
<a name="setFromAxes-float-float-float-float-float-float-float-float-float-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>setFromAxes</h4>
|
|
<pre>public <a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a> setFromAxes(float xx,
|
|
float xy,
|
|
float xz,
|
|
float yx,
|
|
float yy,
|
|
float yz,
|
|
float zx,
|
|
float zy,
|
|
float zz)</pre>
|
|
<div class="block"><p>
|
|
Sets the Quaternion from the given x-, y- and z-axis which have to be orthonormal.
|
|
</p>
|
|
|
|
<p>
|
|
Taken from Bones framework for JPCT, see http://www.aptalkarga.com/bones/ which in turn took it from Graphics Gem code at
|
|
ftp://ftp.cis.upenn.edu/pub/graphics/shoemake/quatut.ps.Z.
|
|
</p></div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>xx</code> - x-axis x-coordinate</dd>
|
|
<dd><code>xy</code> - x-axis y-coordinate</dd>
|
|
<dd><code>xz</code> - x-axis z-coordinate</dd>
|
|
<dd><code>yx</code> - y-axis x-coordinate</dd>
|
|
<dd><code>yy</code> - y-axis y-coordinate</dd>
|
|
<dd><code>yz</code> - y-axis z-coordinate</dd>
|
|
<dd><code>zx</code> - z-axis x-coordinate</dd>
|
|
<dd><code>zy</code> - z-axis y-coordinate</dd>
|
|
<dd><code>zz</code> - z-axis z-coordinate</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="setFromAxes-boolean-float-float-float-float-float-float-float-float-float-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>setFromAxes</h4>
|
|
<pre>public <a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a> setFromAxes(boolean normalizeAxes,
|
|
float xx,
|
|
float xy,
|
|
float xz,
|
|
float yx,
|
|
float yy,
|
|
float yz,
|
|
float zx,
|
|
float zy,
|
|
float zz)</pre>
|
|
<div class="block"><p>
|
|
Sets the Quaternion from the given x-, y- and z-axis.
|
|
</p>
|
|
|
|
<p>
|
|
Taken from Bones framework for JPCT, see http://www.aptalkarga.com/bones/ which in turn took it from Graphics Gem code at
|
|
ftp://ftp.cis.upenn.edu/pub/graphics/shoemake/quatut.ps.Z.
|
|
</p></div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>normalizeAxes</code> - whether to normalize the axes (necessary when they contain scaling)</dd>
|
|
<dd><code>xx</code> - x-axis x-coordinate</dd>
|
|
<dd><code>xy</code> - x-axis y-coordinate</dd>
|
|
<dd><code>xz</code> - x-axis z-coordinate</dd>
|
|
<dd><code>yx</code> - y-axis x-coordinate</dd>
|
|
<dd><code>yy</code> - y-axis y-coordinate</dd>
|
|
<dd><code>yz</code> - y-axis z-coordinate</dd>
|
|
<dd><code>zx</code> - z-axis x-coordinate</dd>
|
|
<dd><code>zy</code> - z-axis y-coordinate</dd>
|
|
<dd><code>zz</code> - z-axis z-coordinate</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="setFromCross-com.badlogic.gdx.math.Vector3-com.badlogic.gdx.math.Vector3-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>setFromCross</h4>
|
|
<pre>public <a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a> setFromCross(<a href="../../../../com/badlogic/gdx/math/Vector3.html" title="class in com.badlogic.gdx.math">Vector3</a> v1,
|
|
<a href="../../../../com/badlogic/gdx/math/Vector3.html" title="class in com.badlogic.gdx.math">Vector3</a> v2)</pre>
|
|
<div class="block">Set this quaternion to the rotation between two vectors.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>v1</code> - The base vector, which should be normalized.</dd>
|
|
<dd><code>v2</code> - The target vector, which should be normalized.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>This quaternion for chaining</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="setFromCross-float-float-float-float-float-float-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>setFromCross</h4>
|
|
<pre>public <a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a> setFromCross(float x1,
|
|
float y1,
|
|
float z1,
|
|
float x2,
|
|
float y2,
|
|
float z2)</pre>
|
|
<div class="block">Set this quaternion to the rotation between two vectors.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>x1</code> - The base vectors x value, which should be normalized.</dd>
|
|
<dd><code>y1</code> - The base vectors y value, which should be normalized.</dd>
|
|
<dd><code>z1</code> - The base vectors z value, which should be normalized.</dd>
|
|
<dd><code>x2</code> - The target vector x value, which should be normalized.</dd>
|
|
<dd><code>y2</code> - The target vector y value, which should be normalized.</dd>
|
|
<dd><code>z2</code> - The target vector z value, which should be normalized.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>This quaternion for chaining</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="slerp-com.badlogic.gdx.math.Quaternion-float-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>slerp</h4>
|
|
<pre>public <a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a> slerp(<a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a> end,
|
|
float alpha)</pre>
|
|
<div class="block">Spherical linear interpolation between this quaternion and the other quaternion, based on the alpha value in the range
|
|
[0,1]. Taken from Bones framework for JPCT, see http://www.aptalkarga.com/bones/</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>end</code> - the end quaternion</dd>
|
|
<dd><code>alpha</code> - alpha in the range [0,1]</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>this quaternion for chaining</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="slerp-com.badlogic.gdx.math.Quaternion:A-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>slerp</h4>
|
|
<pre>public <a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a> slerp(<a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a>[] q)</pre>
|
|
<div class="block">Spherical linearly interpolates multiple quaternions and stores the result in this Quaternion. Will not destroy the data
|
|
previously inside the elements of q. result = (q_1^w_1)*(q_2^w_2)* ... *(q_n^w_n) where w_i=1/n.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>q</code> - List of quaternions</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>This quaternion for chaining</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="slerp-com.badlogic.gdx.math.Quaternion:A-float:A-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>slerp</h4>
|
|
<pre>public <a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a> slerp(<a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a>[] q,
|
|
float[] w)</pre>
|
|
<div class="block">Spherical linearly interpolates multiple quaternions by the given weights and stores the result in this Quaternion. Will not
|
|
destroy the data previously inside the elements of q or w. result = (q_1^w_1)*(q_2^w_2)* ... *(q_n^w_n) where the sum of w_i
|
|
is 1. Lists must be equal in length.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>q</code> - List of quaternions</dd>
|
|
<dd><code>w</code> - List of weights</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>This quaternion for chaining</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="exp-float-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>exp</h4>
|
|
<pre>public <a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a> exp(float alpha)</pre>
|
|
<div class="block">Calculates (this quaternion)^alpha where alpha is a real number and stores the result in this quaternion. See
|
|
http://en.wikipedia.org/wiki/Quaternion#Exponential.2C_logarithm.2C_and_power</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>alpha</code> - Exponent</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>This quaternion for chaining</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="hashCode--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>hashCode</h4>
|
|
<pre>public int hashCode()</pre>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
|
|
<dd><code>hashCode</code> in class <code>java.lang.Object</code></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="equals-java.lang.Object-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>equals</h4>
|
|
<pre>public boolean equals(java.lang.Object obj)</pre>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
|
|
<dd><code>equals</code> in class <code>java.lang.Object</code></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="dot-float-float-float-float-float-float-float-float-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>dot</h4>
|
|
<pre>public static final float dot(float x1,
|
|
float y1,
|
|
float z1,
|
|
float w1,
|
|
float x2,
|
|
float y2,
|
|
float z2,
|
|
float w2)</pre>
|
|
<div class="block">Get the dot product between the two quaternions (commutative).</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>x1</code> - the x component of the first quaternion</dd>
|
|
<dd><code>y1</code> - the y component of the first quaternion</dd>
|
|
<dd><code>z1</code> - the z component of the first quaternion</dd>
|
|
<dd><code>w1</code> - the w component of the first quaternion</dd>
|
|
<dd><code>x2</code> - the x component of the second quaternion</dd>
|
|
<dd><code>y2</code> - the y component of the second quaternion</dd>
|
|
<dd><code>z2</code> - the z component of the second quaternion</dd>
|
|
<dd><code>w2</code> - the w component of the second quaternion</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the dot product between the first and second quaternion.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="dot-com.badlogic.gdx.math.Quaternion-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>dot</h4>
|
|
<pre>public float dot(<a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a> other)</pre>
|
|
<div class="block">Get the dot product between this and the other quaternion (commutative).</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>other</code> - the other quaternion.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the dot product of this and the other quaternion.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="dot-float-float-float-float-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>dot</h4>
|
|
<pre>public float dot(float x,
|
|
float y,
|
|
float z,
|
|
float w)</pre>
|
|
<div class="block">Get the dot product between this and the other quaternion (commutative).</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>x</code> - the x component of the other quaternion</dd>
|
|
<dd><code>y</code> - the y component of the other quaternion</dd>
|
|
<dd><code>z</code> - the z component of the other quaternion</dd>
|
|
<dd><code>w</code> - the w component of the other quaternion</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the dot product of this and the other quaternion.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="mul-float-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>mul</h4>
|
|
<pre>public <a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a> mul(float scalar)</pre>
|
|
<div class="block">Multiplies the components of this quaternion with the given scalar.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>scalar</code> - the scalar.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>this quaternion for chaining.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getAxisAngle-com.badlogic.gdx.math.Vector3-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getAxisAngle</h4>
|
|
<pre>public float getAxisAngle(<a href="../../../../com/badlogic/gdx/math/Vector3.html" title="class in com.badlogic.gdx.math">Vector3</a> axis)</pre>
|
|
<div class="block">Get the axis angle representation of the rotation in degrees. The supplied vector will receive the axis (x, y and z values)
|
|
of the rotation and the value returned is the angle in degrees around that axis. Note that this method will alter the
|
|
supplied vector, the existing value of the vector is ignored. </p> This will normalize this quaternion if needed. The
|
|
received axis is a unit vector. However, if this is an identity quaternion (no rotation), then the length of the axis may be
|
|
zero.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>axis</code> - vector which will receive the axis</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the angle in degrees</dd>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="http://en.wikipedia.org/wiki/Axis%E2%80%93angle_representation">wikipedia</a>,
|
|
<a href="http://www.euclideanspace.com/maths/geometry/rotations/conversions/quaternionToAngle">calculation</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getAxisAngleRad-com.badlogic.gdx.math.Vector3-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getAxisAngleRad</h4>
|
|
<pre>public float getAxisAngleRad(<a href="../../../../com/badlogic/gdx/math/Vector3.html" title="class in com.badlogic.gdx.math">Vector3</a> axis)</pre>
|
|
<div class="block">Get the axis-angle representation of the rotation in radians. The supplied vector will receive the axis (x, y and z values)
|
|
of the rotation and the value returned is the angle in radians around that axis. Note that this method will alter the
|
|
supplied vector, the existing value of the vector is ignored. </p> This will normalize this quaternion if needed. The
|
|
received axis is a unit vector. However, if this is an identity quaternion (no rotation), then the length of the axis may be
|
|
zero.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>axis</code> - vector which will receive the axis</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the angle in radians</dd>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="http://en.wikipedia.org/wiki/Axis%E2%80%93angle_representation">wikipedia</a>,
|
|
<a href="http://www.euclideanspace.com/maths/geometry/rotations/conversions/quaternionToAngle">calculation</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getAngleRad--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getAngleRad</h4>
|
|
<pre>public float getAngleRad()</pre>
|
|
<div class="block">Get the angle in radians of the rotation this quaternion represents. Does not normalize the quaternion. Use
|
|
<a href="../../../../com/badlogic/gdx/math/Quaternion.html#getAxisAngleRad-com.badlogic.gdx.math.Vector3-"><code>getAxisAngleRad(Vector3)</code></a> to get both the axis and the angle of this rotation. Use
|
|
<a href="../../../../com/badlogic/gdx/math/Quaternion.html#getAngleAroundRad-com.badlogic.gdx.math.Vector3-"><code>getAngleAroundRad(Vector3)</code></a> to get the angle around a specific axis.</div>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the angle in radians of the rotation</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getAngle--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getAngle</h4>
|
|
<pre>public float getAngle()</pre>
|
|
<div class="block">Get the angle in degrees of the rotation this quaternion represents. Use <a href="../../../../com/badlogic/gdx/math/Quaternion.html#getAxisAngle-com.badlogic.gdx.math.Vector3-"><code>getAxisAngle(Vector3)</code></a> to get both the axis
|
|
and the angle of this rotation. Use <a href="../../../../com/badlogic/gdx/math/Quaternion.html#getAngleAround-com.badlogic.gdx.math.Vector3-"><code>getAngleAround(Vector3)</code></a> to get the angle around a specific axis.</div>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the angle in degrees of the rotation</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getSwingTwist-float-float-float-com.badlogic.gdx.math.Quaternion-com.badlogic.gdx.math.Quaternion-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getSwingTwist</h4>
|
|
<pre>public void getSwingTwist(float axisX,
|
|
float axisY,
|
|
float axisZ,
|
|
<a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a> swing,
|
|
<a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a> twist)</pre>
|
|
<div class="block">Get the swing rotation and twist rotation for the specified axis. The twist rotation represents the rotation around the
|
|
specified axis. The swing rotation represents the rotation of the specified axis itself, which is the rotation around an
|
|
axis perpendicular to the specified axis. </p> The swing and twist rotation can be used to reconstruct the original
|
|
quaternion: this = swing * twist</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>axisX</code> - the X component of the normalized axis for which to get the swing and twist rotation</dd>
|
|
<dd><code>axisY</code> - the Y component of the normalized axis for which to get the swing and twist rotation</dd>
|
|
<dd><code>axisZ</code> - the Z component of the normalized axis for which to get the swing and twist rotation</dd>
|
|
<dd><code>swing</code> - will receive the swing rotation: the rotation around an axis perpendicular to the specified axis</dd>
|
|
<dd><code>twist</code> - will receive the twist rotation: the rotation around the specified axis</dd>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="http://www.euclideanspace.com/maths/geometry/rotations/for/decomposition">calculation</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getSwingTwist-com.badlogic.gdx.math.Vector3-com.badlogic.gdx.math.Quaternion-com.badlogic.gdx.math.Quaternion-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getSwingTwist</h4>
|
|
<pre>public void getSwingTwist(<a href="../../../../com/badlogic/gdx/math/Vector3.html" title="class in com.badlogic.gdx.math">Vector3</a> axis,
|
|
<a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a> swing,
|
|
<a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a> twist)</pre>
|
|
<div class="block">Get the swing rotation and twist rotation for the specified axis. The twist rotation represents the rotation around the
|
|
specified axis. The swing rotation represents the rotation of the specified axis itself, which is the rotation around an
|
|
axis perpendicular to the specified axis. </p> The swing and twist rotation can be used to reconstruct the original
|
|
quaternion: this = swing * twist</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>axis</code> - the normalized axis for which to get the swing and twist rotation</dd>
|
|
<dd><code>swing</code> - will receive the swing rotation: the rotation around an axis perpendicular to the specified axis</dd>
|
|
<dd><code>twist</code> - will receive the twist rotation: the rotation around the specified axis</dd>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="http://www.euclideanspace.com/maths/geometry/rotations/for/decomposition">calculation</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getAngleAroundRad-float-float-float-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getAngleAroundRad</h4>
|
|
<pre>public float getAngleAroundRad(float axisX,
|
|
float axisY,
|
|
float axisZ)</pre>
|
|
<div class="block">Get the angle in radians of the rotation around the specified axis. The axis must be normalized.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>axisX</code> - the x component of the normalized axis for which to get the angle</dd>
|
|
<dd><code>axisY</code> - the y component of the normalized axis for which to get the angle</dd>
|
|
<dd><code>axisZ</code> - the z component of the normalized axis for which to get the angle</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the angle in radians of the rotation around the specified axis</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getAngleAroundRad-com.badlogic.gdx.math.Vector3-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getAngleAroundRad</h4>
|
|
<pre>public float getAngleAroundRad(<a href="../../../../com/badlogic/gdx/math/Vector3.html" title="class in com.badlogic.gdx.math">Vector3</a> axis)</pre>
|
|
<div class="block">Get the angle in radians of the rotation around the specified axis. The axis must be normalized.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>axis</code> - the normalized axis for which to get the angle</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the angle in radians of the rotation around the specified axis</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getAngleAround-float-float-float-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getAngleAround</h4>
|
|
<pre>public float getAngleAround(float axisX,
|
|
float axisY,
|
|
float axisZ)</pre>
|
|
<div class="block">Get the angle in degrees of the rotation around the specified axis. The axis must be normalized.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>axisX</code> - the x component of the normalized axis for which to get the angle</dd>
|
|
<dd><code>axisY</code> - the y component of the normalized axis for which to get the angle</dd>
|
|
<dd><code>axisZ</code> - the z component of the normalized axis for which to get the angle</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the angle in degrees of the rotation around the specified axis</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getAngleAround-com.badlogic.gdx.math.Vector3-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>getAngleAround</h4>
|
|
<pre>public float getAngleAround(<a href="../../../../com/badlogic/gdx/math/Vector3.html" title="class in com.badlogic.gdx.math">Vector3</a> axis)</pre>
|
|
<div class="block">Get the angle in degrees of the rotation around the specified axis. The axis must be normalized.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>axis</code> - the normalized axis for which to get the angle</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the angle in degrees of the rotation around the specified axis</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<!-- ========= END OF CLASS DATA ========= -->
|
|
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
|
<div class="bottomNav"><a name="navbar.bottom">
|
|
<!-- -->
|
|
</a>
|
|
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
|
|
<a name="navbar.bottom.firstrow">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="navList" title="Navigation">
|
|
<li><a href="../../../../overview-summary.html">Overview</a></li>
|
|
<li><a href="package-summary.html">Package</a></li>
|
|
<li class="navBarCell1Rev">Class</li>
|
|
<li><a href="class-use/Quaternion.html">Use</a></li>
|
|
<li><a href="package-tree.html">Tree</a></li>
|
|
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
|
|
<li><a href="../../../../index-all.html">Index</a></li>
|
|
<li><a href="../../../../help-doc.html">Help</a></li>
|
|
</ul>
|
|
<div class="aboutLanguage">libgdx API</div>
|
|
</div>
|
|
<div class="subNav">
|
|
<ul class="navList">
|
|
<li><a href="../../../../com/badlogic/gdx/math/Polyline.html" title="class in com.badlogic.gdx.math"><span class="typeNameLink">Prev Class</span></a></li>
|
|
<li><a href="../../../../com/badlogic/gdx/math/RandomXS128.html" title="class in com.badlogic.gdx.math"><span class="typeNameLink">Next Class</span></a></li>
|
|
</ul>
|
|
<ul class="navList">
|
|
<li><a href="../../../../index.html?com/badlogic/gdx/math/Quaternion.html" target="_top">Frames</a></li>
|
|
<li><a href="Quaternion.html" target="_top">No Frames</a></li>
|
|
</ul>
|
|
<ul class="navList" id="allclasses_navbar_bottom">
|
|
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
|
|
</ul>
|
|
<div>
|
|
<script type="text/javascript"><!--
|
|
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
|
if(window==top) {
|
|
allClassesLink.style.display = "block";
|
|
}
|
|
else {
|
|
allClassesLink.style.display = "none";
|
|
}
|
|
//-->
|
|
</script>
|
|
</div>
|
|
<div>
|
|
<ul class="subNavList">
|
|
<li>Summary: </li>
|
|
<li>Nested | </li>
|
|
<li><a href="#field.summary">Field</a> | </li>
|
|
<li><a href="#constructor.summary">Constr</a> | </li>
|
|
<li><a href="#method.summary">Method</a></li>
|
|
</ul>
|
|
<ul class="subNavList">
|
|
<li>Detail: </li>
|
|
<li><a href="#field.detail">Field</a> | </li>
|
|
<li><a href="#constructor.detail">Constr</a> | </li>
|
|
<li><a href="#method.detail">Method</a></li>
|
|
</ul>
|
|
</div>
|
|
<a name="skip.navbar.bottom">
|
|
<!-- -->
|
|
</a></div>
|
|
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
|
<p class="legalCopy"><small>
|
|
<div style="font-size:9pt"><i>
|
|
Copyright © 2010-2013 Mario Zechner (contact@badlogicgames.com), Nathan Sweet (admin@esotericsoftware.com)
|
|
</i></div>
|
|
</small></p>
|
|
</body>
|
|
</html>
|