diff options
Diffstat (limited to 'libraries/irrlicht-1.8/doc/html/vector3d_8h_source.html')
-rw-r--r-- | libraries/irrlicht-1.8/doc/html/vector3d_8h_source.html | 492 |
1 files changed, 492 insertions, 0 deletions
diff --git a/libraries/irrlicht-1.8/doc/html/vector3d_8h_source.html b/libraries/irrlicht-1.8/doc/html/vector3d_8h_source.html new file mode 100644 index 0000000..a2ed235 --- /dev/null +++ b/libraries/irrlicht-1.8/doc/html/vector3d_8h_source.html | |||
@@ -0,0 +1,492 @@ | |||
1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
2 | <html xmlns="http://www.w3.org/1999/xhtml"> | ||
3 | <head> | ||
4 | <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> | ||
5 | <title>Irrlicht 3D Engine: vector3d.h Source File</title> | ||
6 | |||
7 | <link href="tabs.css" rel="stylesheet" type="text/css"/> | ||
8 | <link href="doxygen.css" rel="stylesheet" type="text/css" /> | ||
9 | <link href="navtree.css" rel="stylesheet" type="text/css"/> | ||
10 | <script type="text/javascript" src="jquery.js"></script> | ||
11 | <script type="text/javascript" src="resize.js"></script> | ||
12 | <script type="text/javascript" src="navtree.js"></script> | ||
13 | <script type="text/javascript"> | ||
14 | $(document).ready(initResizable); | ||
15 | </script> | ||
16 | <link href="search/search.css" rel="stylesheet" type="text/css"/> | ||
17 | <script type="text/javascript" src="search/search.js"></script> | ||
18 | <script type="text/javascript"> | ||
19 | $(document).ready(function() { searchBox.OnSelectItem(0); }); | ||
20 | </script> | ||
21 | |||
22 | </head> | ||
23 | <body> | ||
24 | <div id="top"><!-- do not remove this div! --> | ||
25 | |||
26 | |||
27 | <div id="titlearea"> | ||
28 | <table cellspacing="0" cellpadding="0"> | ||
29 | <tbody> | ||
30 | <tr style="height: 56px;"> | ||
31 | |||
32 | <td id="projectlogo"><img alt="Logo" src="irrlichtlogo.png"/></td> | ||
33 | |||
34 | |||
35 | <td style="padding-left: 0.5em;"> | ||
36 | <div id="projectname">Irrlicht 3D Engine | ||
37 | |||
38 | </div> | ||
39 | |||
40 | </td> | ||
41 | |||
42 | |||
43 | |||
44 | |||
45 | <td> <div id="MSearchBox" class="MSearchBoxInactive"> | ||
46 | <span class="left"> | ||
47 | <img id="MSearchSelect" src="search/mag_sel.png" | ||
48 | onmouseover="return searchBox.OnSearchSelectShow()" | ||
49 | onmouseout="return searchBox.OnSearchSelectHide()" | ||
50 | alt=""/> | ||
51 | <input type="text" id="MSearchField" value="Search" accesskey="S" | ||
52 | onfocus="searchBox.OnSearchFieldFocus(true)" | ||
53 | onblur="searchBox.OnSearchFieldFocus(false)" | ||
54 | onkeyup="searchBox.OnSearchFieldChange(event)"/> | ||
55 | </span><span class="right"> | ||
56 | <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> | ||
57 | </span> | ||
58 | </div> | ||
59 | </td> | ||
60 | |||
61 | |||
62 | </tr> | ||
63 | </tbody> | ||
64 | </table> | ||
65 | </div> | ||
66 | |||
67 | <!-- Generated by Doxygen 1.7.5.1 --> | ||
68 | <script type="text/javascript"> | ||
69 | var searchBox = new SearchBox("searchBox", "search",false,'Search'); | ||
70 | </script> | ||
71 | <script type="text/javascript" src="dynsections.js"></script> | ||
72 | </div> | ||
73 | <div id="side-nav" class="ui-resizable side-nav-resizable"> | ||
74 | <div id="nav-tree"> | ||
75 | <div id="nav-tree-contents"> | ||
76 | </div> | ||
77 | </div> | ||
78 | <div id="splitbar" style="-moz-user-select:none;" | ||
79 | class="ui-resizable-handle"> | ||
80 | </div> | ||
81 | </div> | ||
82 | <script type="text/javascript"> | ||
83 | initNavTree('vector3d_8h.html',''); | ||
84 | </script> | ||
85 | <div id="doc-content"> | ||
86 | <div class="header"> | ||
87 | <div class="headertitle"> | ||
88 | <div class="title">vector3d.h</div> </div> | ||
89 | </div> | ||
90 | <div class="contents"> | ||
91 | <a href="vector3d_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// Copyright (C) 2002-2012 Nikolaus Gebhardt</span> | ||
92 | <a name="l00002"></a>00002 <span class="comment">// This file is part of the "Irrlicht Engine".</span> | ||
93 | <a name="l00003"></a>00003 <span class="comment">// For conditions of distribution and use, see copyright notice in irrlicht.h</span> | ||
94 | <a name="l00004"></a>00004 | ||
95 | <a name="l00005"></a>00005 <span class="preprocessor">#ifndef __IRR_POINT_3D_H_INCLUDED__</span> | ||
96 | <a name="l00006"></a>00006 <span class="preprocessor"></span><span class="preprocessor">#define __IRR_POINT_3D_H_INCLUDED__</span> | ||
97 | <a name="l00007"></a>00007 <span class="preprocessor"></span> | ||
98 | <a name="l00008"></a>00008 <span class="preprocessor">#include "<a class="code" href="irr_math_8h.html">irrMath.h</a>"</span> | ||
99 | <a name="l00009"></a>00009 | ||
100 | <a name="l00010"></a>00010 <span class="keyword">namespace </span>irr | ||
101 | <a name="l00011"></a>00011 { | ||
102 | <a name="l00012"></a>00012 <span class="keyword">namespace </span>core | ||
103 | <a name="l00013"></a>00013 { | ||
104 | <a name="l00014"></a>00014 | ||
105 | <a name="l00016"></a>00016 | ||
106 | <a name="l00021"></a>00021 <span class="keyword">template</span> <<span class="keyword">class</span> T> | ||
107 | <a name="l00022"></a><a class="code" href="classirr_1_1core_1_1vector3d.html">00022</a> <span class="keyword">class </span><a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">vector3d</a> | ||
108 | <a name="l00023"></a>00023 { | ||
109 | <a name="l00024"></a>00024 <span class="keyword">public</span>: | ||
110 | <a name="l00026"></a><a class="code" href="classirr_1_1core_1_1vector3d.html#aed8875ec8b9653857ea87fdb8213daf1">00026</a> <a class="code" href="classirr_1_1core_1_1vector3d.html#aed8875ec8b9653857ea87fdb8213daf1" title="Default constructor (null vector).">vector3d</a>() : <a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a>(0), <a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a>(0), <a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a>(0) {} | ||
111 | <a name="l00028"></a><a class="code" href="classirr_1_1core_1_1vector3d.html#a10687f6e33f8f795961a9b8f0a71c79b">00028</a> <a class="code" href="classirr_1_1core_1_1vector3d.html#a10687f6e33f8f795961a9b8f0a71c79b" title="Constructor with three different values.">vector3d</a>(T nx, T ny, T nz) : <a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a>(nx), <a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a>(ny), <a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a>(nz) {} | ||
112 | <a name="l00030"></a><a class="code" href="classirr_1_1core_1_1vector3d.html#a08093c70044d66a5c3cdec2522b868f2">00030</a> <span class="keyword">explicit</span> <a class="code" href="classirr_1_1core_1_1vector3d.html#a08093c70044d66a5c3cdec2522b868f2" title="Constructor with the same value for all elements.">vector3d</a>(T n) : <a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a>(n), <a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a>(n), <a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a>(n) {} | ||
113 | <a name="l00032"></a><a class="code" href="classirr_1_1core_1_1vector3d.html#a039600f48ce75c9eca6c0899135e60d5">00032</a> <a class="code" href="classirr_1_1core_1_1vector3d.html#a039600f48ce75c9eca6c0899135e60d5" title="Copy constructor.">vector3d</a>(<span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">vector3d<T></a>& other) : <a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a>(other.<a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a>), <a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a>(other.<a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a>), <a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a>(other.<a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a>) {} | ||
114 | <a name="l00033"></a>00033 | ||
115 | <a name="l00034"></a>00034 <span class="comment">// operators</span> | ||
116 | <a name="l00035"></a>00035 | ||
117 | <a name="l00036"></a><a class="code" href="classirr_1_1core_1_1vector3d.html#acc66a64d3e7ee0b722d155c4e987ecbe">00036</a> <a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">vector3d<T></a> <a class="code" href="classirr_1_1core_1_1vector3d.html#acc66a64d3e7ee0b722d155c4e987ecbe">operator-</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">vector3d<T></a>(-<a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a>, -<a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a>, -<a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a>); } | ||
118 | <a name="l00037"></a>00037 | ||
119 | <a name="l00038"></a><a class="code" href="classirr_1_1core_1_1vector3d.html#afaaaf1d22c44ac50d03026cbfc794c42">00038</a> <a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">vector3d<T></a>& <a class="code" href="classirr_1_1core_1_1vector3d.html#afaaaf1d22c44ac50d03026cbfc794c42">operator=</a>(<span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">vector3d<T></a>& other) { <a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a> = other.<a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a>; <a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a> = other.<a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a>; <a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a> = other.<a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a>; <span class="keywordflow">return</span> *<span class="keyword">this</span>; } | ||
120 | <a name="l00039"></a>00039 | ||
121 | <a name="l00040"></a><a class="code" href="classirr_1_1core_1_1vector3d.html#a19d8592169d08d461a80d0e3c5a27b7f">00040</a> <a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">vector3d<T></a> <a class="code" href="classirr_1_1core_1_1vector3d.html#a19d8592169d08d461a80d0e3c5a27b7f">operator+</a>(<span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">vector3d<T></a>& other)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">vector3d<T></a>(<a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a> + other.<a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a>, <a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a> + other.<a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a>, <a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a> + other.<a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a>); } | ||
122 | <a name="l00041"></a><a class="code" href="classirr_1_1core_1_1vector3d.html#a37360dbe7e5542e1cd3cdb768f250922">00041</a> <a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">vector3d<T></a>& <a class="code" href="classirr_1_1core_1_1vector3d.html#a37360dbe7e5542e1cd3cdb768f250922">operator+=</a>(<span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">vector3d<T></a>& other) { <a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a>+=other.<a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a>; <a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a>+=other.<a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a>; <a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a>+=other.<a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a>; <span class="keywordflow">return</span> *<span class="keyword">this</span>; } | ||
123 | <a name="l00042"></a><a class="code" href="classirr_1_1core_1_1vector3d.html#a676c089849a119d557e3fd32eb47d2a8">00042</a> <a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">vector3d<T></a> <a class="code" href="classirr_1_1core_1_1vector3d.html#a676c089849a119d557e3fd32eb47d2a8">operator+</a>(<span class="keyword">const</span> T val)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">vector3d<T></a>(<a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a> + val, <a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a> + val, <a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a> + val); } | ||
124 | <a name="l00043"></a><a class="code" href="classirr_1_1core_1_1vector3d.html#a90dd07738795890b90fbf4b133cd7930">00043</a> <a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">vector3d<T></a>& <a class="code" href="classirr_1_1core_1_1vector3d.html#a90dd07738795890b90fbf4b133cd7930">operator+=</a>(<span class="keyword">const</span> T val) { <a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a>+=val; <a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a>+=val; <a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a>+=val; <span class="keywordflow">return</span> *<span class="keyword">this</span>; } | ||
125 | <a name="l00044"></a>00044 | ||
126 | <a name="l00045"></a><a class="code" href="classirr_1_1core_1_1vector3d.html#ae17fdfbc02988aff60dfde5456c9032d">00045</a> <a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">vector3d<T></a> <a class="code" href="classirr_1_1core_1_1vector3d.html#ae17fdfbc02988aff60dfde5456c9032d">operator-</a>(<span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">vector3d<T></a>& other)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">vector3d<T></a>(<a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a> - other.<a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a>, <a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a> - other.<a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a>, <a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a> - other.<a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a>); } | ||
127 | <a name="l00046"></a><a class="code" href="classirr_1_1core_1_1vector3d.html#a91a4a39544340b3d02e81659f1a0b7d2">00046</a> <a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">vector3d<T></a>& <a class="code" href="classirr_1_1core_1_1vector3d.html#a91a4a39544340b3d02e81659f1a0b7d2">operator-=</a>(<span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">vector3d<T></a>& other) { <a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a>-=other.<a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a>; <a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a>-=other.<a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a>; <a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a>-=other.<a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a>; <span class="keywordflow">return</span> *<span class="keyword">this</span>; } | ||
128 | <a name="l00047"></a><a class="code" href="classirr_1_1core_1_1vector3d.html#a4c9b7154c6d582cd49039bd4f61c48cb">00047</a> <a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">vector3d<T></a> <a class="code" href="classirr_1_1core_1_1vector3d.html#a4c9b7154c6d582cd49039bd4f61c48cb">operator-</a>(<span class="keyword">const</span> T val)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">vector3d<T></a>(<a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a> - val, <a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a> - val, <a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a> - val); } | ||
129 | <a name="l00048"></a><a class="code" href="classirr_1_1core_1_1vector3d.html#afe666e30d5e903d4d910f2544829233c">00048</a> <a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">vector3d<T></a>& <a class="code" href="classirr_1_1core_1_1vector3d.html#afe666e30d5e903d4d910f2544829233c">operator-=</a>(<span class="keyword">const</span> T val) { <a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a>-=val; <a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a>-=val; <a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a>-=val; <span class="keywordflow">return</span> *<span class="keyword">this</span>; } | ||
130 | <a name="l00049"></a>00049 | ||
131 | <a name="l00050"></a><a class="code" href="classirr_1_1core_1_1vector3d.html#aab7ded0a282f23cdc75533873f41dee5">00050</a> <a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">vector3d<T></a> <a class="code" href="classirr_1_1core_1_1vector3d.html#aab7ded0a282f23cdc75533873f41dee5">operator*</a>(<span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">vector3d<T></a>& other)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">vector3d<T></a>(<a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a> * other.<a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a>, <a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a> * other.<a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a>, <a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a> * other.<a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a>); } | ||
132 | <a name="l00051"></a><a class="code" href="classirr_1_1core_1_1vector3d.html#a04e89643ddbd6e17ffceffd64e740760">00051</a> <a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">vector3d<T></a>& <a class="code" href="classirr_1_1core_1_1vector3d.html#a04e89643ddbd6e17ffceffd64e740760">operator*=</a>(<span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">vector3d<T></a>& other) { <a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a>*=other.<a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a>; <a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a>*=other.<a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a>; <a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a>*=other.<a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a>; <span class="keywordflow">return</span> *<span class="keyword">this</span>; } | ||
133 | <a name="l00052"></a><a class="code" href="classirr_1_1core_1_1vector3d.html#ae8ecbd713bd488d45eab406f34679c1c">00052</a> <a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">vector3d<T></a> <a class="code" href="classirr_1_1core_1_1vector3d.html#ae8ecbd713bd488d45eab406f34679c1c">operator*</a>(<span class="keyword">const</span> T v)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">vector3d<T></a>(<a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a> * v, <a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a> * v, <a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a> * v); } | ||
134 | <a name="l00053"></a><a class="code" href="classirr_1_1core_1_1vector3d.html#a588d293d4d3ebd95240a9d2b46072233">00053</a> <a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">vector3d<T></a>& <a class="code" href="classirr_1_1core_1_1vector3d.html#a588d293d4d3ebd95240a9d2b46072233">operator*=</a>(<span class="keyword">const</span> T v) { <a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a>*=v; <a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a>*=v; <a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a>*=v; <span class="keywordflow">return</span> *<span class="keyword">this</span>; } | ||
135 | <a name="l00054"></a>00054 | ||
136 | <a name="l00055"></a><a class="code" href="classirr_1_1core_1_1vector3d.html#a82f734747a8d460a73482dc69a1d2ece">00055</a> <a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">vector3d<T></a> <a class="code" href="classirr_1_1core_1_1vector3d.html#a82f734747a8d460a73482dc69a1d2ece">operator/</a>(<span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">vector3d<T></a>& other)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">vector3d<T></a>(<a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a> / other.<a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a>, <a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a> / other.<a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a>, <a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a> / other.<a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a>); } | ||
137 | <a name="l00056"></a><a class="code" href="classirr_1_1core_1_1vector3d.html#ab46c94558797997b369cfe0a38c57794">00056</a> <a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">vector3d<T></a>& <a class="code" href="classirr_1_1core_1_1vector3d.html#ab46c94558797997b369cfe0a38c57794">operator/=</a>(<span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">vector3d<T></a>& other) { <a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a>/=other.<a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a>; <a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a>/=other.<a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a>; <a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a>/=other.<a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a>; <span class="keywordflow">return</span> *<span class="keyword">this</span>; } | ||
138 | <a name="l00057"></a><a class="code" href="classirr_1_1core_1_1vector3d.html#a783084cb15a1a395c54de649544de966">00057</a> <a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">vector3d<T></a> <a class="code" href="classirr_1_1core_1_1vector3d.html#a783084cb15a1a395c54de649544de966">operator/</a>(<span class="keyword">const</span> T v)<span class="keyword"> const </span>{ T i=(T)1.0/v; <span class="keywordflow">return</span> <a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">vector3d<T></a>(<a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a> * i, <a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a> * i, <a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a> * i); } | ||
139 | <a name="l00058"></a><a class="code" href="classirr_1_1core_1_1vector3d.html#a6b1f864e2316167a8b5a65ca086c11ff">00058</a> <a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">vector3d<T></a>& <a class="code" href="classirr_1_1core_1_1vector3d.html#a6b1f864e2316167a8b5a65ca086c11ff">operator/=</a>(<span class="keyword">const</span> T v) { T i=(T)1.0/v; <a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a>*=i; <a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a>*=i; <a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a>*=i; <span class="keywordflow">return</span> *<span class="keyword">this</span>; } | ||
140 | <a name="l00059"></a>00059 | ||
141 | <a name="l00061"></a><a class="code" href="classirr_1_1core_1_1vector3d.html#ad567b75b65cd2ded2312d41f7a5263da">00061</a> <span class="keywordtype">bool</span> operator<=(const vector3d<T>&other) <span class="keyword">const</span> | ||
142 | <a name="l00062"></a>00062 { | ||
143 | <a name="l00063"></a>00063 <span class="keywordflow">return</span> (<a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a><other.X || <a class="code" href="namespaceirr_1_1core.html#abf9b9b140cc365908ea4c8c47451e4e3" title="returns if a equals b, taking possible rounding errors into account">core::equals</a>(<a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a>, other.X)) || | ||
144 | <a name="l00064"></a>00064 (<a class="code" href="namespaceirr_1_1core.html#abf9b9b140cc365908ea4c8c47451e4e3" title="returns if a equals b, taking possible rounding errors into account">core::equals</a>(<a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a>, other.X) && (<a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a><other.Y || <a class="code" href="classirr_1_1core_1_1vector3d.html#a7aa9401191db377d67a6d5b160e4c38e" title="returns if this vector equals the other one, taking floating point rounding errors into account...">core::equals</a>(<a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a>, other.Y))) || | ||
145 | <a name="l00065"></a>00065 (<a class="code" href="classirr_1_1core_1_1vector3d.html#a7aa9401191db377d67a6d5b160e4c38e" title="returns if this vector equals the other one, taking floating point rounding errors into account...">core::equals</a>(<a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a>, other.X) && <a class="code" href="classirr_1_1core_1_1vector3d.html#a7aa9401191db377d67a6d5b160e4c38e" title="returns if this vector equals the other one, taking floating point rounding errors into account...">core::equals</a>(<a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a>, other.Y) && (<a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a><other.Z || <a class="code" href="classirr_1_1core_1_1vector3d.html#a7aa9401191db377d67a6d5b160e4c38e" title="returns if this vector equals the other one, taking floating point rounding errors into account...">core::equals</a>(<a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a>, other.Z))); | ||
146 | <a name="l00066"></a>00066 } | ||
147 | <a name="l00067"></a>00067 | ||
148 | <a name="l00069"></a><a class="code" href="classirr_1_1core_1_1vector3d.html#ab3c1da2da396a7f2ae336fda985cab6d">00069</a> <span class="keywordtype">bool</span> <a class="code" href="classirr_1_1core_1_1vector3d.html#ab3c1da2da396a7f2ae336fda985cab6d" title="sort in order X, Y, Z. Equality with rounding tolerance.">operator>=</a>(<span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">vector3d<T></a>&other)<span class="keyword"> const</span> | ||
149 | <a name="l00070"></a>00070 <span class="keyword"> </span>{ | ||
150 | <a name="l00071"></a>00071 <span class="keywordflow">return</span> (<a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a>>other.<a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a> || <a class="code" href="namespaceirr_1_1core.html#abf9b9b140cc365908ea4c8c47451e4e3" title="returns if a equals b, taking possible rounding errors into account">core::equals</a>(<a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a>, other.<a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a>)) || | ||
151 | <a name="l00072"></a>00072 (<a class="code" href="classirr_1_1core_1_1vector3d.html#a7aa9401191db377d67a6d5b160e4c38e" title="returns if this vector equals the other one, taking floating point rounding errors into account...">core::equals</a>(<a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a>, other.<a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a>) && (<a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a>>other.<a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a> || <a class="code" href="classirr_1_1core_1_1vector3d.html#a7aa9401191db377d67a6d5b160e4c38e" title="returns if this vector equals the other one, taking floating point rounding errors into account...">core::equals</a>(<a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a>, other.<a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a>))) || | ||
152 | <a name="l00073"></a>00073 (<a class="code" href="classirr_1_1core_1_1vector3d.html#a7aa9401191db377d67a6d5b160e4c38e" title="returns if this vector equals the other one, taking floating point rounding errors into account...">core::equals</a>(<a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a>, other.<a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a>) && <a class="code" href="classirr_1_1core_1_1vector3d.html#a7aa9401191db377d67a6d5b160e4c38e" title="returns if this vector equals the other one, taking floating point rounding errors into account...">core::equals</a>(<a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a>, other.<a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a>) && (<a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a>>other.<a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a> || <a class="code" href="classirr_1_1core_1_1vector3d.html#a7aa9401191db377d67a6d5b160e4c38e" title="returns if this vector equals the other one, taking floating point rounding errors into account...">core::equals</a>(<a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a>, other.<a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a>))); | ||
153 | <a name="l00074"></a>00074 } | ||
154 | <a name="l00075"></a>00075 | ||
155 | <a name="l00077"></a><a class="code" href="classirr_1_1core_1_1vector3d.html#a9ce8b1cf82c64f0985cf668056698519">00077</a> <span class="keywordtype">bool</span> operator<(const vector3d<T>&other) <span class="keyword">const</span> | ||
156 | <a name="l00078"></a>00078 { | ||
157 | <a name="l00079"></a>00079 <span class="keywordflow">return</span> (<a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a><other.X && !<a class="code" href="namespaceirr_1_1core.html#abf9b9b140cc365908ea4c8c47451e4e3" title="returns if a equals b, taking possible rounding errors into account">core::equals</a>(<a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a>, other.X)) || | ||
158 | <a name="l00080"></a>00080 (<a class="code" href="namespaceirr_1_1core.html#abf9b9b140cc365908ea4c8c47451e4e3" title="returns if a equals b, taking possible rounding errors into account">core::equals</a>(<a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a>, other.X) && <a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a><other.Y && !<a class="code" href="classirr_1_1core_1_1vector3d.html#a7aa9401191db377d67a6d5b160e4c38e" title="returns if this vector equals the other one, taking floating point rounding errors into account...">core::equals</a>(<a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a>, other.Y)) || | ||
159 | <a name="l00081"></a>00081 (<a class="code" href="namespaceirr_1_1core.html#abf9b9b140cc365908ea4c8c47451e4e3" title="returns if a equals b, taking possible rounding errors into account">core::equals</a>(<a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a>, other.X) && <a class="code" href="classirr_1_1core_1_1vector3d.html#a7aa9401191db377d67a6d5b160e4c38e" title="returns if this vector equals the other one, taking floating point rounding errors into account...">core::equals</a>(<a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a>, other.Y) && <a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a><other.Z && !<a class="code" href="classirr_1_1core_1_1vector3d.html#a7aa9401191db377d67a6d5b160e4c38e" title="returns if this vector equals the other one, taking floating point rounding errors into account...">core::equals</a>(<a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a>, other.Z)); | ||
160 | <a name="l00082"></a>00082 } | ||
161 | <a name="l00083"></a>00083 | ||
162 | <a name="l00085"></a><a class="code" href="classirr_1_1core_1_1vector3d.html#aeabe64473259a894507360f399d7f816">00085</a> <span class="keywordtype">bool</span> <a class="code" href="classirr_1_1core_1_1vector3d.html#aeabe64473259a894507360f399d7f816" title="sort in order X, Y, Z. Difference must be above rounding tolerance.">operator></a>(<span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">vector3d<T></a>&other)<span class="keyword"> const</span> | ||
163 | <a name="l00086"></a>00086 <span class="keyword"> </span>{ | ||
164 | <a name="l00087"></a>00087 <span class="keywordflow">return</span> (<a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a>>other.<a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a> && !<a class="code" href="namespaceirr_1_1core.html#abf9b9b140cc365908ea4c8c47451e4e3" title="returns if a equals b, taking possible rounding errors into account">core::equals</a>(<a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a>, other.<a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a>)) || | ||
165 | <a name="l00088"></a>00088 (<a class="code" href="classirr_1_1core_1_1vector3d.html#a7aa9401191db377d67a6d5b160e4c38e" title="returns if this vector equals the other one, taking floating point rounding errors into account...">core::equals</a>(<a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a>, other.<a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a>) && <a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a>>other.<a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a> && !<a class="code" href="classirr_1_1core_1_1vector3d.html#a7aa9401191db377d67a6d5b160e4c38e" title="returns if this vector equals the other one, taking floating point rounding errors into account...">core::equals</a>(<a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a>, other.<a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a>)) || | ||
166 | <a name="l00089"></a>00089 (<a class="code" href="namespaceirr_1_1core.html#abf9b9b140cc365908ea4c8c47451e4e3" title="returns if a equals b, taking possible rounding errors into account">core::equals</a>(<a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a>, other.<a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a>) && <a class="code" href="classirr_1_1core_1_1vector3d.html#a7aa9401191db377d67a6d5b160e4c38e" title="returns if this vector equals the other one, taking floating point rounding errors into account...">core::equals</a>(<a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a>, other.<a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a>) && <a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a>>other.<a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a> && !<a class="code" href="classirr_1_1core_1_1vector3d.html#a7aa9401191db377d67a6d5b160e4c38e" title="returns if this vector equals the other one, taking floating point rounding errors into account...">core::equals</a>(<a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a>, other.<a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a>)); | ||
167 | <a name="l00090"></a>00090 } | ||
168 | <a name="l00091"></a>00091 | ||
169 | <a name="l00093"></a><a class="code" href="classirr_1_1core_1_1vector3d.html#a3908b4e712fa753a0c88ca6dfce36e34">00093</a> <span class="keywordtype">bool</span> <a class="code" href="classirr_1_1core_1_1vector3d.html#a3908b4e712fa753a0c88ca6dfce36e34" title="use weak float compare">operator==</a>(<span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">vector3d<T></a>& other)<span class="keyword"> const</span> | ||
170 | <a name="l00094"></a>00094 <span class="keyword"> </span>{ | ||
171 | <a name="l00095"></a>00095 <span class="keywordflow">return</span> this-><a class="code" href="classirr_1_1core_1_1vector3d.html#a7aa9401191db377d67a6d5b160e4c38e" title="returns if this vector equals the other one, taking floating point rounding errors into account...">equals</a>(other); | ||
172 | <a name="l00096"></a>00096 } | ||
173 | <a name="l00097"></a>00097 | ||
174 | <a name="l00098"></a><a class="code" href="classirr_1_1core_1_1vector3d.html#a125c9bfa0c551f3543f1466f1a670c51">00098</a> <span class="keywordtype">bool</span> <a class="code" href="classirr_1_1core_1_1vector3d.html#a125c9bfa0c551f3543f1466f1a670c51">operator!=</a>(<span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">vector3d<T></a>& other)<span class="keyword"> const</span> | ||
175 | <a name="l00099"></a>00099 <span class="keyword"> </span>{ | ||
176 | <a name="l00100"></a>00100 <span class="keywordflow">return</span> !this-><a class="code" href="classirr_1_1core_1_1vector3d.html#a7aa9401191db377d67a6d5b160e4c38e" title="returns if this vector equals the other one, taking floating point rounding errors into account...">equals</a>(other); | ||
177 | <a name="l00101"></a>00101 } | ||
178 | <a name="l00102"></a>00102 | ||
179 | <a name="l00103"></a>00103 <span class="comment">// functions</span> | ||
180 | <a name="l00104"></a>00104 | ||
181 | <a name="l00106"></a><a class="code" href="classirr_1_1core_1_1vector3d.html#a7aa9401191db377d67a6d5b160e4c38e">00106</a> <span class="keywordtype">bool</span> <a class="code" href="classirr_1_1core_1_1vector3d.html#a7aa9401191db377d67a6d5b160e4c38e" title="returns if this vector equals the other one, taking floating point rounding errors into account...">equals</a>(<span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">vector3d<T></a>& other, <span class="keyword">const</span> T tolerance = (T)<a class="code" href="namespaceirr_1_1core.html#a9514dd34463a30102ef8836915cf9c4c">ROUNDING_ERROR_f32</a> )<span class="keyword"> const</span> | ||
182 | <a name="l00107"></a>00107 <span class="keyword"> </span>{ | ||
183 | <a name="l00108"></a>00108 <span class="keywordflow">return</span> <a class="code" href="classirr_1_1core_1_1vector3d.html#a7aa9401191db377d67a6d5b160e4c38e" title="returns if this vector equals the other one, taking floating point rounding errors into account...">core::equals</a>(<a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a>, other.<a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a>, tolerance) && | ||
184 | <a name="l00109"></a>00109 <a class="code" href="classirr_1_1core_1_1vector3d.html#a7aa9401191db377d67a6d5b160e4c38e" title="returns if this vector equals the other one, taking floating point rounding errors into account...">core::equals</a>(<a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a>, other.<a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a>, tolerance) && | ||
185 | <a name="l00110"></a>00110 <a class="code" href="classirr_1_1core_1_1vector3d.html#a7aa9401191db377d67a6d5b160e4c38e" title="returns if this vector equals the other one, taking floating point rounding errors into account...">core::equals</a>(<a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a>, other.<a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a>, tolerance); | ||
186 | <a name="l00111"></a>00111 } | ||
187 | <a name="l00112"></a>00112 | ||
188 | <a name="l00113"></a><a class="code" href="classirr_1_1core_1_1vector3d.html#a3e9048423e1176a7342759a290d55c96">00113</a> <a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">vector3d<T></a>& <span class="keyword">set</span>(<span class="keyword">const</span> T nx, <span class="keyword">const</span> T ny, <span class="keyword">const</span> T nz) {<a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a>=nx; <a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a>=ny; <a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a>=nz; <span class="keywordflow">return</span> *<span class="keyword">this</span>;} | ||
189 | <a name="l00114"></a><a class="code" href="classirr_1_1core_1_1vector3d.html#aaa41e0e1f747d4d83af8ac6b621184da">00114</a> <a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">vector3d<T></a>& <span class="keyword">set</span>(<span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">vector3d<T></a>& p) {<a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a>=p.X; <a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a>=p.Y; <a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a>=p.Z;<span class="keywordflow">return</span> *<span class="keyword">this</span>;} | ||
190 | <a name="l00115"></a>00115 | ||
191 | <a name="l00117"></a><a class="code" href="classirr_1_1core_1_1vector3d.html#ab0f95138bd31d82b5486237c8e49a2d5">00117</a> T <a class="code" href="classirr_1_1core_1_1vector3d.html#ab0f95138bd31d82b5486237c8e49a2d5" title="Get length of the vector.">getLength</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="namespaceirr_1_1core.html#af2f378cc34a19f5da6fe1d4961646d1d">core::squareroot</a>( <a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a>*<a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a> + <a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a>*<a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a> + <a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a>*<a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a> ); } | ||
192 | <a name="l00118"></a>00118 | ||
193 | <a name="l00120"></a>00120 | ||
194 | <a name="l00122"></a><a class="code" href="classirr_1_1core_1_1vector3d.html#ad72df96d0e280b0e6383be273f94f6ae">00122</a> T <a class="code" href="classirr_1_1core_1_1vector3d.html#ad72df96d0e280b0e6383be273f94f6ae" title="Get squared length of the vector.">getLengthSQ</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a>*<a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a> + <a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a>*<a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a> + <a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a>*<a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a>; } | ||
195 | <a name="l00123"></a>00123 | ||
196 | <a name="l00125"></a><a class="code" href="classirr_1_1core_1_1vector3d.html#a0b247d39047c0e51ff16d0118bb396ab">00125</a> T <a class="code" href="classirr_1_1core_1_1vector3d.html#a0b247d39047c0e51ff16d0118bb396ab" title="Get the dot product with another vector.">dotProduct</a>(<span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">vector3d<T></a>& other)<span class="keyword"> const</span> | ||
197 | <a name="l00126"></a>00126 <span class="keyword"> </span>{ | ||
198 | <a name="l00127"></a>00127 <span class="keywordflow">return</span> <a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a>*other.<a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a> + <a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a>*other.<a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a> + <a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a>*other.<a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a>; | ||
199 | <a name="l00128"></a>00128 } | ||
200 | <a name="l00129"></a>00129 | ||
201 | <a name="l00131"></a>00131 | ||
202 | <a name="l00132"></a><a class="code" href="classirr_1_1core_1_1vector3d.html#afd81bdc7d165f0e2082155127c3005e2">00132</a> T <a class="code" href="classirr_1_1core_1_1vector3d.html#afd81bdc7d165f0e2082155127c3005e2" title="Get distance from another point.">getDistanceFrom</a>(<span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">vector3d<T></a>& other)<span class="keyword"> const</span> | ||
203 | <a name="l00133"></a>00133 <span class="keyword"> </span>{ | ||
204 | <a name="l00134"></a>00134 <span class="keywordflow">return</span> <a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">vector3d<T></a>(<a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a> - other.<a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a>, <a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a> - other.<a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a>, <a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a> - other.<a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a>).<a class="code" href="classirr_1_1core_1_1vector3d.html#ab0f95138bd31d82b5486237c8e49a2d5" title="Get length of the vector.">getLength</a>(); | ||
205 | <a name="l00135"></a>00135 } | ||
206 | <a name="l00136"></a>00136 | ||
207 | <a name="l00138"></a>00138 | ||
208 | <a name="l00139"></a><a class="code" href="classirr_1_1core_1_1vector3d.html#afe85829b53b8ea449a4b51a2fb14c7be">00139</a> T <a class="code" href="classirr_1_1core_1_1vector3d.html#afe85829b53b8ea449a4b51a2fb14c7be" title="Returns squared distance from another point.">getDistanceFromSQ</a>(<span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">vector3d<T></a>& other)<span class="keyword"> const</span> | ||
209 | <a name="l00140"></a>00140 <span class="keyword"> </span>{ | ||
210 | <a name="l00141"></a>00141 <span class="keywordflow">return</span> <a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">vector3d<T></a>(<a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a> - other.<a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a>, <a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a> - other.<a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a>, <a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a> - other.<a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a>).<a class="code" href="classirr_1_1core_1_1vector3d.html#ad72df96d0e280b0e6383be273f94f6ae" title="Get squared length of the vector.">getLengthSQ</a>(); | ||
211 | <a name="l00142"></a>00142 } | ||
212 | <a name="l00143"></a>00143 | ||
213 | <a name="l00145"></a>00145 | ||
214 | <a name="l00147"></a><a class="code" href="classirr_1_1core_1_1vector3d.html#aa2470a12e1ef53f440c95df6249e9aa4">00147</a> <a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">vector3d<T></a> <a class="code" href="classirr_1_1core_1_1vector3d.html#aa2470a12e1ef53f440c95df6249e9aa4" title="Calculates the cross product with another vector.">crossProduct</a>(<span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">vector3d<T></a>& p)<span class="keyword"> const</span> | ||
215 | <a name="l00148"></a>00148 <span class="keyword"> </span>{ | ||
216 | <a name="l00149"></a>00149 <span class="keywordflow">return</span> <a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">vector3d<T></a>(<a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a> * p.<a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a> - <a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a> * p.<a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a>, <a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a> * p.<a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a> - <a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a> * p.<a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a>, <a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a> * p.<a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a> - <a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a> * p.<a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a>); | ||
217 | <a name="l00150"></a>00150 } | ||
218 | <a name="l00151"></a>00151 | ||
219 | <a name="l00153"></a>00153 | ||
220 | <a name="l00157"></a><a class="code" href="classirr_1_1core_1_1vector3d.html#ace05ee3b68b47c2ec6baff0d9d64de98">00157</a> <span class="keywordtype">bool</span> <a class="code" href="classirr_1_1core_1_1vector3d.html#ace05ee3b68b47c2ec6baff0d9d64de98" title="Returns if this vector interpreted as a point is on a line between two other points.">isBetweenPoints</a>(<span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">vector3d<T></a>& begin, <span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">vector3d<T></a>& end)<span class="keyword"> const</span> | ||
221 | <a name="l00158"></a>00158 <span class="keyword"> </span>{ | ||
222 | <a name="l00159"></a>00159 <span class="keyword">const</span> T f = (end - begin).<a class="code" href="classirr_1_1core_1_1vector3d.html#ad72df96d0e280b0e6383be273f94f6ae" title="Get squared length of the vector.">getLengthSQ</a>(); | ||
223 | <a name="l00160"></a>00160 <span class="keywordflow">return</span> <a class="code" href="classirr_1_1core_1_1vector3d.html#afe85829b53b8ea449a4b51a2fb14c7be" title="Returns squared distance from another point.">getDistanceFromSQ</a>(begin) <= f && | ||
224 | <a name="l00161"></a>00161 <a class="code" href="classirr_1_1core_1_1vector3d.html#afe85829b53b8ea449a4b51a2fb14c7be" title="Returns squared distance from another point.">getDistanceFromSQ</a>(end) <= f; | ||
225 | <a name="l00162"></a>00162 } | ||
226 | <a name="l00163"></a>00163 | ||
227 | <a name="l00165"></a>00165 | ||
228 | <a name="l00168"></a><a class="code" href="classirr_1_1core_1_1vector3d.html#a84a1861464ef70e6965c146732103c09">00168</a> <a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">vector3d<T></a>& <a class="code" href="classirr_1_1core_1_1vector3d.html#a84a1861464ef70e6965c146732103c09" title="Normalizes the vector.">normalize</a>() | ||
229 | <a name="l00169"></a>00169 { | ||
230 | <a name="l00170"></a>00170 <a class="code" href="namespaceirr.html#a1325b02603ad449f92c68fc640af9b28" title="64 bit floating point variable.">f64</a> length = <a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a>*<a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a> + <a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a>*<a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a> + <a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a>*<a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a>; | ||
231 | <a name="l00171"></a>00171 <span class="keywordflow">if</span> (length == 0 ) <span class="comment">// this check isn't an optimization but prevents getting NAN in the sqrt.</span> | ||
232 | <a name="l00172"></a>00172 <span class="keywordflow">return</span> *<span class="keyword">this</span>; | ||
233 | <a name="l00173"></a>00173 length = <a class="code" href="namespaceirr_1_1core.html#adaef309f12c2a3386e94610e24f2bfa7">core::reciprocal_squareroot</a>(length); | ||
234 | <a name="l00174"></a>00174 | ||
235 | <a name="l00175"></a>00175 <a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a> = (T)(<a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a> * length); | ||
236 | <a name="l00176"></a>00176 <a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a> = (T)(<a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a> * length); | ||
237 | <a name="l00177"></a>00177 Z = (T)(Z * length); | ||
238 | <a name="l00178"></a>00178 <span class="keywordflow">return</span> *<span class="keyword">this</span>; | ||
239 | <a name="l00179"></a>00179 } | ||
240 | <a name="l00180"></a>00180 | ||
241 | <a name="l00182"></a><a class="code" href="classirr_1_1core_1_1vector3d.html#ae593448ac63803b3d254b0e6c7600f28">00182</a> <a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">vector3d<T></a>& <a class="code" href="classirr_1_1core_1_1vector3d.html#ae593448ac63803b3d254b0e6c7600f28" title="Sets the length of the vector to a new value.">setLength</a>(T newlength) | ||
242 | <a name="l00183"></a>00183 { | ||
243 | <a name="l00184"></a>00184 <a class="code" href="classirr_1_1core_1_1vector3d.html#a84a1861464ef70e6965c146732103c09" title="Normalizes the vector.">normalize</a>(); | ||
244 | <a name="l00185"></a>00185 <span class="keywordflow">return</span> (*<span class="keyword">this</span> *= newlength); | ||
245 | <a name="l00186"></a>00186 } | ||
246 | <a name="l00187"></a>00187 | ||
247 | <a name="l00189"></a><a class="code" href="classirr_1_1core_1_1vector3d.html#a55a10e03bc09f87b95fc81ea0d508722">00189</a> <a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">vector3d<T></a>& <a class="code" href="classirr_1_1core_1_1vector3d.html#a55a10e03bc09f87b95fc81ea0d508722" title="Inverts the vector.">invert</a>() | ||
248 | <a name="l00190"></a>00190 { | ||
249 | <a name="l00191"></a>00191 <a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a> *= -1; | ||
250 | <a name="l00192"></a>00192 <a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a> *= -1; | ||
251 | <a name="l00193"></a>00193 <a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a> *= -1; | ||
252 | <a name="l00194"></a>00194 <span class="keywordflow">return</span> *<span class="keyword">this</span>; | ||
253 | <a name="l00195"></a>00195 } | ||
254 | <a name="l00196"></a>00196 | ||
255 | <a name="l00198"></a>00198 | ||
256 | <a name="l00200"></a><a class="code" href="classirr_1_1core_1_1vector3d.html#a621fbddb42814edd3d14410252cf7b7a">00200</a> <span class="keywordtype">void</span> <a class="code" href="classirr_1_1core_1_1vector3d.html#a621fbddb42814edd3d14410252cf7b7a" title="Rotates the vector by a specified number of degrees around the Y axis and the specified center...">rotateXZBy</a>(<a class="code" href="namespaceirr.html#a1325b02603ad449f92c68fc640af9b28" title="64 bit floating point variable.">f64</a> degrees, <span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">vector3d<T></a>& center=<a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">vector3d<T></a>()) | ||
257 | <a name="l00201"></a>00201 { | ||
258 | <a name="l00202"></a>00202 degrees *= <a class="code" href="namespaceirr_1_1core.html#a8e21b5969c8292857f7c9c5dcfd61c35" title="64bit constant for converting from degrees to radians (formally known as GRAD_PI2)">DEGTORAD64</a>; | ||
259 | <a name="l00203"></a>00203 <a class="code" href="namespaceirr.html#a1325b02603ad449f92c68fc640af9b28" title="64 bit floating point variable.">f64</a> cs = cos(degrees); | ||
260 | <a name="l00204"></a>00204 <a class="code" href="namespaceirr.html#a1325b02603ad449f92c68fc640af9b28" title="64 bit floating point variable.">f64</a> sn = sin(degrees); | ||
261 | <a name="l00205"></a>00205 <a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a> -= center.X; | ||
262 | <a name="l00206"></a>00206 <a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a> -= center.Z; | ||
263 | <a name="l00207"></a>00207 <span class="keyword">set</span>((T)(<a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a>*cs - <a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a>*sn), <a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a>, (T)(<a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a>*sn + <a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a>*cs)); | ||
264 | <a name="l00208"></a>00208 <a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a> += center.X; | ||
265 | <a name="l00209"></a>00209 <a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a> += center.Z; | ||
266 | <a name="l00210"></a>00210 } | ||
267 | <a name="l00211"></a>00211 | ||
268 | <a name="l00213"></a>00213 | ||
269 | <a name="l00215"></a><a class="code" href="classirr_1_1core_1_1vector3d.html#ac38b75735ec06716305fbb09ec71784d">00215</a> <span class="keywordtype">void</span> <a class="code" href="classirr_1_1core_1_1vector3d.html#ac38b75735ec06716305fbb09ec71784d" title="Rotates the vector by a specified number of degrees around the Z axis and the specified center...">rotateXYBy</a>(<a class="code" href="namespaceirr.html#a1325b02603ad449f92c68fc640af9b28" title="64 bit floating point variable.">f64</a> degrees, <span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">vector3d<T></a>& center=<a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">vector3d<T></a>()) | ||
270 | <a name="l00216"></a>00216 { | ||
271 | <a name="l00217"></a>00217 degrees *= <a class="code" href="namespaceirr_1_1core.html#a8e21b5969c8292857f7c9c5dcfd61c35" title="64bit constant for converting from degrees to radians (formally known as GRAD_PI2)">DEGTORAD64</a>; | ||
272 | <a name="l00218"></a>00218 <a class="code" href="namespaceirr.html#a1325b02603ad449f92c68fc640af9b28" title="64 bit floating point variable.">f64</a> cs = cos(degrees); | ||
273 | <a name="l00219"></a>00219 <a class="code" href="namespaceirr.html#a1325b02603ad449f92c68fc640af9b28" title="64 bit floating point variable.">f64</a> sn = sin(degrees); | ||
274 | <a name="l00220"></a>00220 <a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a> -= center.X; | ||
275 | <a name="l00221"></a>00221 <a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a> -= center.Y; | ||
276 | <a name="l00222"></a>00222 <span class="keyword">set</span>((T)(<a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a>*cs - <a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a>*sn), (T)(<a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a>*sn + <a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a>*cs), <a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a>); | ||
277 | <a name="l00223"></a>00223 <a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a> += center.X; | ||
278 | <a name="l00224"></a>00224 <a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a> += center.Y; | ||
279 | <a name="l00225"></a>00225 } | ||
280 | <a name="l00226"></a>00226 | ||
281 | <a name="l00228"></a>00228 | ||
282 | <a name="l00230"></a><a class="code" href="classirr_1_1core_1_1vector3d.html#aaa048312f75f152861479cb48e2ddfe4">00230</a> <span class="keywordtype">void</span> <a class="code" href="classirr_1_1core_1_1vector3d.html#aaa048312f75f152861479cb48e2ddfe4" title="Rotates the vector by a specified number of degrees around the X axis and the specified center...">rotateYZBy</a>(<a class="code" href="namespaceirr.html#a1325b02603ad449f92c68fc640af9b28" title="64 bit floating point variable.">f64</a> degrees, <span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">vector3d<T></a>& center=<a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">vector3d<T></a>()) | ||
283 | <a name="l00231"></a>00231 { | ||
284 | <a name="l00232"></a>00232 degrees *= <a class="code" href="namespaceirr_1_1core.html#a8e21b5969c8292857f7c9c5dcfd61c35" title="64bit constant for converting from degrees to radians (formally known as GRAD_PI2)">DEGTORAD64</a>; | ||
285 | <a name="l00233"></a>00233 <a class="code" href="namespaceirr.html#a1325b02603ad449f92c68fc640af9b28" title="64 bit floating point variable.">f64</a> cs = cos(degrees); | ||
286 | <a name="l00234"></a>00234 <a class="code" href="namespaceirr.html#a1325b02603ad449f92c68fc640af9b28" title="64 bit floating point variable.">f64</a> sn = sin(degrees); | ||
287 | <a name="l00235"></a>00235 <a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a> -= center.Z; | ||
288 | <a name="l00236"></a>00236 <a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a> -= center.Y; | ||
289 | <a name="l00237"></a>00237 <span class="keyword">set</span>(<a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a>, (T)(<a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a>*cs - <a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a>*sn), (T)(<a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a>*sn + <a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a>*cs)); | ||
290 | <a name="l00238"></a>00238 <a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a> += center.Z; | ||
291 | <a name="l00239"></a>00239 <a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a> += center.Y; | ||
292 | <a name="l00240"></a>00240 } | ||
293 | <a name="l00241"></a>00241 | ||
294 | <a name="l00243"></a>00243 | ||
295 | <a name="l00247"></a><a class="code" href="classirr_1_1core_1_1vector3d.html#ab0ad2c732121c2b6e36c2c2e9ed715fd">00247</a> <a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">vector3d<T></a> <a class="code" href="classirr_1_1core_1_1vector3d.html#ab0ad2c732121c2b6e36c2c2e9ed715fd" title="Creates an interpolated vector between this vector and another vector.">getInterpolated</a>(<span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">vector3d<T></a>& other, <a class="code" href="namespaceirr.html#a1325b02603ad449f92c68fc640af9b28" title="64 bit floating point variable.">f64</a> d)<span class="keyword"> const</span> | ||
296 | <a name="l00248"></a>00248 <span class="keyword"> </span>{ | ||
297 | <a name="l00249"></a>00249 <span class="keyword">const</span> <a class="code" href="namespaceirr.html#a1325b02603ad449f92c68fc640af9b28" title="64 bit floating point variable.">f64</a> inv = 1.0 - d; | ||
298 | <a name="l00250"></a>00250 <span class="keywordflow">return</span> <a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">vector3d<T></a>((T)(other.<a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a>*inv + <a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a>*d), (T)(other.<a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a>*inv + <a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a>*d), (T)(other.<a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a>*inv + <a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a>*d)); | ||
299 | <a name="l00251"></a>00251 } | ||
300 | <a name="l00252"></a>00252 | ||
301 | <a name="l00254"></a>00254 | ||
302 | <a name="l00259"></a><a class="code" href="classirr_1_1core_1_1vector3d.html#adb749559ee0941687d4692941146a388">00259</a> <a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">vector3d<T></a> <a class="code" href="classirr_1_1core_1_1vector3d.html#adb749559ee0941687d4692941146a388" title="Creates a quadratically interpolated vector between this and two other vectors.">getInterpolated_quadratic</a>(<span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">vector3d<T></a>& v2, <span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">vector3d<T></a>& v3, <a class="code" href="namespaceirr.html#a1325b02603ad449f92c68fc640af9b28" title="64 bit floating point variable.">f64</a> d)<span class="keyword"> const</span> | ||
303 | <a name="l00260"></a>00260 <span class="keyword"> </span>{ | ||
304 | <a name="l00261"></a>00261 <span class="comment">// this*(1-d)*(1-d) + 2 * v2 * (1-d) + v3 * d * d;</span> | ||
305 | <a name="l00262"></a>00262 <span class="keyword">const</span> <a class="code" href="namespaceirr.html#a1325b02603ad449f92c68fc640af9b28" title="64 bit floating point variable.">f64</a> inv = (T) 1.0 - d; | ||
306 | <a name="l00263"></a>00263 <span class="keyword">const</span> <a class="code" href="namespaceirr.html#a1325b02603ad449f92c68fc640af9b28" title="64 bit floating point variable.">f64</a> mul0 = inv * inv; | ||
307 | <a name="l00264"></a>00264 <span class="keyword">const</span> <a class="code" href="namespaceirr.html#a1325b02603ad449f92c68fc640af9b28" title="64 bit floating point variable.">f64</a> mul1 = (T) 2.0 * d * inv; | ||
308 | <a name="l00265"></a>00265 <span class="keyword">const</span> <a class="code" href="namespaceirr.html#a1325b02603ad449f92c68fc640af9b28" title="64 bit floating point variable.">f64</a> mul2 = d * d; | ||
309 | <a name="l00266"></a>00266 | ||
310 | <a name="l00267"></a>00267 <span class="keywordflow">return</span> <a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">vector3d<T></a> ((T)(<a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a> * mul0 + v2.<a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a> * mul1 + v3.<a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a> * mul2), | ||
311 | <a name="l00268"></a>00268 (T)(<a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a> * mul0 + v2.<a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a> * mul1 + v3.<a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a> * mul2), | ||
312 | <a name="l00269"></a>00269 (T)(<a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a> * mul0 + v2.<a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a> * mul1 + v3.<a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a> * mul2)); | ||
313 | <a name="l00270"></a>00270 } | ||
314 | <a name="l00271"></a>00271 | ||
315 | <a name="l00273"></a>00273 | ||
316 | <a name="l00278"></a><a class="code" href="classirr_1_1core_1_1vector3d.html#a32a888e0f608a20deee98c794a321c4c">00278</a> <a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">vector3d<T></a>& <a class="code" href="classirr_1_1core_1_1vector3d.html#a32a888e0f608a20deee98c794a321c4c" title="Sets this vector to the linearly interpolated vector between a and b.">interpolate</a>(<span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">vector3d<T></a>& a, <span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">vector3d<T></a>& b, <a class="code" href="namespaceirr.html#a1325b02603ad449f92c68fc640af9b28" title="64 bit floating point variable.">f64</a> d) | ||
317 | <a name="l00279"></a>00279 { | ||
318 | <a name="l00280"></a>00280 <a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a> = (T)((<a class="code" href="namespaceirr.html#a1325b02603ad449f92c68fc640af9b28" title="64 bit floating point variable.">f64</a>)b.<a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a> + ( ( a.<a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a> - b.<a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a> ) * d )); | ||
319 | <a name="l00281"></a>00281 <a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a> = (T)((<a class="code" href="namespaceirr.html#a1325b02603ad449f92c68fc640af9b28" title="64 bit floating point variable.">f64</a>)b.<a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a> + ( ( a.<a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a> - b.<a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a> ) * d )); | ||
320 | <a name="l00282"></a>00282 <a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a> = (T)((<a class="code" href="namespaceirr.html#a1325b02603ad449f92c68fc640af9b28" title="64 bit floating point variable.">f64</a>)b.<a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a> + ( ( a.<a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a> - b.<a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a> ) * d )); | ||
321 | <a name="l00283"></a>00283 <span class="keywordflow">return</span> *<span class="keyword">this</span>; | ||
322 | <a name="l00284"></a>00284 } | ||
323 | <a name="l00285"></a>00285 | ||
324 | <a name="l00286"></a>00286 | ||
325 | <a name="l00288"></a>00288 | ||
326 | <a name="l00301"></a><a class="code" href="classirr_1_1core_1_1vector3d.html#a9485549addf9967247d3431c7746fbda">00301</a> <a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">vector3d<T></a> <a class="code" href="classirr_1_1core_1_1vector3d.html#a9485549addf9967247d3431c7746fbda" title="Get the rotations that would make a (0,0,1) direction vector point in the same direction as this dire...">getHorizontalAngle</a>()<span class="keyword"> const</span> | ||
327 | <a name="l00302"></a>00302 <span class="keyword"> </span>{ | ||
328 | <a name="l00303"></a>00303 <a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">vector3d<T></a> angle; | ||
329 | <a name="l00304"></a>00304 | ||
330 | <a name="l00305"></a>00305 <span class="keyword">const</span> <a class="code" href="namespaceirr.html#a1325b02603ad449f92c68fc640af9b28" title="64 bit floating point variable.">f64</a> tmp = (atan2((<a class="code" href="namespaceirr.html#a1325b02603ad449f92c68fc640af9b28" title="64 bit floating point variable.">f64</a>)<a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a>, (<a class="code" href="namespaceirr.html#a1325b02603ad449f92c68fc640af9b28" title="64 bit floating point variable.">f64</a>)<a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a>) * <a class="code" href="namespaceirr_1_1core.html#ae7afeb48af12f5f5130cd179a644ec58" title="64bit constant for converting from radians to degrees">RADTODEG64</a>); | ||
331 | <a name="l00306"></a>00306 angle.<a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a> = (T)tmp; | ||
332 | <a name="l00307"></a>00307 | ||
333 | <a name="l00308"></a>00308 <span class="keywordflow">if</span> (angle.<a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a> < 0) | ||
334 | <a name="l00309"></a>00309 angle.<a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a> += 360; | ||
335 | <a name="l00310"></a>00310 <span class="keywordflow">if</span> (angle.<a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a> >= 360) | ||
336 | <a name="l00311"></a>00311 angle.<a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a> -= 360; | ||
337 | <a name="l00312"></a>00312 | ||
338 | <a name="l00313"></a>00313 <span class="keyword">const</span> <a class="code" href="namespaceirr.html#a1325b02603ad449f92c68fc640af9b28" title="64 bit floating point variable.">f64</a> z1 = <a class="code" href="namespaceirr_1_1core.html#af2f378cc34a19f5da6fe1d4961646d1d">core::squareroot</a>(X*X + Z*Z); | ||
339 | <a name="l00314"></a>00314 | ||
340 | <a name="l00315"></a>00315 angle.<a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a> = (T)(atan2((<a class="code" href="namespaceirr.html#a1325b02603ad449f92c68fc640af9b28" title="64 bit floating point variable.">f64</a>)z1, (<a class="code" href="namespaceirr.html#a1325b02603ad449f92c68fc640af9b28" title="64 bit floating point variable.">f64</a>)<a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a>) * <a class="code" href="namespaceirr_1_1core.html#ae7afeb48af12f5f5130cd179a644ec58" title="64bit constant for converting from radians to degrees">RADTODEG64</a> - 90.0); | ||
341 | <a name="l00316"></a>00316 | ||
342 | <a name="l00317"></a>00317 <span class="keywordflow">if</span> (angle.<a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a> < 0) | ||
343 | <a name="l00318"></a>00318 angle.<a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a> += 360; | ||
344 | <a name="l00319"></a>00319 <span class="keywordflow">if</span> (angle.<a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a> >= 360) | ||
345 | <a name="l00320"></a>00320 angle.<a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a> -= 360; | ||
346 | <a name="l00321"></a>00321 | ||
347 | <a name="l00322"></a>00322 <span class="keywordflow">return</span> angle; | ||
348 | <a name="l00323"></a>00323 } | ||
349 | <a name="l00324"></a>00324 | ||
350 | <a name="l00326"></a>00326 | ||
351 | <a name="l00330"></a><a class="code" href="classirr_1_1core_1_1vector3d.html#aab6d3c2dc082d8142c7ac4da8625f93a">00330</a> <a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">vector3d<T></a> <a class="code" href="classirr_1_1core_1_1vector3d.html#aab6d3c2dc082d8142c7ac4da8625f93a" title="Get the spherical coordinate angles.">getSphericalCoordinateAngles</a>()<span class="keyword"> const</span> | ||
352 | <a name="l00331"></a>00331 <span class="keyword"> </span>{ | ||
353 | <a name="l00332"></a>00332 <a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">vector3d<T></a> angle; | ||
354 | <a name="l00333"></a>00333 <span class="keyword">const</span> <a class="code" href="namespaceirr.html#a1325b02603ad449f92c68fc640af9b28" title="64 bit floating point variable.">f64</a> length = <a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a>*<a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a> + <a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a>*<a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a> + <a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a>*<a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a>; | ||
355 | <a name="l00334"></a>00334 | ||
356 | <a name="l00335"></a>00335 <span class="keywordflow">if</span> (length) | ||
357 | <a name="l00336"></a>00336 { | ||
358 | <a name="l00337"></a>00337 <span class="keywordflow">if</span> (<a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a>!=0) | ||
359 | <a name="l00338"></a>00338 { | ||
360 | <a name="l00339"></a>00339 angle.<a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a> = (T)(atan2((<a class="code" href="namespaceirr.html#a1325b02603ad449f92c68fc640af9b28" title="64 bit floating point variable.">f64</a>)Z,(<a class="code" href="namespaceirr.html#a1325b02603ad449f92c68fc640af9b28" title="64 bit floating point variable.">f64</a>)<a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a>) * <a class="code" href="namespaceirr_1_1core.html#ae7afeb48af12f5f5130cd179a644ec58" title="64bit constant for converting from radians to degrees">RADTODEG64</a>); | ||
361 | <a name="l00340"></a>00340 } | ||
362 | <a name="l00341"></a>00341 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (Z<0) | ||
363 | <a name="l00342"></a>00342 angle.<a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a>=180; | ||
364 | <a name="l00343"></a>00343 | ||
365 | <a name="l00344"></a>00344 angle.<a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a> = (T)(acos(<a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a> * <a class="code" href="namespaceirr_1_1core.html#adaef309f12c2a3386e94610e24f2bfa7">core::reciprocal_squareroot</a>(length)) * <a class="code" href="namespaceirr_1_1core.html#ae7afeb48af12f5f5130cd179a644ec58" title="64bit constant for converting from radians to degrees">RADTODEG64</a>); | ||
366 | <a name="l00345"></a>00345 } | ||
367 | <a name="l00346"></a>00346 <span class="keywordflow">return</span> angle; | ||
368 | <a name="l00347"></a>00347 } | ||
369 | <a name="l00348"></a>00348 | ||
370 | <a name="l00350"></a>00350 | ||
371 | <a name="l00357"></a><a class="code" href="classirr_1_1core_1_1vector3d.html#a4db5cfbb71995227e37334a19278474d">00357</a> <a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">vector3d<T></a> <a class="code" href="classirr_1_1core_1_1vector3d.html#a4db5cfbb71995227e37334a19278474d" title="Builds a direction vector from (this) rotation vector.">rotationToDirection</a>(<span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">vector3d<T></a> & forwards = <a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">vector3d<T></a>(0, 0, 1))<span class="keyword"> const</span> | ||
372 | <a name="l00358"></a>00358 <span class="keyword"> </span>{ | ||
373 | <a name="l00359"></a>00359 <span class="keyword">const</span> <a class="code" href="namespaceirr.html#a1325b02603ad449f92c68fc640af9b28" title="64 bit floating point variable.">f64</a> cr = cos( <a class="code" href="namespaceirr_1_1core.html#a8e21b5969c8292857f7c9c5dcfd61c35" title="64bit constant for converting from degrees to radians (formally known as GRAD_PI2)">core::DEGTORAD64</a> * <a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a> ); | ||
374 | <a name="l00360"></a>00360 <span class="keyword">const</span> <a class="code" href="namespaceirr.html#a1325b02603ad449f92c68fc640af9b28" title="64 bit floating point variable.">f64</a> sr = sin( <a class="code" href="namespaceirr_1_1core.html#a8e21b5969c8292857f7c9c5dcfd61c35" title="64bit constant for converting from degrees to radians (formally known as GRAD_PI2)">core::DEGTORAD64</a> * X ); | ||
375 | <a name="l00361"></a>00361 <span class="keyword">const</span> <a class="code" href="namespaceirr.html#a1325b02603ad449f92c68fc640af9b28" title="64 bit floating point variable.">f64</a> cp = cos( <a class="code" href="namespaceirr_1_1core.html#a8e21b5969c8292857f7c9c5dcfd61c35" title="64bit constant for converting from degrees to radians (formally known as GRAD_PI2)">core::DEGTORAD64</a> * <a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a> ); | ||
376 | <a name="l00362"></a>00362 <span class="keyword">const</span> <a class="code" href="namespaceirr.html#a1325b02603ad449f92c68fc640af9b28" title="64 bit floating point variable.">f64</a> sp = sin( <a class="code" href="namespaceirr_1_1core.html#a8e21b5969c8292857f7c9c5dcfd61c35" title="64bit constant for converting from degrees to radians (formally known as GRAD_PI2)">core::DEGTORAD64</a> * Y ); | ||
377 | <a name="l00363"></a>00363 <span class="keyword">const</span> <a class="code" href="namespaceirr.html#a1325b02603ad449f92c68fc640af9b28" title="64 bit floating point variable.">f64</a> cy = cos( <a class="code" href="namespaceirr_1_1core.html#a8e21b5969c8292857f7c9c5dcfd61c35" title="64bit constant for converting from degrees to radians (formally known as GRAD_PI2)">core::DEGTORAD64</a> * <a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a> ); | ||
378 | <a name="l00364"></a>00364 <span class="keyword">const</span> <a class="code" href="namespaceirr.html#a1325b02603ad449f92c68fc640af9b28" title="64 bit floating point variable.">f64</a> sy = sin( <a class="code" href="namespaceirr_1_1core.html#a8e21b5969c8292857f7c9c5dcfd61c35" title="64bit constant for converting from degrees to radians (formally known as GRAD_PI2)">core::DEGTORAD64</a> * Z ); | ||
379 | <a name="l00365"></a>00365 | ||
380 | <a name="l00366"></a>00366 <span class="keyword">const</span> <a class="code" href="namespaceirr.html#a1325b02603ad449f92c68fc640af9b28" title="64 bit floating point variable.">f64</a> srsp = sr*sp; | ||
381 | <a name="l00367"></a>00367 <span class="keyword">const</span> <a class="code" href="namespaceirr.html#a1325b02603ad449f92c68fc640af9b28" title="64 bit floating point variable.">f64</a> crsp = cr*sp; | ||
382 | <a name="l00368"></a>00368 | ||
383 | <a name="l00369"></a>00369 <span class="keyword">const</span> <a class="code" href="namespaceirr.html#a1325b02603ad449f92c68fc640af9b28" title="64 bit floating point variable.">f64</a> pseudoMatrix[] = { | ||
384 | <a name="l00370"></a>00370 ( cp*cy ), ( cp*sy ), ( -sp ), | ||
385 | <a name="l00371"></a>00371 ( srsp*cy-cr*sy ), ( srsp*sy+cr*cy ), ( sr*cp ), | ||
386 | <a name="l00372"></a>00372 ( crsp*cy+sr*sy ), ( crsp*sy-sr*cy ), ( cr*cp )}; | ||
387 | <a name="l00373"></a>00373 | ||
388 | <a name="l00374"></a>00374 <span class="keywordflow">return</span> <a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">vector3d<T></a>( | ||
389 | <a name="l00375"></a>00375 (T)(forwards.X * pseudoMatrix[0] + | ||
390 | <a name="l00376"></a>00376 forwards.Y * pseudoMatrix[3] + | ||
391 | <a name="l00377"></a>00377 forwards.Z * pseudoMatrix[6]), | ||
392 | <a name="l00378"></a>00378 (T)(forwards.X * pseudoMatrix[1] + | ||
393 | <a name="l00379"></a>00379 forwards.Y * pseudoMatrix[4] + | ||
394 | <a name="l00380"></a>00380 forwards.Z * pseudoMatrix[7]), | ||
395 | <a name="l00381"></a>00381 (T)(forwards.X * pseudoMatrix[2] + | ||
396 | <a name="l00382"></a>00382 forwards.Y * pseudoMatrix[5] + | ||
397 | <a name="l00383"></a>00383 forwards.Z * pseudoMatrix[8])); | ||
398 | <a name="l00384"></a>00384 } | ||
399 | <a name="l00385"></a>00385 | ||
400 | <a name="l00387"></a>00387 | ||
401 | <a name="l00389"></a><a class="code" href="classirr_1_1core_1_1vector3d.html#a357c8d00022e04a68fb20b24f9eb34ce">00389</a> <span class="keywordtype">void</span> <a class="code" href="classirr_1_1core_1_1vector3d.html#a357c8d00022e04a68fb20b24f9eb34ce" title="Fills an array of 4 values with the vector data (usually floats).">getAs4Values</a>(T* <a class="code" href="classirr_1_1core_1_1array.html" title="Self reallocating template array (like stl vector) with additional features.">array</a>)<span class="keyword"> const</span> | ||
402 | <a name="l00390"></a>00390 <span class="keyword"> </span>{ | ||
403 | <a name="l00391"></a>00391 array[0] = <a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a>; | ||
404 | <a name="l00392"></a>00392 array[1] = <a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a>; | ||
405 | <a name="l00393"></a>00393 array[2] = <a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a>; | ||
406 | <a name="l00394"></a>00394 array[3] = 0; | ||
407 | <a name="l00395"></a>00395 } | ||
408 | <a name="l00396"></a>00396 | ||
409 | <a name="l00398"></a>00398 | ||
410 | <a name="l00399"></a><a class="code" href="classirr_1_1core_1_1vector3d.html#a543aaa4376afd2b5321228fa71540329">00399</a> <span class="keywordtype">void</span> <a class="code" href="classirr_1_1core_1_1vector3d.html#a543aaa4376afd2b5321228fa71540329" title="Fills an array of 3 values with the vector data (usually floats).">getAs3Values</a>(T* <a class="code" href="classirr_1_1core_1_1array.html" title="Self reallocating template array (like stl vector) with additional features.">array</a>)<span class="keyword"> const</span> | ||
411 | <a name="l00400"></a>00400 <span class="keyword"> </span>{ | ||
412 | <a name="l00401"></a>00401 array[0] = <a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a>; | ||
413 | <a name="l00402"></a>00402 array[1] = <a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a>; | ||
414 | <a name="l00403"></a>00403 array[2] = <a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a>; | ||
415 | <a name="l00404"></a>00404 } | ||
416 | <a name="l00405"></a>00405 | ||
417 | <a name="l00406"></a>00406 | ||
418 | <a name="l00408"></a><a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b">00408</a> T <a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a>; | ||
419 | <a name="l00409"></a>00409 | ||
420 | <a name="l00411"></a><a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd">00411</a> T <a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a>; | ||
421 | <a name="l00412"></a>00412 | ||
422 | <a name="l00414"></a><a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed">00414</a> T <a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a>; | ||
423 | <a name="l00415"></a>00415 }; | ||
424 | <a name="l00416"></a>00416 | ||
425 | <a name="l00418"></a>00418 <span class="comment">// Implementor note: inline keyword needed due to template specialization for s32. Otherwise put specialization into a .cpp</span> | ||
426 | <a name="l00419"></a>00419 <span class="keyword">template</span> <> | ||
427 | <a name="l00420"></a><a class="code" href="classirr_1_1core_1_1vector3d.html#a7597f07300c420146117f2e5854153c2">00420</a> <span class="keyword">inline</span> <a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">vector3d<s32></a> <a class="code" href="classirr_1_1core_1_1vector3d.html#a82f734747a8d460a73482dc69a1d2ece">vector3d<s32>::operator /</a>(<a class="code" href="namespaceirr.html#ac66849b7a6ed16e30ebede579f9b47c6" title="32 bit signed variable.">s32</a> val)<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">core::vector3d<s32></a>(<a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a>/val,<a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a>/val,<a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a>/val);} | ||
428 | <a name="l00421"></a>00421 <span class="keyword">template</span> <> | ||
429 | <a name="l00422"></a><a class="code" href="classirr_1_1core_1_1vector3d.html#a1d153631bde79b7bf50c2ab453d2bc60">00422</a> <span class="keyword">inline</span> <a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">vector3d<s32></a>& <a class="code" href="classirr_1_1core_1_1vector3d.html#ab46c94558797997b369cfe0a38c57794">vector3d<s32>::operator /=</a>(<a class="code" href="namespaceirr.html#ac66849b7a6ed16e30ebede579f9b47c6" title="32 bit signed variable.">s32</a> val) {<a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a>/=val;<a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a>/=val;<a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a>/=val; <span class="keywordflow">return</span> *<span class="keyword">this</span>;} | ||
430 | <a name="l00423"></a>00423 | ||
431 | <a name="l00424"></a>00424 <span class="keyword">template</span> <> | ||
432 | <a name="l00425"></a><a class="code" href="classirr_1_1core_1_1vector3d.html#aa11de50e7f575c6c282de66417279444">00425</a> <span class="keyword">inline</span> <a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">vector3d<s32></a> <a class="code" href="classirr_1_1core_1_1vector3d.html#aab6d3c2dc082d8142c7ac4da8625f93a" title="Get the spherical coordinate angles.">vector3d<s32>::getSphericalCoordinateAngles</a>()<span class="keyword"> const</span> | ||
433 | <a name="l00426"></a>00426 <span class="keyword"> </span>{ | ||
434 | <a name="l00427"></a>00427 <a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">vector3d<s32></a> angle; | ||
435 | <a name="l00428"></a>00428 <span class="keyword">const</span> <a class="code" href="namespaceirr.html#a1325b02603ad449f92c68fc640af9b28" title="64 bit floating point variable.">f64</a> length = <a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a>*<a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a> + <a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a>*<a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a> + <a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a>*<a class="code" href="classirr_1_1core_1_1vector3d.html#ac2beb702e718c3579971348981b220ed" title="Z coordinate of the vector.">Z</a>; | ||
436 | <a name="l00429"></a>00429 | ||
437 | <a name="l00430"></a>00430 <span class="keywordflow">if</span> (length) | ||
438 | <a name="l00431"></a>00431 { | ||
439 | <a name="l00432"></a>00432 <span class="keywordflow">if</span> (<a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a>!=0) | ||
440 | <a name="l00433"></a>00433 { | ||
441 | <a name="l00434"></a>00434 angle.<a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a> = <a class="code" href="namespaceirr_1_1core.html#ae46f57f03e9033c57c180fbe83b04cf2">round32</a>((<a class="code" href="namespaceirr.html#a0277be98d67dc26ff93b1a6a1d086b07" title="32 bit floating point variable.">f32</a>)(atan2((<a class="code" href="namespaceirr.html#a1325b02603ad449f92c68fc640af9b28" title="64 bit floating point variable.">f64</a>)Z,(<a class="code" href="namespaceirr.html#a1325b02603ad449f92c68fc640af9b28" title="64 bit floating point variable.">f64</a>)<a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a>) * <a class="code" href="namespaceirr_1_1core.html#ae7afeb48af12f5f5130cd179a644ec58" title="64bit constant for converting from radians to degrees">RADTODEG64</a>)); | ||
442 | <a name="l00435"></a>00435 } | ||
443 | <a name="l00436"></a>00436 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (Z<0) | ||
444 | <a name="l00437"></a>00437 angle.<a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a>=180; | ||
445 | <a name="l00438"></a>00438 | ||
446 | <a name="l00439"></a>00439 angle.<a class="code" href="classirr_1_1core_1_1vector3d.html#a8c9ed06774dc668112bcefacb6e7732b" title="X coordinate of the vector.">X</a> = <a class="code" href="namespaceirr_1_1core.html#ae46f57f03e9033c57c180fbe83b04cf2">round32</a>((<a class="code" href="namespaceirr.html#a0277be98d67dc26ff93b1a6a1d086b07" title="32 bit floating point variable.">f32</a>)(acos(<a class="code" href="classirr_1_1core_1_1vector3d.html#af8f87c2fe0ce717ade7c3d7419302fbd" title="Y coordinate of the vector.">Y</a> * <a class="code" href="namespaceirr_1_1core.html#adaef309f12c2a3386e94610e24f2bfa7">core::reciprocal_squareroot</a>(length)) * <a class="code" href="namespaceirr_1_1core.html#ae7afeb48af12f5f5130cd179a644ec58" title="64bit constant for converting from radians to degrees">RADTODEG64</a>)); | ||
447 | <a name="l00440"></a>00440 } | ||
448 | <a name="l00441"></a>00441 <span class="keywordflow">return</span> angle; | ||
449 | <a name="l00442"></a>00442 } | ||
450 | <a name="l00443"></a>00443 | ||
451 | <a name="l00445"></a><a class="code" href="namespaceirr_1_1core.html#a06f169d08b5c429f5575acb7edbad811">00445</a> <span class="keyword">typedef</span> <a class="code" href="classirr_1_1core_1_1vector3d.html">vector3d<f32></a> <a class="code" href="namespaceirr_1_1core.html#a06f169d08b5c429f5575acb7edbad811" title="Typedef for a f32 3d vector.">vector3df</a>; | ||
452 | <a name="l00446"></a>00446 | ||
453 | <a name="l00448"></a><a class="code" href="namespaceirr_1_1core.html#a5608360e6c03b6bc9d600dad4d3b25ab">00448</a> <span class="keyword">typedef</span> <a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">vector3d<s32></a> <a class="code" href="namespaceirr_1_1core.html#a5608360e6c03b6bc9d600dad4d3b25ab" title="Typedef for an integer 3d vector.">vector3di</a>; | ||
454 | <a name="l00449"></a>00449 | ||
455 | <a name="l00451"></a>00451 <span class="keyword">template</span><<span class="keyword">class</span> S, <span class="keyword">class</span> T> | ||
456 | <a name="l00452"></a><a class="code" href="namespaceirr_1_1core.html#a169752e96cde0be366fd3d9efea44dc1">00452</a> <a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">vector3d<T></a> <a class="code" href="classirr_1_1core_1_1vector3d.html#aab7ded0a282f23cdc75533873f41dee5">operator*</a>(<span class="keyword">const</span> S scalar, <span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1vector3d.html" title="3d vector template class with lots of operators and methods.">vector3d<T></a>& vector) { <span class="keywordflow">return</span> vector*scalar; } | ||
457 | <a name="l00453"></a>00453 | ||
458 | <a name="l00454"></a>00454 } <span class="comment">// end namespace core</span> | ||
459 | <a name="l00455"></a>00455 } <span class="comment">// end namespace irr</span> | ||
460 | <a name="l00456"></a>00456 | ||
461 | <a name="l00457"></a>00457 <span class="preprocessor">#endif</span> | ||
462 | <a name="l00458"></a>00458 <span class="preprocessor"></span> | ||
463 | </pre></div></div> | ||
464 | </div> | ||
465 | <div id="nav-path" class="navpath"> | ||
466 | <ul> | ||
467 | <li class="navelem"><a class="el" href="vector3d_8h.html">vector3d.h</a> </li> | ||
468 | <!-- window showing the filter options --> | ||
469 | <div id="MSearchSelectWindow" | ||
470 | onmouseover="return searchBox.OnSearchSelectShow()" | ||
471 | onmouseout="return searchBox.OnSearchSelectHide()" | ||
472 | onkeydown="return searchBox.OnSearchSelectKey(event)"> | ||
473 | <a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark"> </span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark"> </span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark"> </span>Defines</a></div> | ||
474 | |||
475 | <!-- iframe showing the search results (closed by default) --> | ||
476 | <div id="MSearchResultsWindow"> | ||
477 | <iframe src="javascript:void(0)" frameborder="0" | ||
478 | name="MSearchResults" id="MSearchResults"> | ||
479 | </iframe> | ||
480 | </div> | ||
481 | |||
482 | |||
483 | <li class="footer"> | ||
484 | <a href="http://irrlicht.sourceforge.net" target="_blank">Irrlicht | ||
485 | Engine</a> Documentation © 2003-2012 by Nikolaus Gebhardt. Generated on Tue Nov 6 2012 11:06:00 for Irrlicht 3D Engine by | ||
486 | <a href="http://www.doxygen.org/index.html" target="_blank">Doxygen</a> 1.7.5.1 </li> | ||
487 | </ul> | ||
488 | </div> | ||
489 | |||
490 | |||
491 | </body> | ||
492 | </html> | ||