ardupilot/libraries/doc/html/matrix3_8h_source.html

175 lines
31 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>ArduPilot Libraries: matrix3.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javaScript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.7.1 -->
<div class="navigation" id="top">
<div class="tabs">
<ul class="tablist">
<li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&nbsp;List</span></a></li>
<li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
</ul>
</div>
<div class="header">
<div class="headertitle">
<h1>matrix3.h</h1> </div>
</div>
<div class="contents">
<a href="matrix3_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: t -*-</span>
<a name="l00002"></a>00002
<a name="l00003"></a>00003 <span class="comment">// Copyright 2010 Michael Smith, all rights reserved.</span>
<a name="l00004"></a>00004
<a name="l00005"></a>00005 <span class="comment">// This library is free software; you can redistribute it and / or</span>
<a name="l00006"></a>00006 <span class="comment">// modify it under the terms of the GNU Lesser General Public</span>
<a name="l00007"></a>00007 <span class="comment">// License as published by the Free Software Foundation; either</span>
<a name="l00008"></a>00008 <span class="comment">// version 2.1 of the License, or (at your option) any later version.</span>
<a name="l00009"></a>00009
<a name="l00010"></a>00010 <span class="comment">// Inspired by:</span>
<a name="l00011"></a>00011 <span class="comment">/****************************************</span>
<a name="l00012"></a>00012 <span class="comment"> * 3D Vector Classes</span>
<a name="l00013"></a>00013 <span class="comment"> * By Bill Perone (billperone@yahoo.com)</span>
<a name="l00014"></a>00014 <span class="comment"> */</span>
<a name="l00015"></a>00015
<a name="l00016"></a>00016 <span class="comment">//</span>
<a name="l00017"></a>00017 <span class="comment">// 3x3 matrix implementation.</span>
<a name="l00018"></a>00018 <span class="comment">//</span>
<a name="l00019"></a>00019 <span class="comment">// Note that the matrix is organised in row-normal form (the same as</span>
<a name="l00020"></a>00020 <span class="comment">// applies to array indexing).</span>
<a name="l00021"></a>00021 <span class="comment">//</span>
<a name="l00022"></a>00022 <span class="comment">// In addition to the template, this header defines the following types:</span>
<a name="l00023"></a>00023 <span class="comment">//</span>
<a name="l00024"></a>00024 <span class="comment">// Matrix3i 3x3 matrix of signed integers</span>
<a name="l00025"></a>00025 <span class="comment">// Matrix3ui 3x3 matrix of unsigned integers</span>
<a name="l00026"></a>00026 <span class="comment">// Matrix3l 3x3 matrix of signed longs</span>
<a name="l00027"></a>00027 <span class="comment">// Matrix3ul 3x3 matrix of unsigned longs</span>
<a name="l00028"></a>00028 <span class="comment">// Matrix3f 3x3 matrix of signed floats</span>
<a name="l00029"></a>00029 <span class="comment">//</span>
<a name="l00030"></a>00030
<a name="l00031"></a>00031 <span class="preprocessor">#ifndef MATRIX3_H</span>
<a name="l00032"></a>00032 <span class="preprocessor"></span><span class="preprocessor">#define MATRIX3_H</span>
<a name="l00033"></a>00033 <span class="preprocessor"></span>
<a name="l00034"></a>00034 <span class="preprocessor">#include &quot;<a class="code" href="vector3_8h.html">vector3.h</a>&quot;</span>
<a name="l00035"></a>00035
<a name="l00036"></a>00036 <span class="comment">// 3x3 matrix with elements of type T</span>
<a name="l00037"></a>00037 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;
<a name="l00038"></a><a class="code" href="class_matrix3.html">00038</a> <span class="keyword">class </span><a class="code" href="class_matrix3.html">Matrix3</a> {
<a name="l00039"></a>00039 <span class="keyword">public</span>:
<a name="l00040"></a>00040
<a name="l00041"></a>00041 <span class="comment">// Vectors comprising the rows of the matrix</span>
<a name="l00042"></a><a class="code" href="class_matrix3.html#a7efa0e7bd4c621a7fe76cd9168960b94">00042</a> <a class="code" href="class_vector3.html">Vector3&lt;T&gt;</a> <a class="code" href="class_matrix3.html#acd7bf3421047fa155168a9c8e5164a2b">a</a>, <a class="code" href="class_matrix3.html#ae16bed039ad87c3337f15837c33fe2fb">b</a>, <a class="code" href="class_matrix3.html#a7efa0e7bd4c621a7fe76cd9168960b94">c</a>;
<a name="l00043"></a>00043
<a name="l00044"></a>00044 <span class="comment">// trivial ctor</span>
<a name="l00045"></a>00045 <span class="comment">// note that the Vector3 ctor will zero the vector elements</span>
<a name="l00046"></a>00046 <a class="code" href="class_matrix3.html">Matrix3&lt;T&gt;</a>() {}
<a name="l00047"></a>00047
<a name="l00048"></a>00048 <span class="comment">// setting ctor</span>
<a name="l00049"></a>00049 <a class="code" href="class_matrix3.html">Matrix3&lt;T&gt;</a>(<span class="keyword">const</span> <a class="code" href="class_vector3.html">Vector3&lt;T&gt;</a> a0, <span class="keyword">const</span> <a class="code" href="class_vector3.html">Vector3&lt;T&gt;</a> b0, <span class="keyword">const</span> <a class="code" href="class_vector3.html">Vector3&lt;T&gt;</a> c0): <a class="code" href="class_matrix3.html#acd7bf3421047fa155168a9c8e5164a2b">a</a>(a0), <a class="code" href="class_matrix3.html#ae16bed039ad87c3337f15837c33fe2fb">b</a>(b0), <a class="code" href="class_matrix3.html#a7efa0e7bd4c621a7fe76cd9168960b94">c</a>(c0) {}
<a name="l00050"></a>00050
<a name="l00051"></a>00051 <span class="comment">// setting ctor</span>
<a name="l00052"></a>00052 <a class="code" href="class_matrix3.html">Matrix3&lt;T&gt;</a>(<span class="keyword">const</span> T ax, <span class="keyword">const</span> T ay, <span class="keyword">const</span> T az, <span class="keyword">const</span> T bx, <span class="keyword">const</span> T by, <span class="keyword">const</span> T bz, <span class="keyword">const</span> T cx, <span class="keyword">const</span> T cy, <span class="keyword">const</span> T cz): <a class="code" href="class_matrix3.html#acd7bf3421047fa155168a9c8e5164a2b">a</a>(ax,ay,az), <a class="code" href="class_matrix3.html#ae16bed039ad87c3337f15837c33fe2fb">b</a>(bx,by,bz), <a class="code" href="class_matrix3.html#a7efa0e7bd4c621a7fe76cd9168960b94">c</a>(cx,cy,cz) {}
<a name="l00053"></a>00053
<a name="l00054"></a>00054 <span class="comment">// function call operator</span>
<a name="l00055"></a><a class="code" href="class_matrix3.html#a359812978d34eed653cb89866668d252">00055</a> <span class="keywordtype">void</span> <a class="code" href="class_matrix3.html#a359812978d34eed653cb89866668d252">operator () </a>(<span class="keyword">const</span> <a class="code" href="class_vector3.html">Vector3&lt;T&gt;</a> a0, <span class="keyword">const</span> <a class="code" href="class_vector3.html">Vector3&lt;T&gt;</a> b0, <span class="keyword">const</span> <a class="code" href="class_vector3.html">Vector3&lt;T&gt;</a> c0)
<a name="l00056"></a>00056 { <a class="code" href="class_matrix3.html#acd7bf3421047fa155168a9c8e5164a2b">a</a> = a0; <a class="code" href="class_matrix3.html#ae16bed039ad87c3337f15837c33fe2fb">b</a> = b0; <a class="code" href="class_matrix3.html#a7efa0e7bd4c621a7fe76cd9168960b94">c</a> = c0; }
<a name="l00057"></a>00057
<a name="l00058"></a>00058 <span class="comment">// test for equality</span>
<a name="l00059"></a><a class="code" href="class_matrix3.html#a9873dd941aa4a6b9e97bb42ab3af2748">00059</a> <span class="keywordtype">bool</span> <a class="code" href="class_matrix3.html#a9873dd941aa4a6b9e97bb42ab3af2748">operator == </a>(<span class="keyword">const</span> <a class="code" href="class_matrix3.html">Matrix3&lt;T&gt;</a> &amp;m)
<a name="l00060"></a>00060 { <span class="keywordflow">return</span> (<a class="code" href="class_matrix3.html#acd7bf3421047fa155168a9c8e5164a2b">a</a>==m.<a class="code" href="class_matrix3.html#acd7bf3421047fa155168a9c8e5164a2b">a</a> &amp;&amp; <a class="code" href="class_matrix3.html#ae16bed039ad87c3337f15837c33fe2fb">b</a>==m.<a class="code" href="class_matrix3.html#ae16bed039ad87c3337f15837c33fe2fb">b</a> &amp;&amp; <a class="code" href="class_matrix3.html#a7efa0e7bd4c621a7fe76cd9168960b94">c</a>==m.<a class="code" href="class_matrix3.html#a7efa0e7bd4c621a7fe76cd9168960b94">c</a>); }
<a name="l00061"></a>00061
<a name="l00062"></a>00062 <span class="comment">// test for inequality</span>
<a name="l00063"></a><a class="code" href="class_matrix3.html#ac38ed6c4592bf64a86c447d7b4754067">00063</a> <span class="keywordtype">bool</span> <a class="code" href="class_matrix3.html#ac38ed6c4592bf64a86c447d7b4754067">operator != </a>(<span class="keyword">const</span> <a class="code" href="class_matrix3.html">Matrix3&lt;T&gt;</a> &amp;m)
<a name="l00064"></a>00064 { <span class="keywordflow">return</span> (<a class="code" href="class_matrix3.html#acd7bf3421047fa155168a9c8e5164a2b">a</a>!=m.<a class="code" href="class_matrix3.html#acd7bf3421047fa155168a9c8e5164a2b">a</a> || <a class="code" href="class_matrix3.html#ae16bed039ad87c3337f15837c33fe2fb">b</a>!=m.<a class="code" href="class_matrix3.html#ae16bed039ad87c3337f15837c33fe2fb">b</a> || <a class="code" href="class_matrix3.html#a7efa0e7bd4c621a7fe76cd9168960b94">c</a>!=m.<a class="code" href="class_matrix3.html#a7efa0e7bd4c621a7fe76cd9168960b94">c</a>); }
<a name="l00065"></a>00065
<a name="l00066"></a>00066 <span class="comment">// negation</span>
<a name="l00067"></a><a class="code" href="class_matrix3.html#a0ccb90de17a5e0f97ef96244c437ca91">00067</a> <a class="code" href="class_matrix3.html">Matrix3&lt;T&gt;</a> <a class="code" href="class_matrix3.html#a0ccb90de17a5e0f97ef96244c437ca91">operator - </a>(<span class="keywordtype">void</span>)<span class="keyword"> const</span>
<a name="l00068"></a>00068 <span class="keyword"> </span>{ <span class="keywordflow">return</span> <a class="code" href="class_matrix3.html">Matrix3&lt;T&gt;</a>(-<a class="code" href="class_matrix3.html#acd7bf3421047fa155168a9c8e5164a2b">a</a>,-<a class="code" href="class_matrix3.html#ae16bed039ad87c3337f15837c33fe2fb">b</a>,-<a class="code" href="class_matrix3.html#a7efa0e7bd4c621a7fe76cd9168960b94">c</a>); }
<a name="l00069"></a>00069
<a name="l00070"></a>00070 <span class="comment">// addition</span>
<a name="l00071"></a><a class="code" href="class_matrix3.html#affab8deb97aa3419a0abf2454519324f">00071</a> <a class="code" href="class_matrix3.html">Matrix3&lt;T&gt;</a> <a class="code" href="class_matrix3.html#affab8deb97aa3419a0abf2454519324f">operator + </a>(<span class="keyword">const</span> <a class="code" href="class_matrix3.html">Matrix3&lt;T&gt;</a> &amp;m)<span class="keyword"> const</span>
<a name="l00072"></a>00072 <span class="keyword"> </span>{ <span class="keywordflow">return</span> <a class="code" href="class_matrix3.html">Matrix3&lt;T&gt;</a>(<a class="code" href="class_matrix3.html#acd7bf3421047fa155168a9c8e5164a2b">a</a>+m.<a class="code" href="class_matrix3.html#acd7bf3421047fa155168a9c8e5164a2b">a</a>, <a class="code" href="class_matrix3.html#ae16bed039ad87c3337f15837c33fe2fb">b</a>+m.<a class="code" href="class_matrix3.html#ae16bed039ad87c3337f15837c33fe2fb">b</a>, <a class="code" href="class_matrix3.html#a7efa0e7bd4c621a7fe76cd9168960b94">c</a>+m.<a class="code" href="class_matrix3.html#a7efa0e7bd4c621a7fe76cd9168960b94">c</a>); }
<a name="l00073"></a><a class="code" href="class_matrix3.html#adcb412102865ced2e83c9347b0f171be">00073</a> <a class="code" href="class_matrix3.html">Matrix3&lt;T&gt;</a> &amp;<a class="code" href="class_matrix3.html#adcb412102865ced2e83c9347b0f171be">operator += </a>(<span class="keyword">const</span> <a class="code" href="class_matrix3.html">Matrix3&lt;T&gt;</a> &amp;m)
<a name="l00074"></a>00074 { <span class="keywordflow">return</span> *<span class="keyword">this</span> = *<span class="keyword">this</span> + m; }
<a name="l00075"></a>00075
<a name="l00076"></a>00076 <span class="comment">// subtraction</span>
<a name="l00077"></a><a class="code" href="class_matrix3.html#ab45bb648db3c0e36354c34ae2665aeeb">00077</a> <a class="code" href="class_matrix3.html">Matrix3&lt;T&gt;</a> <a class="code" href="class_matrix3.html#a0ccb90de17a5e0f97ef96244c437ca91">operator - </a>(<span class="keyword">const</span> <a class="code" href="class_matrix3.html">Matrix3&lt;T&gt;</a> &amp;m)<span class="keyword"> const</span>
<a name="l00078"></a>00078 <span class="keyword"> </span>{ <span class="keywordflow">return</span> <a class="code" href="class_matrix3.html">Matrix3&lt;T&gt;</a>(<a class="code" href="class_matrix3.html#acd7bf3421047fa155168a9c8e5164a2b">a</a>-m.<a class="code" href="class_matrix3.html#acd7bf3421047fa155168a9c8e5164a2b">a</a>, <a class="code" href="class_matrix3.html#ae16bed039ad87c3337f15837c33fe2fb">b</a>-m.<a class="code" href="class_matrix3.html#ae16bed039ad87c3337f15837c33fe2fb">b</a>, <a class="code" href="class_matrix3.html#a7efa0e7bd4c621a7fe76cd9168960b94">c</a>-m.<a class="code" href="class_matrix3.html#a7efa0e7bd4c621a7fe76cd9168960b94">c</a>); }
<a name="l00079"></a><a class="code" href="class_matrix3.html#a9a04390604c46988dda79e6d547a2539">00079</a> <a class="code" href="class_matrix3.html">Matrix3&lt;T&gt;</a> &amp;<a class="code" href="class_matrix3.html#a9a04390604c46988dda79e6d547a2539">operator -= </a>(<span class="keyword">const</span> <a class="code" href="class_matrix3.html">Matrix3&lt;T&gt;</a> &amp;m)
<a name="l00080"></a>00080 { <span class="keywordflow">return</span> *<span class="keyword">this</span> = *<span class="keyword">this</span> - m; }
<a name="l00081"></a>00081
<a name="l00082"></a>00082 <span class="comment">// uniform scaling</span>
<a name="l00083"></a><a class="code" href="class_matrix3.html#aeb696742e5106f027fbd67da9f806c03">00083</a> <a class="code" href="class_matrix3.html">Matrix3&lt;T&gt;</a> <a class="code" href="class_matrix3.html#aeb696742e5106f027fbd67da9f806c03">operator * </a>(<span class="keyword">const</span> T num)<span class="keyword"> const</span>
<a name="l00084"></a>00084 <span class="keyword"> </span>{ <span class="keywordflow">return</span> <a class="code" href="class_matrix3.html">Matrix3&lt;T&gt;</a>(<a class="code" href="class_matrix3.html#acd7bf3421047fa155168a9c8e5164a2b">a</a>*num, <a class="code" href="class_matrix3.html#ae16bed039ad87c3337f15837c33fe2fb">b</a>*num, <a class="code" href="class_matrix3.html#a7efa0e7bd4c621a7fe76cd9168960b94">c</a>*num); }
<a name="l00085"></a><a class="code" href="class_matrix3.html#ac2f48dbd5997faf74db3e177ac868261">00085</a> <a class="code" href="class_matrix3.html">Matrix3&lt;T&gt;</a> &amp;<a class="code" href="class_matrix3.html#ac2f48dbd5997faf74db3e177ac868261">operator *= </a>(<span class="keyword">const</span> T num)
<a name="l00086"></a>00086 { <span class="keywordflow">return</span> *<span class="keyword">this</span> = *<span class="keyword">this</span> * num; }
<a name="l00087"></a><a class="code" href="class_matrix3.html#a5de5be1ceead300371ab049cfea51397">00087</a> <a class="code" href="class_matrix3.html">Matrix3&lt;T&gt;</a> <a class="code" href="class_matrix3.html#a5de5be1ceead300371ab049cfea51397">operator / </a>(<span class="keyword">const</span> T num)<span class="keyword"> const</span>
<a name="l00088"></a>00088 <span class="keyword"> </span>{ <span class="keywordflow">return</span> <a class="code" href="class_matrix3.html">Matrix3&lt;T&gt;</a>(<a class="code" href="class_matrix3.html#acd7bf3421047fa155168a9c8e5164a2b">a</a>/num, <a class="code" href="class_matrix3.html#ae16bed039ad87c3337f15837c33fe2fb">b</a>/num, <a class="code" href="class_matrix3.html#a7efa0e7bd4c621a7fe76cd9168960b94">c</a>/num); }
<a name="l00089"></a><a class="code" href="class_matrix3.html#a8c0fb209e005300870b33b07ebb6a553">00089</a> <a class="code" href="class_matrix3.html">Matrix3&lt;T&gt;</a> &amp;<a class="code" href="class_matrix3.html#a8c0fb209e005300870b33b07ebb6a553">operator /= </a>(<span class="keyword">const</span> T num)
<a name="l00090"></a>00090 { <span class="keywordflow">return</span> *<span class="keyword">this</span> = *<span class="keyword">this</span> / num; }
<a name="l00091"></a>00091
<a name="l00092"></a>00092 <span class="comment">// multiplication by a vector</span>
<a name="l00093"></a><a class="code" href="class_matrix3.html#a3854aafa300701937ebe3ba9a7148e96">00093</a> <a class="code" href="class_vector3.html">Vector3&lt;T&gt;</a> <a class="code" href="class_matrix3.html#aeb696742e5106f027fbd67da9f806c03">operator *</a>(<span class="keyword">const</span> <a class="code" href="class_vector3.html">Vector3&lt;T&gt;</a> &amp;v)<span class="keyword"> const</span>
<a name="l00094"></a>00094 <span class="keyword"> </span>{
<a name="l00095"></a>00095 <span class="keywordflow">return</span> <a class="code" href="class_vector3.html">Vector3&lt;T&gt;</a>(<a class="code" href="class_matrix3.html#acd7bf3421047fa155168a9c8e5164a2b">a</a>.x * v.<a class="code" href="class_vector3.html#a1a0f7e168c71ca798099f0ba8a444244">x</a> + <a class="code" href="class_matrix3.html#acd7bf3421047fa155168a9c8e5164a2b">a</a>.y * v.<a class="code" href="class_vector3.html#a561df88b28e106e337a25bb86554a569">y</a> + <a class="code" href="class_matrix3.html#acd7bf3421047fa155168a9c8e5164a2b">a</a>.z * v.<a class="code" href="class_vector3.html#ab3e7f5401dd6e951978bfa746809f74f">z</a>,
<a name="l00096"></a>00096 <a class="code" href="class_matrix3.html#ae16bed039ad87c3337f15837c33fe2fb">b</a>.x * v.<a class="code" href="class_vector3.html#a1a0f7e168c71ca798099f0ba8a444244">x</a> + <a class="code" href="class_matrix3.html#ae16bed039ad87c3337f15837c33fe2fb">b</a>.y * v.<a class="code" href="class_vector3.html#a561df88b28e106e337a25bb86554a569">y</a> + <a class="code" href="class_matrix3.html#ae16bed039ad87c3337f15837c33fe2fb">b</a>.z * v.<a class="code" href="class_vector3.html#ab3e7f5401dd6e951978bfa746809f74f">z</a>,
<a name="l00097"></a>00097 <a class="code" href="class_matrix3.html#a7efa0e7bd4c621a7fe76cd9168960b94">c</a>.x * v.<a class="code" href="class_vector3.html#a1a0f7e168c71ca798099f0ba8a444244">x</a> + <a class="code" href="class_matrix3.html#a7efa0e7bd4c621a7fe76cd9168960b94">c</a>.y * v.<a class="code" href="class_vector3.html#a561df88b28e106e337a25bb86554a569">y</a> + <a class="code" href="class_matrix3.html#a7efa0e7bd4c621a7fe76cd9168960b94">c</a>.z * v.<a class="code" href="class_vector3.html#ab3e7f5401dd6e951978bfa746809f74f">z</a>);
<a name="l00098"></a>00098 }
<a name="l00099"></a>00099
<a name="l00100"></a>00100 <span class="comment">// multiplication by another Matrix3&lt;T&gt;</span>
<a name="l00101"></a><a class="code" href="class_matrix3.html#a196da5f6e91871e7e2ab18e5beffb3da">00101</a> <a class="code" href="class_matrix3.html">Matrix3&lt;T&gt;</a> <a class="code" href="class_matrix3.html#aeb696742e5106f027fbd67da9f806c03">operator *</a>(<span class="keyword">const</span> <a class="code" href="class_matrix3.html">Matrix3&lt;T&gt;</a> &amp;m)<span class="keyword"> const</span>
<a name="l00102"></a>00102 <span class="keyword"> </span>{
<a name="l00103"></a>00103 <a class="code" href="class_matrix3.html">Matrix3&lt;T&gt;</a> temp (<a class="code" href="class_vector3.html">Vector3&lt;T&gt;</a>(<a class="code" href="class_matrix3.html#acd7bf3421047fa155168a9c8e5164a2b">a</a>.x * m.<a class="code" href="class_matrix3.html#acd7bf3421047fa155168a9c8e5164a2b">a</a>.x + <a class="code" href="class_matrix3.html#acd7bf3421047fa155168a9c8e5164a2b">a</a>.y * m.<a class="code" href="class_matrix3.html#ae16bed039ad87c3337f15837c33fe2fb">b</a>.x + <a class="code" href="class_matrix3.html#acd7bf3421047fa155168a9c8e5164a2b">a</a>.z * m.<a class="code" href="class_matrix3.html#a7efa0e7bd4c621a7fe76cd9168960b94">c</a>.x,
<a name="l00104"></a>00104 <a class="code" href="class_matrix3.html#acd7bf3421047fa155168a9c8e5164a2b">a</a>.x * m.<a class="code" href="class_matrix3.html#acd7bf3421047fa155168a9c8e5164a2b">a</a>.y + <a class="code" href="class_matrix3.html#acd7bf3421047fa155168a9c8e5164a2b">a</a>.y * m.<a class="code" href="class_matrix3.html#ae16bed039ad87c3337f15837c33fe2fb">b</a>.y + <a class="code" href="class_matrix3.html#acd7bf3421047fa155168a9c8e5164a2b">a</a>.z * m.<a class="code" href="class_matrix3.html#a7efa0e7bd4c621a7fe76cd9168960b94">c</a>.y,
<a name="l00105"></a>00105 <a class="code" href="class_matrix3.html#acd7bf3421047fa155168a9c8e5164a2b">a</a>.x * m.<a class="code" href="class_matrix3.html#acd7bf3421047fa155168a9c8e5164a2b">a</a>.z + <a class="code" href="class_matrix3.html#acd7bf3421047fa155168a9c8e5164a2b">a</a>.y * m.<a class="code" href="class_matrix3.html#ae16bed039ad87c3337f15837c33fe2fb">b</a>.z + <a class="code" href="class_matrix3.html#acd7bf3421047fa155168a9c8e5164a2b">a</a>.z * m.<a class="code" href="class_matrix3.html#a7efa0e7bd4c621a7fe76cd9168960b94">c</a>.z),
<a name="l00106"></a>00106 <a class="code" href="class_vector3.html">Vector3&lt;T&gt;</a>(<a class="code" href="class_matrix3.html#ae16bed039ad87c3337f15837c33fe2fb">b</a>.x * m.<a class="code" href="class_matrix3.html#acd7bf3421047fa155168a9c8e5164a2b">a</a>.x + <a class="code" href="class_matrix3.html#ae16bed039ad87c3337f15837c33fe2fb">b</a>.y * m.<a class="code" href="class_matrix3.html#ae16bed039ad87c3337f15837c33fe2fb">b</a>.x + <a class="code" href="class_matrix3.html#ae16bed039ad87c3337f15837c33fe2fb">b</a>.z * m.<a class="code" href="class_matrix3.html#a7efa0e7bd4c621a7fe76cd9168960b94">c</a>.x,
<a name="l00107"></a>00107 <a class="code" href="class_matrix3.html#ae16bed039ad87c3337f15837c33fe2fb">b</a>.x * m.<a class="code" href="class_matrix3.html#acd7bf3421047fa155168a9c8e5164a2b">a</a>.y + <a class="code" href="class_matrix3.html#ae16bed039ad87c3337f15837c33fe2fb">b</a>.y * m.<a class="code" href="class_matrix3.html#ae16bed039ad87c3337f15837c33fe2fb">b</a>.y + <a class="code" href="class_matrix3.html#ae16bed039ad87c3337f15837c33fe2fb">b</a>.z * m.<a class="code" href="class_matrix3.html#a7efa0e7bd4c621a7fe76cd9168960b94">c</a>.y,
<a name="l00108"></a>00108 <a class="code" href="class_matrix3.html#ae16bed039ad87c3337f15837c33fe2fb">b</a>.x * m.<a class="code" href="class_matrix3.html#acd7bf3421047fa155168a9c8e5164a2b">a</a>.z + <a class="code" href="class_matrix3.html#ae16bed039ad87c3337f15837c33fe2fb">b</a>.y * m.<a class="code" href="class_matrix3.html#ae16bed039ad87c3337f15837c33fe2fb">b</a>.z + <a class="code" href="class_matrix3.html#ae16bed039ad87c3337f15837c33fe2fb">b</a>.z * m.<a class="code" href="class_matrix3.html#a7efa0e7bd4c621a7fe76cd9168960b94">c</a>.z),
<a name="l00109"></a>00109 <a class="code" href="class_vector3.html">Vector3&lt;T&gt;</a>(<a class="code" href="class_matrix3.html#a7efa0e7bd4c621a7fe76cd9168960b94">c</a>.x * m.<a class="code" href="class_matrix3.html#acd7bf3421047fa155168a9c8e5164a2b">a</a>.x + <a class="code" href="class_matrix3.html#a7efa0e7bd4c621a7fe76cd9168960b94">c</a>.y * m.<a class="code" href="class_matrix3.html#ae16bed039ad87c3337f15837c33fe2fb">b</a>.x + <a class="code" href="class_matrix3.html#a7efa0e7bd4c621a7fe76cd9168960b94">c</a>.z * m.<a class="code" href="class_matrix3.html#a7efa0e7bd4c621a7fe76cd9168960b94">c</a>.x,
<a name="l00110"></a>00110 <a class="code" href="class_matrix3.html#a7efa0e7bd4c621a7fe76cd9168960b94">c</a>.x * m.<a class="code" href="class_matrix3.html#acd7bf3421047fa155168a9c8e5164a2b">a</a>.y + <a class="code" href="class_matrix3.html#a7efa0e7bd4c621a7fe76cd9168960b94">c</a>.y * m.<a class="code" href="class_matrix3.html#ae16bed039ad87c3337f15837c33fe2fb">b</a>.y + <a class="code" href="class_matrix3.html#a7efa0e7bd4c621a7fe76cd9168960b94">c</a>.z * m.<a class="code" href="class_matrix3.html#a7efa0e7bd4c621a7fe76cd9168960b94">c</a>.y,
<a name="l00111"></a>00111 <a class="code" href="class_matrix3.html#a7efa0e7bd4c621a7fe76cd9168960b94">c</a>.x * m.<a class="code" href="class_matrix3.html#acd7bf3421047fa155168a9c8e5164a2b">a</a>.z + <a class="code" href="class_matrix3.html#a7efa0e7bd4c621a7fe76cd9168960b94">c</a>.y * m.<a class="code" href="class_matrix3.html#ae16bed039ad87c3337f15837c33fe2fb">b</a>.z + <a class="code" href="class_matrix3.html#a7efa0e7bd4c621a7fe76cd9168960b94">c</a>.z * m.<a class="code" href="class_matrix3.html#a7efa0e7bd4c621a7fe76cd9168960b94">c</a>.z));
<a name="l00112"></a>00112 <span class="keywordflow">return</span> temp;
<a name="l00113"></a>00113 }
<a name="l00114"></a><a class="code" href="class_matrix3.html#a2a30505165c5123ae7037cad81293820">00114</a> <a class="code" href="class_matrix3.html">Matrix3&lt;T&gt;</a> &amp;<a class="code" href="class_matrix3.html#ac2f48dbd5997faf74db3e177ac868261">operator *=</a>(<span class="keyword">const</span> <a class="code" href="class_matrix3.html">Matrix3&lt;T&gt;</a> &amp;m)
<a name="l00115"></a>00115 { <span class="keywordflow">return</span> *<span class="keyword">this</span> = *<span class="keyword">this</span> * m; }
<a name="l00116"></a>00116
<a name="l00117"></a>00117 <span class="comment">// transpose the matrix</span>
<a name="l00118"></a><a class="code" href="class_matrix3.html#ae136ce34ee5fb79351f06fb2446d09af">00118</a> <a class="code" href="class_matrix3.html">Matrix3&lt;T&gt;</a> <a class="code" href="class_matrix3.html#ae136ce34ee5fb79351f06fb2446d09af">transposed</a>(<span class="keywordtype">void</span>)
<a name="l00119"></a>00119 {
<a name="l00120"></a>00120 <span class="keywordflow">return</span> <a class="code" href="class_matrix3.html">Matrix3&lt;T&gt;</a>(<a class="code" href="class_vector3.html">Vector3&lt;T&gt;</a>(<a class="code" href="class_matrix3.html#acd7bf3421047fa155168a9c8e5164a2b">a</a>.x, <a class="code" href="class_matrix3.html#ae16bed039ad87c3337f15837c33fe2fb">b</a>.x, <a class="code" href="class_matrix3.html#a7efa0e7bd4c621a7fe76cd9168960b94">c</a>.x),
<a name="l00121"></a>00121 <a class="code" href="class_vector3.html">Vector3&lt;T&gt;</a>(<a class="code" href="class_matrix3.html#acd7bf3421047fa155168a9c8e5164a2b">a</a>.y, <a class="code" href="class_matrix3.html#ae16bed039ad87c3337f15837c33fe2fb">b</a>.y, <a class="code" href="class_matrix3.html#a7efa0e7bd4c621a7fe76cd9168960b94">c</a>.y),
<a name="l00122"></a>00122 <a class="code" href="class_vector3.html">Vector3&lt;T&gt;</a>(<a class="code" href="class_matrix3.html#acd7bf3421047fa155168a9c8e5164a2b">a</a>.z, <a class="code" href="class_matrix3.html#ae16bed039ad87c3337f15837c33fe2fb">b</a>.z, <a class="code" href="class_matrix3.html#a7efa0e7bd4c621a7fe76cd9168960b94">c</a>.z));
<a name="l00123"></a>00123 }
<a name="l00124"></a><a class="code" href="class_matrix3.html#a689b1ae3ea245ef3da02ed40941e130b">00124</a> <a class="code" href="class_matrix3.html">Matrix3&lt;T&gt;</a> <a class="code" href="class_matrix3.html#a689b1ae3ea245ef3da02ed40941e130b">transpose</a>(<span class="keywordtype">void</span>)
<a name="l00125"></a>00125 { <span class="keywordflow">return</span> *<span class="keyword">this</span> = <a class="code" href="class_matrix3.html#ae136ce34ee5fb79351f06fb2446d09af">transposed</a>(); }
<a name="l00126"></a>00126
<a name="l00127"></a>00127 };
<a name="l00128"></a>00128
<a name="l00129"></a><a class="code" href="matrix3_8h.html#a968bc4736fac5af106094c63c24ac6ca">00129</a> <span class="keyword">typedef</span> <a class="code" href="class_matrix3.html">Matrix3&lt;int&gt;</a> <a class="code" href="class_matrix3.html">Matrix3i</a>;
<a name="l00130"></a><a class="code" href="matrix3_8h.html#a7ba1a73d40b6814e5afdab1d92dccd1c">00130</a> <span class="keyword">typedef</span> <a class="code" href="class_matrix3.html">Matrix3&lt;unsigned int&gt;</a> <a class="code" href="class_matrix3.html">Matrix3ui</a>;
<a name="l00131"></a><a class="code" href="matrix3_8h.html#a34c26d99e82363873e76143190768e72">00131</a> <span class="keyword">typedef</span> <a class="code" href="class_matrix3.html">Matrix3&lt;long&gt;</a> <a class="code" href="class_matrix3.html">Matrix3l</a>;
<a name="l00132"></a><a class="code" href="matrix3_8h.html#af6ea092e28d3a1983dba338f8f344a51">00132</a> <span class="keyword">typedef</span> <a class="code" href="class_matrix3.html">Matrix3&lt;unsigned long&gt;</a> <a class="code" href="class_matrix3.html">Matrix3ul</a>;
<a name="l00133"></a><a class="code" href="matrix3_8h.html#ae5a673b3d27428dc13b294596cc53a5d">00133</a> <span class="keyword">typedef</span> <a class="code" href="class_matrix3.html">Matrix3&lt;float&gt;</a> <a class="code" href="class_matrix3.html">Matrix3f</a>;
<a name="l00134"></a>00134
<a name="l00135"></a>00135 <span class="preprocessor">#endif // MATRIX3_H</span>
</pre></div></div>
</div>
<hr class="footer"/><address class="footer"><small>
Generated for ArduPilot Libraries by&nbsp;<a href="http://www.doxygen.org/index.html"><img class="footer" src="doxygen.png" alt="doxygen"/></a></small></address>
</body>
</html>