aboutsummaryrefslogtreecommitdiff
path: root/docs/source_docs/files/bt_vector3_8h-source.html
blob: 495fe6842d29c02c453e84c0d906ed3adf9d2e7c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
<html>
	<head>
		<title>NVIDIA(R) Blast(R) SDK 1.1 Source Reference: sdk/extensions/authoring/source/VHACD/inc/btVector3.h Source File</title>
		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
		<LINK HREF="NVIDIA.css" REL="stylesheet" TYPE="text/css">
	</head>

	<body bgcolor="#FFFFFF">
		<div id="header">
			<hr class="first">
			<img alt="" src="blast_logo.png">
			<br>
			<center>
				<a class="qindex" href="main.html">Main Page</a> &nbsp; 
				<!-- <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; //-->
				<a class="qindex" href="annotated.html">Class List</a> &nbsp; 
				<a class="qindex" href="functions.html">Class Members</a> &nbsp;  
			</center>
			<hr class="second">
		</div>
<!-- Generated by Doxygen 1.5.8 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>User's&nbsp;Guide</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
      <li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
    </ul>
  </div>
<h1>sdk/extensions/authoring/source/VHACD/inc/btVector3.h</h1><a href="bt_vector3_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<a name="l00002"></a>00002 <span class="comment">Copyright (c) 2003-2006 Gino van den Bergen / Erwin Coumans  http://continuousphysics.com/Bullet/</span>
<a name="l00003"></a>00003 <span class="comment"></span>
<a name="l00004"></a>00004 <span class="comment">This software is provided 'as-is', without any express or implied warranty.</span>
<a name="l00005"></a>00005 <span class="comment">In no event will the authors be held liable for any damages arising from the use of this software.</span>
<a name="l00006"></a>00006 <span class="comment">Permission is granted to anyone to use this software for any purpose, </span>
<a name="l00007"></a>00007 <span class="comment">including commercial applications, and to alter it and redistribute it freely, </span>
<a name="l00008"></a>00008 <span class="comment">subject to the following restrictions:</span>
<a name="l00009"></a>00009 <span class="comment"></span>
<a name="l00010"></a>00010 <span class="comment">1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.</span>
<a name="l00011"></a>00011 <span class="comment">2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.</span>
<a name="l00012"></a>00012 <span class="comment">3. This notice may not be removed or altered from any source distribution.</span>
<a name="l00013"></a>00013 <span class="comment">*/</span>
<a name="l00014"></a>00014 
<a name="l00015"></a>00015 <span class="preprocessor">#ifndef BT_VECTOR3_H</span>
<a name="l00016"></a>00016 <span class="preprocessor"></span><span class="preprocessor">#define BT_VECTOR3_H</span>
<a name="l00017"></a>00017 <span class="preprocessor"></span>
<a name="l00018"></a>00018 <span class="preprocessor">#include "<a class="code" href="bt_min_max_8h.html">btMinMax.h</a>"</span>
<a name="l00019"></a>00019 <span class="preprocessor">#include "<a class="code" href="bt_scalar_8h.html">btScalar.h</a>"</span>
<a name="l00020"></a>00020 
<a name="l00021"></a>00021 <span class="preprocessor">#ifdef BT_USE_DOUBLE_PRECISION</span>
<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define btVector3Data btVector3DoubleData</span>
<a name="l00023"></a>00023 <span class="preprocessor"></span><span class="preprocessor">#define btVector3DataName "btVector3DoubleData"</span>
<a name="l00024"></a>00024 <span class="preprocessor"></span><span class="preprocessor">#else</span>
<a name="l00025"></a><a class="code" href="bt_vector3_8h.html#d116b75e5135551c1335437e47fd8a3f">00025</a> <span class="preprocessor"></span><span class="preprocessor">#define btVector3Data btVector3FloatData</span>
<a name="l00026"></a><a class="code" href="bt_vector3_8h.html#22c3af642cd6ee73d125e310c6318cce">00026</a> <span class="preprocessor"></span><span class="preprocessor">#define btVector3DataName "btVector3FloatData"</span>
<a name="l00027"></a>00027 <span class="preprocessor"></span><span class="preprocessor">#endif //BT_USE_DOUBLE_PRECISION</span>
<a name="l00028"></a>00028 <span class="preprocessor"></span>
<a name="l00033"></a>00033 <a class="code" href="bt_scalar_8h.html#38c30fdd0ea2558373a1b6e41c77d9d2">ATTRIBUTE_ALIGNED16</a>(<span class="keyword">class</span>)
<a name="l00034"></a>00034 <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a>
<a name="l00035"></a>00035 {
<a name="l00036"></a>00036 <span class="keyword">public</span>:
<a name="l00037"></a>00037 <span class="preprocessor">#if defined(__SPU__) &amp;&amp; defined(__CELLOS_LV2__)</span>
<a name="l00038"></a>00038 <span class="preprocessor"></span>    <a class="code" href="bt_scalar_8h.html#1e5824cfc8adbf5a77f2622132d16018" title="The btScalar type abstracts floating point numbers, to easily switch between double...">btScalar</a> <a class="code" href="bt_vector3_8h.html#c48c7986f7c3a03cd2450337d985d73e" title="btVector3 can be used to represent 3D points and vectors. It has an un-used w component...">m_floats</a>[4];
<a name="l00039"></a>00039 
<a name="l00040"></a>00040 <span class="keyword">public</span>:
<a name="l00041"></a>00041     <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> <span class="keyword">const</span> vec_float4&amp; get128()<span class="keyword"> const</span>
<a name="l00042"></a>00042 <span class="keyword">    </span>{
<a name="l00043"></a>00043         <span class="keywordflow">return</span> *((<span class="keyword">const</span> vec_float4*)&amp;m_floats[0]);
<a name="l00044"></a>00044     }
<a name="l00045"></a>00045 
<a name="l00046"></a>00046 <span class="keyword">public</span>:
<a name="l00047"></a>00047 <span class="preprocessor">#else //__CELLOS_LV2__ __SPU__</span>
<a name="l00048"></a>00048 <span class="preprocessor"></span><span class="preprocessor">#ifdef BT_USE_SSE // _WIN32</span>
<a name="l00049"></a>00049 <span class="preprocessor"></span>    <span class="keyword">union </span>{
<a name="l00050"></a>00050         __m128 mVec128;
<a name="l00051"></a>00051         <a class="code" href="bt_scalar_8h.html#1e5824cfc8adbf5a77f2622132d16018" title="The btScalar type abstracts floating point numbers, to easily switch between double...">btScalar</a> m_floats[4];
<a name="l00052"></a>00052     };
<a name="l00053"></a>00053     <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> __m128 get128()<span class="keyword"> const</span>
<a name="l00054"></a>00054 <span class="keyword">    </span>{
<a name="l00055"></a>00055         <span class="keywordflow">return</span> mVec128;
<a name="l00056"></a>00056     }
<a name="l00057"></a>00057     <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> <span class="keywordtype">void</span> set128(__m128 v128)
<a name="l00058"></a>00058     {
<a name="l00059"></a>00059         mVec128 = v128;
<a name="l00060"></a>00060     }
<a name="l00061"></a>00061 <span class="preprocessor">#else</span>
<a name="l00062"></a><a class="code" href="bt_vector3_8h.html#c48c7986f7c3a03cd2450337d985d73e">00062</a> <span class="preprocessor"></span>    <a class="code" href="bt_scalar_8h.html#1e5824cfc8adbf5a77f2622132d16018" title="The btScalar type abstracts floating point numbers, to easily switch between double...">btScalar</a> m_floats[4];
<a name="l00063"></a>00063 <span class="preprocessor">#endif</span>
<a name="l00064"></a>00064 <span class="preprocessor"></span><span class="preprocessor">#endif //__CELLOS_LV2__ __SPU__</span>
<a name="l00065"></a>00065 <span class="preprocessor"></span>
<a name="l00066"></a>00066 <span class="keyword">public</span>:
<a name="l00068"></a><a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323">00068</a>     <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a>() {}
<a name="l00069"></a>00069 
<a name="l00075"></a><a class="code" href="bt_vector3_8h.html#ba0837be927ae5152dcdb38bc5945bd5">00075</a>     <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a>(<span class="keyword">const</span> <a class="code" href="bt_scalar_8h.html#1e5824cfc8adbf5a77f2622132d16018" title="The btScalar type abstracts floating point numbers, to easily switch between double...">btScalar</a>&amp; <a class="code" href="bt_vector3_8h.html#0d05bb202a57e1c47ae0eeeec2502c1b" title="Return the x value.">x</a>, <span class="keyword">const</span> <a class="code" href="bt_scalar_8h.html#1e5824cfc8adbf5a77f2622132d16018" title="The btScalar type abstracts floating point numbers, to easily switch between double...">btScalar</a>&amp; <a class="code" href="bt_vector3_8h.html#88617d2888b444b2ad2384b17b0eeadf" title="Return the y value.">y</a>, <span class="keyword">const</span> <a class="code" href="bt_scalar_8h.html#1e5824cfc8adbf5a77f2622132d16018" title="The btScalar type abstracts floating point numbers, to easily switch between double...">btScalar</a>&amp; <a class="code" href="bt_vector3_8h.html#49dd8d4770be4de32dd57f9b926aa396" title="Return the z value.">z</a>)
<a name="l00076"></a>00076     {
<a name="l00077"></a>00077         m_floats[0] = x;
<a name="l00078"></a>00078         m_floats[1] = y;
<a name="l00079"></a>00079         m_floats[2] = z;
<a name="l00080"></a>00080         m_floats[3] = <a class="code" href="bt_scalar_8h.html#1e5824cfc8adbf5a77f2622132d16018" title="The btScalar type abstracts floating point numbers, to easily switch between double...">btScalar</a>(0.);
<a name="l00081"></a>00081     }
<a name="l00082"></a>00082 
<a name="l00085"></a><a class="code" href="bt_vector3_8h.html#7a750b3fe432249ef0c50e95fb61c69f">00085</a>     <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a>&amp; <a class="code" href="bt_vector3_8h.html#7a750b3fe432249ef0c50e95fb61c69f" title="Add a vector to this one.">operator+=</a>(<span class="keyword">const</span> <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a>&amp; v)
<a name="l00086"></a>00086     {
<a name="l00087"></a>00087 
<a name="l00088"></a>00088         m_floats[0] += v.m_floats[0];
<a name="l00089"></a>00089         m_floats[1] += v.m_floats[1];
<a name="l00090"></a>00090         m_floats[2] += v.m_floats[2];
<a name="l00091"></a>00091         <span class="keywordflow">return</span> *<span class="keyword">this</span>;
<a name="l00092"></a>00092     }
<a name="l00093"></a>00093 
<a name="l00096"></a><a class="code" href="bt_vector3_8h.html#cad072d73dc2f6f9370157ec1715c8c1">00096</a>     <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a>&amp; <a class="code" href="bt_vector3_8h.html#cad072d73dc2f6f9370157ec1715c8c1" title="Subtract a vector from this one.">operator-=</a>(<span class="keyword">const</span> <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a>&amp; v)
<a name="l00097"></a>00097     {
<a name="l00098"></a>00098         m_floats[0] -= v.m_floats[0];
<a name="l00099"></a>00099         m_floats[1] -= v.m_floats[1];
<a name="l00100"></a>00100         m_floats[2] -= v.m_floats[2];
<a name="l00101"></a>00101         <span class="keywordflow">return</span> *<span class="keyword">this</span>;
<a name="l00102"></a>00102     }
<a name="l00105"></a><a class="code" href="bt_vector3_8h.html#d213bcd7fce55a2f9d310114a2e157eb">00105</a>     <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a>&amp; <a class="code" href="bt_vector3_8h.html#d213bcd7fce55a2f9d310114a2e157eb" title="Scale the vector.">operator*=</a>(<span class="keyword">const</span> <a class="code" href="bt_scalar_8h.html#1e5824cfc8adbf5a77f2622132d16018" title="The btScalar type abstracts floating point numbers, to easily switch between double...">btScalar</a>&amp; s)
<a name="l00106"></a>00106     {
<a name="l00107"></a>00107         m_floats[0] *= s;
<a name="l00108"></a>00108         m_floats[1] *= s;
<a name="l00109"></a>00109         m_floats[2] *= s;
<a name="l00110"></a>00110         <span class="keywordflow">return</span> *<span class="keyword">this</span>;
<a name="l00111"></a>00111     }
<a name="l00112"></a>00112 
<a name="l00115"></a><a class="code" href="bt_vector3_8h.html#40204accad7fbbe9fb169d235637a4c8">00115</a>     <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a>&amp; <a class="code" href="bt_vector3_8h.html#40204accad7fbbe9fb169d235637a4c8" title="Inversely scale the vector.">operator/=</a>(<span class="keyword">const</span> <a class="code" href="bt_scalar_8h.html#1e5824cfc8adbf5a77f2622132d16018" title="The btScalar type abstracts floating point numbers, to easily switch between double...">btScalar</a>&amp; s)
<a name="l00116"></a>00116     {
<a name="l00117"></a>00117         <a class="code" href="bt_scalar_8h.html#90bc8c8b8f79211b2b7f0356c4cd804f">btFullAssert</a>(s != <a class="code" href="bt_scalar_8h.html#1e5824cfc8adbf5a77f2622132d16018" title="The btScalar type abstracts floating point numbers, to easily switch between double...">btScalar</a>(0.0));
<a name="l00118"></a>00118         <span class="keywordflow">return</span> * <span class="keyword">this</span> *= <a class="code" href="bt_scalar_8h.html#1e5824cfc8adbf5a77f2622132d16018" title="The btScalar type abstracts floating point numbers, to easily switch between double...">btScalar</a>(1.0) / s;
<a name="l00119"></a>00119     }
<a name="l00120"></a>00120 
<a name="l00123"></a><a class="code" href="bt_vector3_8h.html#5e459518e79ca5e387a560cc70d3043f">00123</a>     <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> <a class="code" href="bt_scalar_8h.html#1e5824cfc8adbf5a77f2622132d16018" title="The btScalar type abstracts floating point numbers, to easily switch between double...">btScalar</a> <a class="code" href="bt_vector3_8h.html#5e459518e79ca5e387a560cc70d3043f" title="Return the dot product.">dot</a>(<span class="keyword">const</span> <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a>&amp; v)<span class="keyword"> const</span>
<a name="l00124"></a>00124 <span class="keyword">    </span>{
<a name="l00125"></a>00125         <span class="keywordflow">return</span> m_floats[0] * v.m_floats[0] + m_floats[1] * v.m_floats[1] + m_floats[2] * v.m_floats[2];
<a name="l00126"></a>00126     }
<a name="l00127"></a>00127 
<a name="l00129"></a><a class="code" href="bt_vector3_8h.html#e46609062457bbfeb6e44fdb01a4c696">00129</a>     <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> <a class="code" href="bt_scalar_8h.html#1e5824cfc8adbf5a77f2622132d16018" title="The btScalar type abstracts floating point numbers, to easily switch between double...">btScalar</a> <a class="code" href="bt_vector3_8h.html#e46609062457bbfeb6e44fdb01a4c696" title="Return the length of the vector squared.">length2</a>()<span class="keyword"> const</span>
<a name="l00130"></a>00130 <span class="keyword">    </span>{
<a name="l00131"></a>00131         <span class="keywordflow">return</span> <a class="code" href="bt_vector3_8h.html#5e459518e79ca5e387a560cc70d3043f" title="Return the dot product.">dot</a>(*<span class="keyword">this</span>);
<a name="l00132"></a>00132     }
<a name="l00133"></a>00133 
<a name="l00135"></a><a class="code" href="bt_vector3_8h.html#dc51fdc7f5ea87f21e1c4a45830b0899">00135</a>     <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> <a class="code" href="bt_scalar_8h.html#1e5824cfc8adbf5a77f2622132d16018" title="The btScalar type abstracts floating point numbers, to easily switch between double...">btScalar</a> <a class="code" href="bt_vector3_8h.html#dc51fdc7f5ea87f21e1c4a45830b0899" title="Return the length of the vector.">length</a>()<span class="keyword"> const</span>
<a name="l00136"></a>00136 <span class="keyword">    </span>{
<a name="l00137"></a>00137         <span class="keywordflow">return</span> <a class="code" href="bt_scalar_8h.html#6b200a8d26a49406ca13329be909ec10">btSqrt</a>(<a class="code" href="bt_vector3_8h.html#e46609062457bbfeb6e44fdb01a4c696" title="Return the length of the vector squared.">length2</a>());
<a name="l00138"></a>00138     }
<a name="l00139"></a>00139 
<a name="l00142"></a>00142     <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> <a class="code" href="bt_scalar_8h.html#1e5824cfc8adbf5a77f2622132d16018" title="The btScalar type abstracts floating point numbers, to easily switch between double...">btScalar</a> <a class="code" href="bt_vector3_8h.html#6657dafe4657907a8bfc8f245260f7c5" title="Return the distance squared between the ends of this and another vector This is symantically...">distance2</a>(<span class="keyword">const</span> <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a>&amp; v) <span class="keyword">const</span>;
<a name="l00143"></a>00143 
<a name="l00146"></a>00146     <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> <a class="code" href="bt_scalar_8h.html#1e5824cfc8adbf5a77f2622132d16018" title="The btScalar type abstracts floating point numbers, to easily switch between double...">btScalar</a> <a class="code" href="bt_vector3_8h.html#b699912662dfd1bd647fe45513a04792" title="Return the distance between the ends of this and another vector This is symantically...">distance</a>(<span class="keyword">const</span> <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a>&amp; v) <span class="keyword">const</span>;
<a name="l00147"></a>00147 
<a name="l00148"></a><a class="code" href="bt_vector3_8h.html#b4aa784dd3b3c09f887133f5c252b1a7">00148</a>     <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a>&amp; <a class="code" href="bt_vector3_8h.html#b4aa784dd3b3c09f887133f5c252b1a7">safeNormalize</a>()
<a name="l00149"></a>00149     {
<a name="l00150"></a>00150         <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a> absVec = this-&gt;<a class="code" href="bt_vector3_8h.html#447fc07f600ed8ded0713c961dece919" title="Return a vector will the absolute values of each element.">absolute</a>();
<a name="l00151"></a>00151         int32_t maxIndex = absVec.maxAxis();
<a name="l00152"></a>00152         <span class="keywordflow">if</span> (absVec[maxIndex] &gt; 0) {
<a name="l00153"></a>00153             *<span class="keyword">this</span> /= absVec[maxIndex];
<a name="l00154"></a>00154             <span class="keywordflow">return</span> * <span class="keyword">this</span> /= <a class="code" href="bt_vector3_8h.html#dc51fdc7f5ea87f21e1c4a45830b0899" title="Return the length of the vector.">length</a>();
<a name="l00155"></a>00155         }
<a name="l00156"></a>00156         <a class="code" href="bt_vector3_8h.html#479473af6a5018f5386e719427ee7848">setValue</a>(1, 0, 0);
<a name="l00157"></a>00157         <span class="keywordflow">return</span> *<span class="keyword">this</span>;
<a name="l00158"></a>00158     }
<a name="l00159"></a>00159 
<a name="l00162"></a><a class="code" href="bt_vector3_8h.html#3083f1242193e3cac601afe9610cc4e5">00162</a>     <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a>&amp; <a class="code" href="bt_vector3_8h.html#3083f1242193e3cac601afe9610cc4e5" title="Normalize this vector x^2 + y^2 + z^2 = 1.">normalize</a>()
<a name="l00163"></a>00163     {
<a name="l00164"></a>00164         <span class="keywordflow">return</span> * <span class="keyword">this</span> /= <a class="code" href="bt_vector3_8h.html#dc51fdc7f5ea87f21e1c4a45830b0899" title="Return the length of the vector.">length</a>();
<a name="l00165"></a>00165     }
<a name="l00166"></a>00166 
<a name="l00168"></a>00168     <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a> <a class="code" href="bt_vector3_8h.html#551181b9a8d9e99a4ee65c2f3d00dbad" title="Return a normalized version of this vector.">normalized</a>() <span class="keyword">const</span>;
<a name="l00169"></a>00169 
<a name="l00173"></a>00173     <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a> <a class="code" href="bt_vector3_8h.html#6fdc523626ef77399ec26fc046b4f5ac" title="Return a rotated version of this vector.">rotate</a>(<span class="keyword">const</span> <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a>&amp; wAxis, <span class="keyword">const</span> <a class="code" href="bt_scalar_8h.html#1e5824cfc8adbf5a77f2622132d16018" title="The btScalar type abstracts floating point numbers, to easily switch between double...">btScalar</a> <a class="code" href="bt_vector3_8h.html#9fc74450b4146c1a60a3bd6ba3bb23a4" title="Return the angle between this and another vector.">angle</a>) <span class="keyword">const</span>;
<a name="l00174"></a>00174 
<a name="l00177"></a><a class="code" href="bt_vector3_8h.html#9fc74450b4146c1a60a3bd6ba3bb23a4">00177</a>     <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> <a class="code" href="bt_scalar_8h.html#1e5824cfc8adbf5a77f2622132d16018" title="The btScalar type abstracts floating point numbers, to easily switch between double...">btScalar</a> <a class="code" href="bt_vector3_8h.html#9fc74450b4146c1a60a3bd6ba3bb23a4" title="Return the angle between this and another vector.">angle</a>(<span class="keyword">const</span> <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a>&amp; v)<span class="keyword"> const</span>
<a name="l00178"></a>00178 <span class="keyword">    </span>{
<a name="l00179"></a>00179         <a class="code" href="bt_scalar_8h.html#1e5824cfc8adbf5a77f2622132d16018" title="The btScalar type abstracts floating point numbers, to easily switch between double...">btScalar</a> s = <a class="code" href="bt_scalar_8h.html#6b200a8d26a49406ca13329be909ec10">btSqrt</a>(<a class="code" href="bt_vector3_8h.html#e46609062457bbfeb6e44fdb01a4c696" title="Return the length of the vector squared.">length2</a>() * v.length2());
<a name="l00180"></a>00180         <a class="code" href="bt_scalar_8h.html#90bc8c8b8f79211b2b7f0356c4cd804f">btFullAssert</a>(s != <a class="code" href="bt_scalar_8h.html#1e5824cfc8adbf5a77f2622132d16018" title="The btScalar type abstracts floating point numbers, to easily switch between double...">btScalar</a>(0.0));
<a name="l00181"></a>00181         <span class="keywordflow">return</span> <a class="code" href="bt_scalar_8h.html#004c41de4028b1437d1aafbaa0769cd5">btAcos</a>(<a class="code" href="bt_vector3_8h.html#5e459518e79ca5e387a560cc70d3043f" title="Return the dot product.">dot</a>(v) / s);
<a name="l00182"></a>00182     }
<a name="l00184"></a><a class="code" href="bt_vector3_8h.html#447fc07f600ed8ded0713c961dece919">00184</a>     <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a> <a class="code" href="bt_vector3_8h.html#447fc07f600ed8ded0713c961dece919" title="Return a vector will the absolute values of each element.">absolute</a>()<span class="keyword"> const</span>
<a name="l00185"></a>00185 <span class="keyword">    </span>{
<a name="l00186"></a>00186         <span class="keywordflow">return</span> <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a>(
<a name="l00187"></a>00187             <a class="code" href="bt_scalar_8h.html#4c4bd8e065ab617f4e37273d76e6d581">btFabs</a>(m_floats[0]),
<a name="l00188"></a>00188             <a class="code" href="bt_scalar_8h.html#4c4bd8e065ab617f4e37273d76e6d581">btFabs</a>(m_floats[1]),
<a name="l00189"></a>00189             <a class="code" href="bt_scalar_8h.html#4c4bd8e065ab617f4e37273d76e6d581">btFabs</a>(m_floats[2]));
<a name="l00190"></a>00190     }
<a name="l00193"></a><a class="code" href="bt_vector3_8h.html#be07352e9e8ada8dda9ead8a0c9c20d0">00193</a>     <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a> <a class="code" href="bt_vector3_8h.html#be07352e9e8ada8dda9ead8a0c9c20d0" title="Return the cross product between this and another vector.">cross</a>(<span class="keyword">const</span> <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a>&amp; v)<span class="keyword"> const</span>
<a name="l00194"></a>00194 <span class="keyword">    </span>{
<a name="l00195"></a>00195         <span class="keywordflow">return</span> <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a>(
<a name="l00196"></a>00196             m_floats[1] * v.m_floats[2] - m_floats[2] * v.m_floats[1],
<a name="l00197"></a>00197             m_floats[2] * v.m_floats[0] - m_floats[0] * v.m_floats[2],
<a name="l00198"></a>00198             m_floats[0] * v.m_floats[1] - m_floats[1] * v.m_floats[0]);
<a name="l00199"></a>00199     }
<a name="l00200"></a>00200 
<a name="l00201"></a><a class="code" href="bt_vector3_8h.html#cd9fdb789a2740db232545c7bca97a3a">00201</a>     <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> <a class="code" href="bt_scalar_8h.html#1e5824cfc8adbf5a77f2622132d16018" title="The btScalar type abstracts floating point numbers, to easily switch between double...">btScalar</a> <a class="code" href="bt_vector3_8h.html#cd9fdb789a2740db232545c7bca97a3a">triple</a>(<span class="keyword">const</span> <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a>&amp; v1, <span class="keyword">const</span> <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a>&amp; v2)<span class="keyword"> const</span>
<a name="l00202"></a>00202 <span class="keyword">    </span>{
<a name="l00203"></a>00203         <span class="keywordflow">return</span> m_floats[0] * (v1.m_floats[1] * v2.m_floats[2] - v1.m_floats[2] * v2.m_floats[1]) + m_floats[1] * (v1.m_floats[2] * v2.m_floats[0] - v1.m_floats[0] * v2.m_floats[2]) + m_floats[2] * (v1.m_floats[0] * v2.m_floats[1] - v1.m_floats[1] * v2.m_floats[0]);
<a name="l00204"></a>00204     }
<a name="l00205"></a>00205 
<a name="l00208"></a><a class="code" href="bt_vector3_8h.html#79a7b45e21dd2f28d0fded714d48ad6e">00208</a>     <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> int32_t <a class="code" href="bt_vector3_8h.html#79a7b45e21dd2f28d0fded714d48ad6e" title="Return the axis with the smallest value Note return values are 0,1,2 for x, y, or...">minAxis</a>()<span class="keyword"> const</span>
<a name="l00209"></a>00209 <span class="keyword">    </span>{
<a name="l00210"></a>00210         <span class="keywordflow">return</span> m_floats[0] &lt; m_floats[1] ? (m_floats[0] &lt; m_floats[2] ? 0 : 2) : (m_floats[1] &lt; m_floats[2] ? 1 : 2);
<a name="l00211"></a>00211     }
<a name="l00212"></a>00212 
<a name="l00215"></a><a class="code" href="bt_vector3_8h.html#63131e162711079d5bc14360ea49c71f">00215</a>     <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> int32_t <a class="code" href="bt_vector3_8h.html#63131e162711079d5bc14360ea49c71f" title="Return the axis with the largest value Note return values are 0,1,2 for x, y, or...">maxAxis</a>()<span class="keyword"> const</span>
<a name="l00216"></a>00216 <span class="keyword">    </span>{
<a name="l00217"></a>00217         <span class="keywordflow">return</span> m_floats[0] &lt; m_floats[1] ? (m_floats[1] &lt; m_floats[2] ? 2 : 1) : (m_floats[0] &lt; m_floats[2] ? 2 : 0);
<a name="l00218"></a>00218     }
<a name="l00219"></a>00219 
<a name="l00220"></a><a class="code" href="bt_vector3_8h.html#346205e0e58081ddaff5919c220f6951">00220</a>     <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> int32_t <a class="code" href="bt_vector3_8h.html#346205e0e58081ddaff5919c220f6951">furthestAxis</a>()<span class="keyword"> const</span>
<a name="l00221"></a>00221 <span class="keyword">    </span>{
<a name="l00222"></a>00222         <span class="keywordflow">return</span> <a class="code" href="bt_vector3_8h.html#447fc07f600ed8ded0713c961dece919" title="Return a vector will the absolute values of each element.">absolute</a>().minAxis();
<a name="l00223"></a>00223     }
<a name="l00224"></a>00224 
<a name="l00225"></a><a class="code" href="bt_vector3_8h.html#46baa802ed4b6eb67349ef6296338a56">00225</a>     <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> int32_t <a class="code" href="bt_vector3_8h.html#46baa802ed4b6eb67349ef6296338a56">closestAxis</a>()<span class="keyword"> const</span>
<a name="l00226"></a>00226 <span class="keyword">    </span>{
<a name="l00227"></a>00227         <span class="keywordflow">return</span> <a class="code" href="bt_vector3_8h.html#447fc07f600ed8ded0713c961dece919" title="Return a vector will the absolute values of each element.">absolute</a>().maxAxis();
<a name="l00228"></a>00228     }
<a name="l00229"></a>00229 
<a name="l00230"></a><a class="code" href="bt_vector3_8h.html#8fc6367a9ad19bfd2ac50e0c06c70dc6">00230</a>     <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> <span class="keywordtype">void</span> <a class="code" href="bt_vector3_8h.html#8fc6367a9ad19bfd2ac50e0c06c70dc6">setInterpolate3</a>(<span class="keyword">const</span> <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a>&amp; v0, <span class="keyword">const</span> <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a>&amp; v1, <a class="code" href="bt_scalar_8h.html#1e5824cfc8adbf5a77f2622132d16018" title="The btScalar type abstracts floating point numbers, to easily switch between double...">btScalar</a> rt)
<a name="l00231"></a>00231     {
<a name="l00232"></a>00232         <a class="code" href="bt_scalar_8h.html#1e5824cfc8adbf5a77f2622132d16018" title="The btScalar type abstracts floating point numbers, to easily switch between double...">btScalar</a> s = <a class="code" href="bt_scalar_8h.html#1e5824cfc8adbf5a77f2622132d16018" title="The btScalar type abstracts floating point numbers, to easily switch between double...">btScalar</a>(1.0) - rt;
<a name="l00233"></a>00233         m_floats[0] = s * v0.m_floats[0] + rt * v1.m_floats[0];
<a name="l00234"></a>00234         m_floats[1] = s * v0.m_floats[1] + rt * v1.m_floats[1];
<a name="l00235"></a>00235         m_floats[2] = s * v0.m_floats[2] + rt * v1.m_floats[2];
<a name="l00236"></a>00236         <span class="comment">//don't do the unused w component</span>
<a name="l00237"></a>00237         <span class="comment">//      m_co[3] = s * v0[3] + rt * v1[3];</span>
<a name="l00238"></a>00238     }
<a name="l00239"></a>00239 
<a name="l00243"></a><a class="code" href="bt_vector3_8h.html#a87d74554fd5ce7e80bbae832013bbf5">00243</a>     <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a> <a class="code" href="bt_vector3_8h.html#a87d74554fd5ce7e80bbae832013bbf5" title="Return the linear interpolation between this and another vector.">lerp</a>(<span class="keyword">const</span> <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a>&amp; v, <span class="keyword">const</span> <a class="code" href="bt_scalar_8h.html#1e5824cfc8adbf5a77f2622132d16018" title="The btScalar type abstracts floating point numbers, to easily switch between double...">btScalar</a>&amp; t)<span class="keyword"> const</span>
<a name="l00244"></a>00244 <span class="keyword">    </span>{
<a name="l00245"></a>00245         <span class="keywordflow">return</span> <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a>(m_floats[0] + (v.m_floats[0] - m_floats[0]) * t,
<a name="l00246"></a>00246             m_floats[1] + (v.m_floats[1] - m_floats[1]) * t,
<a name="l00247"></a>00247             m_floats[2] + (v.m_floats[2] - m_floats[2]) * t);
<a name="l00248"></a>00248     }
<a name="l00249"></a>00249 
<a name="l00252"></a><a class="code" href="bt_vector3_8h.html#6fec5d8daca950e867926bd29780ee72">00252</a>     <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a>&amp; <a class="code" href="bt_vector3_8h.html#d213bcd7fce55a2f9d310114a2e157eb" title="Scale the vector.">operator*=</a>(<span class="keyword">const</span> <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a>&amp; v)
<a name="l00253"></a>00253     {
<a name="l00254"></a>00254         m_floats[0] *= v.m_floats[0];
<a name="l00255"></a>00255         m_floats[1] *= v.m_floats[1];
<a name="l00256"></a>00256         m_floats[2] *= v.m_floats[2];
<a name="l00257"></a>00257         <span class="keywordflow">return</span> *<span class="keyword">this</span>;
<a name="l00258"></a>00258     }
<a name="l00259"></a>00259 
<a name="l00261"></a><a class="code" href="bt_vector3_8h.html#7bd9a666b2572c1e6d6987c8cc802f49">00261</a>     <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> <span class="keyword">const</span> <a class="code" href="bt_scalar_8h.html#1e5824cfc8adbf5a77f2622132d16018" title="The btScalar type abstracts floating point numbers, to easily switch between double...">btScalar</a>&amp; <a class="code" href="bt_vector3_8h.html#7bd9a666b2572c1e6d6987c8cc802f49" title="Return the x value.">getX</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_floats[0]; }
<a name="l00263"></a><a class="code" href="bt_vector3_8h.html#0ea9d108a67442be94e25ac0eee51090">00263</a>     <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> <span class="keyword">const</span> <a class="code" href="bt_scalar_8h.html#1e5824cfc8adbf5a77f2622132d16018" title="The btScalar type abstracts floating point numbers, to easily switch between double...">btScalar</a>&amp; <a class="code" href="bt_vector3_8h.html#0ea9d108a67442be94e25ac0eee51090" title="Return the y value.">getY</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_floats[1]; }
<a name="l00265"></a><a class="code" href="bt_vector3_8h.html#2301fb0561b749ff8dcac335b8accb84">00265</a>     <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> <span class="keyword">const</span> <a class="code" href="bt_scalar_8h.html#1e5824cfc8adbf5a77f2622132d16018" title="The btScalar type abstracts floating point numbers, to easily switch between double...">btScalar</a>&amp; <a class="code" href="bt_vector3_8h.html#2301fb0561b749ff8dcac335b8accb84" title="Return the z value.">getZ</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_floats[2]; }
<a name="l00267"></a><a class="code" href="bt_vector3_8h.html#41ee945bcf88815c61326ca6196aa78f">00267</a>     <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> <span class="keywordtype">void</span> <a class="code" href="bt_vector3_8h.html#41ee945bcf88815c61326ca6196aa78f" title="Set the x value.">setX</a>(<a class="code" href="bt_scalar_8h.html#1e5824cfc8adbf5a77f2622132d16018" title="The btScalar type abstracts floating point numbers, to easily switch between double...">btScalar</a> <a class="code" href="bt_vector3_8h.html#0d05bb202a57e1c47ae0eeeec2502c1b" title="Return the x value.">x</a>) { m_floats[0] = x; };
<a name="l00269"></a><a class="code" href="bt_vector3_8h.html#f9f7c5583343101af5d505bf05e6b6cb">00269</a>     <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> <span class="keywordtype">void</span> <a class="code" href="bt_vector3_8h.html#f9f7c5583343101af5d505bf05e6b6cb" title="Set the y value.">setY</a>(<a class="code" href="bt_scalar_8h.html#1e5824cfc8adbf5a77f2622132d16018" title="The btScalar type abstracts floating point numbers, to easily switch between double...">btScalar</a> <a class="code" href="bt_vector3_8h.html#88617d2888b444b2ad2384b17b0eeadf" title="Return the y value.">y</a>) { m_floats[1] = y; };
<a name="l00271"></a><a class="code" href="bt_vector3_8h.html#13bc0355b871b002b61ecef888b8ecea">00271</a>     <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> <span class="keywordtype">void</span> <a class="code" href="bt_vector3_8h.html#13bc0355b871b002b61ecef888b8ecea" title="Set the z value.">setZ</a>(<a class="code" href="bt_scalar_8h.html#1e5824cfc8adbf5a77f2622132d16018" title="The btScalar type abstracts floating point numbers, to easily switch between double...">btScalar</a> <a class="code" href="bt_vector3_8h.html#49dd8d4770be4de32dd57f9b926aa396" title="Return the z value.">z</a>) { m_floats[2] = z; };
<a name="l00273"></a><a class="code" href="bt_vector3_8h.html#5a4be68dd97f1809e8220090e7b73e46">00273</a>     <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> <span class="keywordtype">void</span> <a class="code" href="bt_vector3_8h.html#5a4be68dd97f1809e8220090e7b73e46" title="Set the w value.">setW</a>(<a class="code" href="bt_scalar_8h.html#1e5824cfc8adbf5a77f2622132d16018" title="The btScalar type abstracts floating point numbers, to easily switch between double...">btScalar</a> <a class="code" href="bt_vector3_8h.html#c0e6714ccdb1e845d1c5cc79c057331a" title="Return the w value.">w</a>) { m_floats[3] = w; };
<a name="l00275"></a><a class="code" href="bt_vector3_8h.html#0d05bb202a57e1c47ae0eeeec2502c1b">00275</a>     <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> <span class="keyword">const</span> <a class="code" href="bt_scalar_8h.html#1e5824cfc8adbf5a77f2622132d16018" title="The btScalar type abstracts floating point numbers, to easily switch between double...">btScalar</a>&amp; <a class="code" href="bt_vector3_8h.html#0d05bb202a57e1c47ae0eeeec2502c1b" title="Return the x value.">x</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_floats[0]; }
<a name="l00277"></a><a class="code" href="bt_vector3_8h.html#88617d2888b444b2ad2384b17b0eeadf">00277</a>     <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> <span class="keyword">const</span> <a class="code" href="bt_scalar_8h.html#1e5824cfc8adbf5a77f2622132d16018" title="The btScalar type abstracts floating point numbers, to easily switch between double...">btScalar</a>&amp; <a class="code" href="bt_vector3_8h.html#88617d2888b444b2ad2384b17b0eeadf" title="Return the y value.">y</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_floats[1]; }
<a name="l00279"></a><a class="code" href="bt_vector3_8h.html#49dd8d4770be4de32dd57f9b926aa396">00279</a>     <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> <span class="keyword">const</span> <a class="code" href="bt_scalar_8h.html#1e5824cfc8adbf5a77f2622132d16018" title="The btScalar type abstracts floating point numbers, to easily switch between double...">btScalar</a>&amp; <a class="code" href="bt_vector3_8h.html#49dd8d4770be4de32dd57f9b926aa396" title="Return the z value.">z</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_floats[2]; }
<a name="l00281"></a><a class="code" href="bt_vector3_8h.html#c0e6714ccdb1e845d1c5cc79c057331a">00281</a>     <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> <span class="keyword">const</span> <a class="code" href="bt_scalar_8h.html#1e5824cfc8adbf5a77f2622132d16018" title="The btScalar type abstracts floating point numbers, to easily switch between double...">btScalar</a>&amp; <a class="code" href="bt_vector3_8h.html#c0e6714ccdb1e845d1c5cc79c057331a" title="Return the w value.">w</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_floats[3]; }
<a name="l00282"></a>00282 
<a name="l00283"></a>00283     <span class="comment">//SIMD_FORCE_INLINE btScalar&amp;       operator[](int32_t i)       { return (&amp;m_floats[0])[i]; }</span>
<a name="l00284"></a>00284     <span class="comment">//SIMD_FORCE_INLINE const btScalar&amp; operator[](int32_t i) const { return (&amp;m_floats[0])[i]; }</span>
<a name="l00286"></a><a class="code" href="bt_vector3_8h.html#287fc621890120b3ec7d4e14858ec179">00286</a> <span class="comment"></span>    <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> <a class="code" href="bt_vector3_8h.html#287fc621890120b3ec7d4e14858ec179" title="operator btScalar*() replaces operator[], using implicit conversion. We added operator...">operator btScalar*</a>() { <span class="keywordflow">return</span> &amp;m_floats[0]; }
<a name="l00287"></a><a class="code" href="bt_vector3_8h.html#09c002131f1311cf3f39d0eccbf8fdcd">00287</a>     <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> <a class="code" href="bt_vector3_8h.html#09c002131f1311cf3f39d0eccbf8fdcd">operator const btScalar*</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> &amp;m_floats[0]; }
<a name="l00288"></a>00288 
<a name="l00289"></a><a class="code" href="bt_vector3_8h.html#a7cca34c0e2166b0c3407da4db2d98d1">00289</a>     <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> <span class="keywordtype">bool</span> <a class="code" href="bt_vector3_8h.html#a7cca34c0e2166b0c3407da4db2d98d1">operator==</a>(<span class="keyword">const</span> <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a>&amp; other)<span class="keyword"> const</span>
<a name="l00290"></a>00290 <span class="keyword">    </span>{
<a name="l00291"></a>00291         <span class="keywordflow">return</span> ((m_floats[3] == other.m_floats[3]) &amp;&amp; (m_floats[2] == other.m_floats[2]) &amp;&amp; (m_floats[1] == other.m_floats[1]) &amp;&amp; (m_floats[0] == other.m_floats[0]));
<a name="l00292"></a>00292     }
<a name="l00293"></a>00293 
<a name="l00294"></a><a class="code" href="bt_vector3_8h.html#b60db7265d1afd2462e4c2b67b03292d">00294</a>     <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> <span class="keywordtype">bool</span> <a class="code" href="bt_vector3_8h.html#b60db7265d1afd2462e4c2b67b03292d">operator!=</a>(<span class="keyword">const</span> <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a>&amp; other)<span class="keyword"> const</span>
<a name="l00295"></a>00295 <span class="keyword">    </span>{
<a name="l00296"></a>00296         <span class="keywordflow">return</span> !(*<span class="keyword">this</span> == other);
<a name="l00297"></a>00297     }
<a name="l00298"></a>00298 
<a name="l00302"></a><a class="code" href="bt_vector3_8h.html#6ded65e4a84fea22e292d69b2474c509">00302</a>     <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> <span class="keywordtype">void</span> <a class="code" href="bt_vector3_8h.html#6ded65e4a84fea22e292d69b2474c509" title="Set each element to the max of the current values and the values of another btVector3...">setMax</a>(<span class="keyword">const</span> <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a>&amp; other)
<a name="l00303"></a>00303     {
<a name="l00304"></a>00304         <a class="code" href="bt_min_max_8h.html#b894df8ce3487473677c66e682702046">btSetMax</a>(m_floats[0], other.m_floats[0]);
<a name="l00305"></a>00305         <a class="code" href="bt_min_max_8h.html#b894df8ce3487473677c66e682702046">btSetMax</a>(m_floats[1], other.m_floats[1]);
<a name="l00306"></a>00306         <a class="code" href="bt_min_max_8h.html#b894df8ce3487473677c66e682702046">btSetMax</a>(m_floats[2], other.m_floats[2]);
<a name="l00307"></a>00307         <a class="code" href="bt_min_max_8h.html#b894df8ce3487473677c66e682702046">btSetMax</a>(m_floats[3], other.w());
<a name="l00308"></a>00308     }
<a name="l00312"></a><a class="code" href="bt_vector3_8h.html#b87530c206e0f9f64b49235fcd96e604">00312</a>     <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> <span class="keywordtype">void</span> <a class="code" href="bt_vector3_8h.html#b87530c206e0f9f64b49235fcd96e604" title="Set each element to the min of the current values and the values of another btVector3...">setMin</a>(<span class="keyword">const</span> <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a>&amp; other)
<a name="l00313"></a>00313     {
<a name="l00314"></a>00314         <a class="code" href="bt_min_max_8h.html#c374523bb40e4ff491f6fd197fcb3c04">btSetMin</a>(m_floats[0], other.m_floats[0]);
<a name="l00315"></a>00315         <a class="code" href="bt_min_max_8h.html#c374523bb40e4ff491f6fd197fcb3c04">btSetMin</a>(m_floats[1], other.m_floats[1]);
<a name="l00316"></a>00316         <a class="code" href="bt_min_max_8h.html#c374523bb40e4ff491f6fd197fcb3c04">btSetMin</a>(m_floats[2], other.m_floats[2]);
<a name="l00317"></a>00317         <a class="code" href="bt_min_max_8h.html#c374523bb40e4ff491f6fd197fcb3c04">btSetMin</a>(m_floats[3], other.w());
<a name="l00318"></a>00318     }
<a name="l00319"></a>00319 
<a name="l00320"></a><a class="code" href="bt_vector3_8h.html#479473af6a5018f5386e719427ee7848">00320</a>     <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> <span class="keywordtype">void</span> <a class="code" href="bt_vector3_8h.html#479473af6a5018f5386e719427ee7848">setValue</a>(<span class="keyword">const</span> <a class="code" href="bt_scalar_8h.html#1e5824cfc8adbf5a77f2622132d16018" title="The btScalar type abstracts floating point numbers, to easily switch between double...">btScalar</a>&amp; <a class="code" href="bt_vector3_8h.html#0d05bb202a57e1c47ae0eeeec2502c1b" title="Return the x value.">x</a>, <span class="keyword">const</span> <a class="code" href="bt_scalar_8h.html#1e5824cfc8adbf5a77f2622132d16018" title="The btScalar type abstracts floating point numbers, to easily switch between double...">btScalar</a>&amp; <a class="code" href="bt_vector3_8h.html#88617d2888b444b2ad2384b17b0eeadf" title="Return the y value.">y</a>, <span class="keyword">const</span> <a class="code" href="bt_scalar_8h.html#1e5824cfc8adbf5a77f2622132d16018" title="The btScalar type abstracts floating point numbers, to easily switch between double...">btScalar</a>&amp; <a class="code" href="bt_vector3_8h.html#49dd8d4770be4de32dd57f9b926aa396" title="Return the z value.">z</a>)
<a name="l00321"></a>00321     {
<a name="l00322"></a>00322         m_floats[0] = x;
<a name="l00323"></a>00323         m_floats[1] = y;
<a name="l00324"></a>00324         m_floats[2] = z;
<a name="l00325"></a>00325         m_floats[3] = <a class="code" href="bt_scalar_8h.html#1e5824cfc8adbf5a77f2622132d16018" title="The btScalar type abstracts floating point numbers, to easily switch between double...">btScalar</a>(0.);
<a name="l00326"></a>00326     }
<a name="l00327"></a>00327 
<a name="l00328"></a><a class="code" href="bt_vector3_8h.html#73c97c7917e6d847c1266c15114dd029">00328</a>     <span class="keywordtype">void</span> <a class="code" href="bt_vector3_8h.html#73c97c7917e6d847c1266c15114dd029">getSkewSymmetricMatrix</a>(<a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a> * v0, <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a> * v1, <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a> * v2)<span class="keyword"> const</span>
<a name="l00329"></a>00329 <span class="keyword">    </span>{
<a name="l00330"></a>00330         v0-&gt;setValue(0., -<a class="code" href="bt_vector3_8h.html#49dd8d4770be4de32dd57f9b926aa396" title="Return the z value.">z</a>(), <a class="code" href="bt_vector3_8h.html#88617d2888b444b2ad2384b17b0eeadf" title="Return the y value.">y</a>());
<a name="l00331"></a>00331         v1-&gt;setValue(<a class="code" href="bt_vector3_8h.html#49dd8d4770be4de32dd57f9b926aa396" title="Return the z value.">z</a>(), 0., -<a class="code" href="bt_vector3_8h.html#0d05bb202a57e1c47ae0eeeec2502c1b" title="Return the x value.">x</a>());
<a name="l00332"></a>00332         v2-&gt;setValue(-<a class="code" href="bt_vector3_8h.html#88617d2888b444b2ad2384b17b0eeadf" title="Return the y value.">y</a>(), <a class="code" href="bt_vector3_8h.html#0d05bb202a57e1c47ae0eeeec2502c1b" title="Return the x value.">x</a>(), 0.);
<a name="l00333"></a>00333     }
<a name="l00334"></a>00334 
<a name="l00335"></a><a class="code" href="bt_vector3_8h.html#47affd1a10b589811fc4828c1a2e0c6d">00335</a>     <span class="keywordtype">void</span> <a class="code" href="bt_vector3_8h.html#47affd1a10b589811fc4828c1a2e0c6d">setZero</a>()
<a name="l00336"></a>00336     {
<a name="l00337"></a>00337         <a class="code" href="bt_vector3_8h.html#479473af6a5018f5386e719427ee7848">setValue</a>(<a class="code" href="bt_scalar_8h.html#1e5824cfc8adbf5a77f2622132d16018" title="The btScalar type abstracts floating point numbers, to easily switch between double...">btScalar</a>(0.), <a class="code" href="bt_scalar_8h.html#1e5824cfc8adbf5a77f2622132d16018" title="The btScalar type abstracts floating point numbers, to easily switch between double...">btScalar</a>(0.), <a class="code" href="bt_scalar_8h.html#1e5824cfc8adbf5a77f2622132d16018" title="The btScalar type abstracts floating point numbers, to easily switch between double...">btScalar</a>(0.));
<a name="l00338"></a>00338     }
<a name="l00339"></a>00339 
<a name="l00340"></a><a class="code" href="bt_vector3_8h.html#41e211348a0e50f54a2546933c25e62a">00340</a>     <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> <span class="keywordtype">bool</span> <a class="code" href="bt_vector3_8h.html#41e211348a0e50f54a2546933c25e62a">isZero</a>()<span class="keyword"> const</span>
<a name="l00341"></a>00341 <span class="keyword">    </span>{
<a name="l00342"></a>00342         <span class="keywordflow">return</span> m_floats[0] == <a class="code" href="bt_scalar_8h.html#1e5824cfc8adbf5a77f2622132d16018" title="The btScalar type abstracts floating point numbers, to easily switch between double...">btScalar</a>(0) &amp;&amp; m_floats[1] == <a class="code" href="bt_scalar_8h.html#1e5824cfc8adbf5a77f2622132d16018" title="The btScalar type abstracts floating point numbers, to easily switch between double...">btScalar</a>(0) &amp;&amp; m_floats[2] == <a class="code" href="bt_scalar_8h.html#1e5824cfc8adbf5a77f2622132d16018" title="The btScalar type abstracts floating point numbers, to easily switch between double...">btScalar</a>(0);
<a name="l00343"></a>00343     }
<a name="l00344"></a>00344 
<a name="l00345"></a><a class="code" href="bt_vector3_8h.html#8788b9178180566bd06f3d579715f156">00345</a>     <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> <span class="keywordtype">bool</span> <a class="code" href="bt_vector3_8h.html#8788b9178180566bd06f3d579715f156">fuzzyZero</a>()<span class="keyword"> const</span>
<a name="l00346"></a>00346 <span class="keyword">    </span>{
<a name="l00347"></a>00347         <span class="keywordflow">return</span> <a class="code" href="bt_vector3_8h.html#e46609062457bbfeb6e44fdb01a4c696" title="Return the length of the vector squared.">length2</a>() &lt; <a class="code" href="bt_scalar_8h.html#e51eef6845bd59f964c1b2dbfe7054b7">SIMD_EPSILON</a>;
<a name="l00348"></a>00348     }
<a name="l00349"></a>00349 
<a name="l00350"></a>00350     <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> <span class="keywordtype">void</span> <a class="code" href="bt_vector3_8h.html#8452b542ab5c406144bb9086b8be1c45">serialize</a>(<span class="keyword">struct</span> <a class="code" href="bt_vector3_8h.html#d116b75e5135551c1335437e47fd8a3f">btVector3Data</a> &amp; dataOut) <span class="keyword">const</span>;
<a name="l00351"></a>00351 
<a name="l00352"></a>00352     <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> <span class="keywordtype">void</span> <a class="code" href="bt_vector3_8h.html#b97452b3ced1f03b405a589ef841e96f">deSerialize</a>(<span class="keyword">const</span> <span class="keyword">struct</span> <a class="code" href="bt_vector3_8h.html#d116b75e5135551c1335437e47fd8a3f">btVector3Data</a>&amp; dataIn);
<a name="l00353"></a>00353 
<a name="l00354"></a>00354     <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> <span class="keywordtype">void</span> <a class="code" href="bt_vector3_8h.html#ef619367f3b7275597ac08176c30fe38">serializeFloat</a>(<span class="keyword">struct</span> <a class="code" href="structbt_vector3_float_data.html">btVector3FloatData</a> &amp; dataOut) <span class="keyword">const</span>;
<a name="l00355"></a>00355 
<a name="l00356"></a>00356     <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> <span class="keywordtype">void</span> <a class="code" href="bt_vector3_8h.html#92157a4108a364787eb1b937c7b6d3ce">deSerializeFloat</a>(<span class="keyword">const</span> <span class="keyword">struct</span> <a class="code" href="structbt_vector3_float_data.html">btVector3FloatData</a>&amp; dataIn);
<a name="l00357"></a>00357 
<a name="l00358"></a>00358     <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> <span class="keywordtype">void</span> <a class="code" href="bt_vector3_8h.html#eaa3d3bbc4902b5756e2f6ed088522f8">serializeDouble</a>(<span class="keyword">struct</span> <a class="code" href="structbt_vector3_double_data.html">btVector3DoubleData</a> &amp; dataOut) <span class="keyword">const</span>;
<a name="l00359"></a>00359 
<a name="l00360"></a>00360     <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> <span class="keywordtype">void</span> <a class="code" href="bt_vector3_8h.html#4241fc63918b2364ad15adcf42017554">deSerializeDouble</a>(<span class="keyword">const</span> <span class="keyword">struct</span> <a class="code" href="structbt_vector3_double_data.html">btVector3DoubleData</a>&amp; dataIn);
<a name="l00361"></a>00361 };
<a name="l00362"></a>00362 
<a name="l00364"></a>00364 <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a>
<a name="l00365"></a><a class="code" href="bt_vector3_8h.html#59d21eb22bc12d95d210582bbbc23618">00365</a> <a class="code" href="bt_vector3_8h.html#59d21eb22bc12d95d210582bbbc23618" title="Return the sum of two vectors (Point symantics).">operator+</a>(<span class="keyword">const</span> <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a>&amp; v1, <span class="keyword">const</span> <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a>&amp; v2)
<a name="l00366"></a>00366 {
<a name="l00367"></a>00367     <span class="keywordflow">return</span> <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a>(v1.m_floats[0] + v2.m_floats[0], v1.m_floats[1] + v2.m_floats[1], v1.m_floats[2] + v2.m_floats[2]);
<a name="l00368"></a>00368 }
<a name="l00369"></a>00369 
<a name="l00371"></a>00371 <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a>
<a name="l00372"></a><a class="code" href="bt_vector3_8h.html#b0d1eced446920c5cc3fac4aa0bcbafa">00372</a> <a class="code" href="bt_vector3_8h.html#b0d1eced446920c5cc3fac4aa0bcbafa" title="Return the elementwise product of two vectors.">operator*</a>(<span class="keyword">const</span> <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a>&amp; v1, <span class="keyword">const</span> <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a>&amp; v2)
<a name="l00373"></a>00373 {
<a name="l00374"></a>00374     <span class="keywordflow">return</span> <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a>(v1.m_floats[0] * v2.m_floats[0], v1.m_floats[1] * v2.m_floats[1], v1.m_floats[2] * v2.m_floats[2]);
<a name="l00375"></a>00375 }
<a name="l00376"></a>00376 
<a name="l00378"></a>00378 <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a>
<a name="l00379"></a><a class="code" href="bt_vector3_8h.html#57cef67d5a8965ce768af0f3ba01b3f7">00379</a> <a class="code" href="bt_vector3_8h.html#57cef67d5a8965ce768af0f3ba01b3f7" title="Return the difference between two vectors.">operator-</a>(<span class="keyword">const</span> <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a>&amp; v1, <span class="keyword">const</span> <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a>&amp; v2)
<a name="l00380"></a>00380 {
<a name="l00381"></a>00381     <span class="keywordflow">return</span> <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a>(v1.m_floats[0] - v2.m_floats[0], v1.m_floats[1] - v2.m_floats[1], v1.m_floats[2] - v2.m_floats[2]);
<a name="l00382"></a>00382 }
<a name="l00384"></a>00384 <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a>
<a name="l00385"></a><a class="code" href="bt_vector3_8h.html#196a258574acadf69c24f868d4506585">00385</a> <a class="code" href="bt_vector3_8h.html#57cef67d5a8965ce768af0f3ba01b3f7" title="Return the difference between two vectors.">operator-</a>(<span class="keyword">const</span> <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a>&amp; v)
<a name="l00386"></a>00386 {
<a name="l00387"></a>00387     <span class="keywordflow">return</span> <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a>(-v.m_floats[0], -v.m_floats[1], -v.m_floats[2]);
<a name="l00388"></a>00388 }
<a name="l00389"></a>00389 
<a name="l00391"></a>00391 <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a>
<a name="l00392"></a><a class="code" href="bt_vector3_8h.html#bc7be02cbea667c08b7242a29083f7ce">00392</a> <a class="code" href="bt_vector3_8h.html#b0d1eced446920c5cc3fac4aa0bcbafa" title="Return the elementwise product of two vectors.">operator*</a>(<span class="keyword">const</span> <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a>&amp; v, <span class="keyword">const</span> <a class="code" href="bt_scalar_8h.html#1e5824cfc8adbf5a77f2622132d16018" title="The btScalar type abstracts floating point numbers, to easily switch between double...">btScalar</a>&amp; s)
<a name="l00393"></a>00393 {
<a name="l00394"></a>00394     <span class="keywordflow">return</span> <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a>(v.m_floats[0] * s, v.m_floats[1] * s, v.m_floats[2] * s);
<a name="l00395"></a>00395 }
<a name="l00396"></a>00396 
<a name="l00398"></a>00398 <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a>
<a name="l00399"></a><a class="code" href="bt_vector3_8h.html#75f69235611a42e6214ff509c2a23236">00399</a> <a class="code" href="bt_vector3_8h.html#b0d1eced446920c5cc3fac4aa0bcbafa" title="Return the elementwise product of two vectors.">operator*</a>(<span class="keyword">const</span> <a class="code" href="bt_scalar_8h.html#1e5824cfc8adbf5a77f2622132d16018" title="The btScalar type abstracts floating point numbers, to easily switch between double...">btScalar</a>&amp; s, <span class="keyword">const</span> <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a>&amp; v)
<a name="l00400"></a>00400 {
<a name="l00401"></a>00401     <span class="keywordflow">return</span> v * s;
<a name="l00402"></a>00402 }
<a name="l00403"></a>00403 
<a name="l00405"></a>00405 <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a>
<a name="l00406"></a><a class="code" href="bt_vector3_8h.html#a5c0296bb009809423866d7282ae58e2">00406</a> <a class="code" href="bt_vector3_8h.html#a5c0296bb009809423866d7282ae58e2" title="Return the vector inversely scaled by s.">operator/</a>(<span class="keyword">const</span> <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a>&amp; v, <span class="keyword">const</span> <a class="code" href="bt_scalar_8h.html#1e5824cfc8adbf5a77f2622132d16018" title="The btScalar type abstracts floating point numbers, to easily switch between double...">btScalar</a>&amp; s)
<a name="l00407"></a>00407 {
<a name="l00408"></a>00408     <a class="code" href="bt_scalar_8h.html#90bc8c8b8f79211b2b7f0356c4cd804f">btFullAssert</a>(s != <a class="code" href="bt_scalar_8h.html#1e5824cfc8adbf5a77f2622132d16018" title="The btScalar type abstracts floating point numbers, to easily switch between double...">btScalar</a>(0.0));
<a name="l00409"></a>00409     <span class="keywordflow">return</span> v * (<a class="code" href="bt_scalar_8h.html#1e5824cfc8adbf5a77f2622132d16018" title="The btScalar type abstracts floating point numbers, to easily switch between double...">btScalar</a>(1.0) / s);
<a name="l00410"></a>00410 }
<a name="l00411"></a>00411 
<a name="l00413"></a>00413 <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a>
<a name="l00414"></a><a class="code" href="bt_vector3_8h.html#da41f7dc7bda588d0c8421d446c3bf05">00414</a> <a class="code" href="bt_vector3_8h.html#a5c0296bb009809423866d7282ae58e2" title="Return the vector inversely scaled by s.">operator/</a>(<span class="keyword">const</span> <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a>&amp; v1, <span class="keyword">const</span> <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a>&amp; v2)
<a name="l00415"></a>00415 {
<a name="l00416"></a>00416     <span class="keywordflow">return</span> <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a>(v1.m_floats[0] / v2.m_floats[0], v1.m_floats[1] / v2.m_floats[1], v1.m_floats[2] / v2.m_floats[2]);
<a name="l00417"></a>00417 }
<a name="l00418"></a>00418 
<a name="l00420"></a>00420 <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> <a class="code" href="bt_scalar_8h.html#1e5824cfc8adbf5a77f2622132d16018" title="The btScalar type abstracts floating point numbers, to easily switch between double...">btScalar</a>
<a name="l00421"></a><a class="code" href="bt_vector3_8h.html#550dc4505b1f10c03a685705f41f4011">00421</a> <a class="code" href="bt_vector3_8h.html#550dc4505b1f10c03a685705f41f4011" title="Return the dot product between two vectors.">btDot</a>(<span class="keyword">const</span> <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a>&amp; v1, <span class="keyword">const</span> <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a>&amp; v2)
<a name="l00422"></a>00422 {
<a name="l00423"></a>00423     <span class="keywordflow">return</span> v1.dot(v2);
<a name="l00424"></a>00424 }
<a name="l00425"></a>00425 
<a name="l00427"></a>00427 <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> <a class="code" href="bt_scalar_8h.html#1e5824cfc8adbf5a77f2622132d16018" title="The btScalar type abstracts floating point numbers, to easily switch between double...">btScalar</a>
<a name="l00428"></a><a class="code" href="bt_vector3_8h.html#cb9d56a9d84e04f74f595787c4ffe244">00428</a> <a class="code" href="bt_vector3_8h.html#cb9d56a9d84e04f74f595787c4ffe244" title="Return the distance squared between two vectors.">btDistance2</a>(<span class="keyword">const</span> <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a>&amp; v1, <span class="keyword">const</span> <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a>&amp; v2)
<a name="l00429"></a>00429 {
<a name="l00430"></a>00430     <span class="keywordflow">return</span> v1.distance2(v2);
<a name="l00431"></a>00431 }
<a name="l00432"></a>00432 
<a name="l00434"></a>00434 <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> <a class="code" href="bt_scalar_8h.html#1e5824cfc8adbf5a77f2622132d16018" title="The btScalar type abstracts floating point numbers, to easily switch between double...">btScalar</a>
<a name="l00435"></a><a class="code" href="bt_vector3_8h.html#807989b9a52fe29eb4109795d9b7e023">00435</a> <a class="code" href="bt_vector3_8h.html#807989b9a52fe29eb4109795d9b7e023" title="Return the distance between two vectors.">btDistance</a>(<span class="keyword">const</span> <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a>&amp; v1, <span class="keyword">const</span> <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a>&amp; v2)
<a name="l00436"></a>00436 {
<a name="l00437"></a>00437     <span class="keywordflow">return</span> v1.distance(v2);
<a name="l00438"></a>00438 }
<a name="l00439"></a>00439 
<a name="l00441"></a>00441 <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> <a class="code" href="bt_scalar_8h.html#1e5824cfc8adbf5a77f2622132d16018" title="The btScalar type abstracts floating point numbers, to easily switch between double...">btScalar</a>
<a name="l00442"></a><a class="code" href="bt_vector3_8h.html#895569a6d2cf658dbbbbb88c7d93f312">00442</a> <a class="code" href="bt_vector3_8h.html#895569a6d2cf658dbbbbb88c7d93f312" title="Return the angle between two vectors.">btAngle</a>(<span class="keyword">const</span> <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a>&amp; v1, <span class="keyword">const</span> <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a>&amp; v2)
<a name="l00443"></a>00443 {
<a name="l00444"></a>00444     <span class="keywordflow">return</span> v1.angle(v2);
<a name="l00445"></a>00445 }
<a name="l00446"></a>00446 
<a name="l00448"></a>00448 <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a>
<a name="l00449"></a><a class="code" href="bt_vector3_8h.html#d50f4077e814fac34e7d7d5d461278de">00449</a> <a class="code" href="bt_vector3_8h.html#d50f4077e814fac34e7d7d5d461278de" title="Return the cross product of two vectors.">btCross</a>(<span class="keyword">const</span> <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a>&amp; v1, <span class="keyword">const</span> <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a>&amp; v2)
<a name="l00450"></a>00450 {
<a name="l00451"></a>00451     <span class="keywordflow">return</span> v1.cross(v2);
<a name="l00452"></a>00452 }
<a name="l00453"></a>00453 
<a name="l00454"></a>00454 <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> <a class="code" href="bt_scalar_8h.html#1e5824cfc8adbf5a77f2622132d16018" title="The btScalar type abstracts floating point numbers, to easily switch between double...">btScalar</a>
<a name="l00455"></a><a class="code" href="bt_vector3_8h.html#98343fa170fe356460903cbed3e606a3">00455</a> <a class="code" href="bt_vector3_8h.html#98343fa170fe356460903cbed3e606a3">btTriple</a>(<span class="keyword">const</span> <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a>&amp; v1, <span class="keyword">const</span> <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a>&amp; v2, <span class="keyword">const</span> <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a>&amp; v3)
<a name="l00456"></a>00456 {
<a name="l00457"></a>00457     <span class="keywordflow">return</span> v1.triple(v2, v3);
<a name="l00458"></a>00458 }
<a name="l00459"></a>00459 
<a name="l00464"></a>00464 <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a>
<a name="l00465"></a><a class="code" href="bt_vector3_8h.html#6fed16d2caeeb6696519d64bac9494e3">00465</a> <a class="code" href="bt_vector3_8h.html#a87d74554fd5ce7e80bbae832013bbf5" title="Return the linear interpolation between this and another vector.">lerp</a>(<span class="keyword">const</span> <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a>&amp; v1, <span class="keyword">const</span> <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a>&amp; v2, <span class="keyword">const</span> <a class="code" href="bt_scalar_8h.html#1e5824cfc8adbf5a77f2622132d16018" title="The btScalar type abstracts floating point numbers, to easily switch between double...">btScalar</a>&amp; t)
<a name="l00466"></a>00466 {
<a name="l00467"></a>00467     <span class="keywordflow">return</span> v1.lerp(v2, t);
<a name="l00468"></a>00468 }
<a name="l00469"></a>00469 
<a name="l00470"></a><a class="code" href="bt_vector3_8h.html#6657dafe4657907a8bfc8f245260f7c5">00470</a> <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> <a class="code" href="bt_scalar_8h.html#1e5824cfc8adbf5a77f2622132d16018" title="The btScalar type abstracts floating point numbers, to easily switch between double...">btScalar</a> <a class="code" href="bt_vector3_8h.html#6657dafe4657907a8bfc8f245260f7c5" title="Return the distance squared between the ends of this and another vector This is symantically...">btVector3::distance2</a>(<span class="keyword">const</span> <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a>&amp; v)<span class="keyword"> const</span>
<a name="l00471"></a>00471 <span class="keyword"></span>{
<a name="l00472"></a>00472     <span class="keywordflow">return</span> (v - *<span class="keyword">this</span>).length2();
<a name="l00473"></a>00473 }
<a name="l00474"></a>00474 
<a name="l00475"></a><a class="code" href="bt_vector3_8h.html#b699912662dfd1bd647fe45513a04792">00475</a> <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> <a class="code" href="bt_scalar_8h.html#1e5824cfc8adbf5a77f2622132d16018" title="The btScalar type abstracts floating point numbers, to easily switch between double...">btScalar</a> <a class="code" href="bt_vector3_8h.html#b699912662dfd1bd647fe45513a04792" title="Return the distance between the ends of this and another vector This is symantically...">btVector3::distance</a>(<span class="keyword">const</span> <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a>&amp; v)<span class="keyword"> const</span>
<a name="l00476"></a>00476 <span class="keyword"></span>{
<a name="l00477"></a>00477     <span class="keywordflow">return</span> (v - *<span class="keyword">this</span>).length();
<a name="l00478"></a>00478 }
<a name="l00479"></a>00479 
<a name="l00480"></a><a class="code" href="bt_vector3_8h.html#551181b9a8d9e99a4ee65c2f3d00dbad">00480</a> <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a> <a class="code" href="bt_vector3_8h.html#551181b9a8d9e99a4ee65c2f3d00dbad" title="Return a normalized version of this vector.">btVector3::normalized</a>()<span class="keyword"> const</span>
<a name="l00481"></a>00481 <span class="keyword"></span>{
<a name="l00482"></a>00482     <span class="keywordflow">return</span> *<span class="keyword">this</span> / <a class="code" href="bt_vector3_8h.html#dc51fdc7f5ea87f21e1c4a45830b0899" title="Return the length of the vector.">length</a>();
<a name="l00483"></a>00483 }
<a name="l00484"></a>00484 
<a name="l00485"></a><a class="code" href="bt_vector3_8h.html#6fdc523626ef77399ec26fc046b4f5ac">00485</a> <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a> <a class="code" href="bt_vector3_8h.html#6fdc523626ef77399ec26fc046b4f5ac" title="Return a rotated version of this vector.">btVector3::rotate</a>(<span class="keyword">const</span> <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a>&amp; wAxis, <span class="keyword">const</span> <a class="code" href="bt_scalar_8h.html#1e5824cfc8adbf5a77f2622132d16018" title="The btScalar type abstracts floating point numbers, to easily switch between double...">btScalar</a> <a class="code" href="bt_vector3_8h.html#9fc74450b4146c1a60a3bd6ba3bb23a4" title="Return the angle between this and another vector.">angle</a>)<span class="keyword"> const</span>
<a name="l00486"></a>00486 <span class="keyword"></span>{
<a name="l00487"></a>00487     <span class="comment">// wAxis must be a unit lenght vector</span>
<a name="l00488"></a>00488 
<a name="l00489"></a>00489     <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a> o = wAxis * wAxis.dot(*<span class="keyword">this</span>);
<a name="l00490"></a>00490     <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a> <a class="code" href="bt_vector3_8h.html#0d05bb202a57e1c47ae0eeeec2502c1b" title="Return the x value.">x</a> = *<span class="keyword">this</span> - o;
<a name="l00491"></a>00491     <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a> <a class="code" href="bt_vector3_8h.html#88617d2888b444b2ad2384b17b0eeadf" title="Return the y value.">y</a>;
<a name="l00492"></a>00492 
<a name="l00493"></a>00493     y = wAxis.cross(*<span class="keyword">this</span>);
<a name="l00494"></a>00494 
<a name="l00495"></a>00495     <span class="keywordflow">return</span> (o + x * <a class="code" href="bt_scalar_8h.html#08cebf88560180c665f205810cc02d0f">btCos</a>(angle) + y * <a class="code" href="bt_scalar_8h.html#21de15ec6359a37d7876fa26be384a4b">btSin</a>(angle));
<a name="l00496"></a>00496 }
<a name="l00497"></a>00497 
<a name="l00498"></a><a class="code" href="classbt_vector4.html">00498</a> <span class="keyword">class </span><a class="code" href="classbt_vector4.html">btVector4</a> : <span class="keyword">public</span> <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a> {
<a name="l00499"></a>00499 <span class="keyword">public</span>:
<a name="l00500"></a><a class="code" href="classbt_vector4.html#b8f1a78ef86a9727b6f680d83e8e4259">00500</a>     <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> <a class="code" href="classbt_vector4.html#b8f1a78ef86a9727b6f680d83e8e4259">btVector4</a>() {}
<a name="l00501"></a>00501 
<a name="l00502"></a><a class="code" href="classbt_vector4.html#d2254549b54833d12c99e47914f8769a">00502</a>     <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> <a class="code" href="classbt_vector4.html#b8f1a78ef86a9727b6f680d83e8e4259">btVector4</a>(<span class="keyword">const</span> <a class="code" href="bt_scalar_8h.html#1e5824cfc8adbf5a77f2622132d16018" title="The btScalar type abstracts floating point numbers, to easily switch between double...">btScalar</a>&amp; <a class="code" href="bt_vector3_8h.html#0d05bb202a57e1c47ae0eeeec2502c1b" title="Return the x value.">x</a>, <span class="keyword">const</span> <a class="code" href="bt_scalar_8h.html#1e5824cfc8adbf5a77f2622132d16018" title="The btScalar type abstracts floating point numbers, to easily switch between double...">btScalar</a>&amp; <a class="code" href="bt_vector3_8h.html#88617d2888b444b2ad2384b17b0eeadf" title="Return the y value.">y</a>, <span class="keyword">const</span> <a class="code" href="bt_scalar_8h.html#1e5824cfc8adbf5a77f2622132d16018" title="The btScalar type abstracts floating point numbers, to easily switch between double...">btScalar</a>&amp; <a class="code" href="bt_vector3_8h.html#49dd8d4770be4de32dd57f9b926aa396" title="Return the z value.">z</a>, <span class="keyword">const</span> <a class="code" href="bt_scalar_8h.html#1e5824cfc8adbf5a77f2622132d16018" title="The btScalar type abstracts floating point numbers, to easily switch between double...">btScalar</a>&amp; <a class="code" href="bt_vector3_8h.html#c0e6714ccdb1e845d1c5cc79c057331a" title="Return the w value.">w</a>)
<a name="l00503"></a>00503         : <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a>(x, y, z)
<a name="l00504"></a>00504     {
<a name="l00505"></a>00505         <a class="code" href="bt_vector3_8h.html#c48c7986f7c3a03cd2450337d985d73e" title="btVector3 can be used to represent 3D points and vectors. It has an un-used w component...">m_floats</a>[3] = w;
<a name="l00506"></a>00506     }
<a name="l00507"></a>00507 
<a name="l00508"></a><a class="code" href="classbt_vector4.html#6f7ae67c24305119c6418fda68cd478a">00508</a>     <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> <a class="code" href="classbt_vector4.html">btVector4</a> <a class="code" href="classbt_vector4.html#6f7ae67c24305119c6418fda68cd478a">absolute4</a>()<span class="keyword"> const</span>
<a name="l00509"></a>00509 <span class="keyword">    </span>{
<a name="l00510"></a>00510         <span class="keywordflow">return</span> <a class="code" href="classbt_vector4.html#b8f1a78ef86a9727b6f680d83e8e4259">btVector4</a>(
<a name="l00511"></a>00511             <a class="code" href="bt_scalar_8h.html#4c4bd8e065ab617f4e37273d76e6d581">btFabs</a>(<a class="code" href="bt_vector3_8h.html#c48c7986f7c3a03cd2450337d985d73e" title="btVector3 can be used to represent 3D points and vectors. It has an un-used w component...">m_floats</a>[0]),
<a name="l00512"></a>00512             <a class="code" href="bt_scalar_8h.html#4c4bd8e065ab617f4e37273d76e6d581">btFabs</a>(<a class="code" href="bt_vector3_8h.html#c48c7986f7c3a03cd2450337d985d73e" title="btVector3 can be used to represent 3D points and vectors. It has an un-used w component...">m_floats</a>[1]),
<a name="l00513"></a>00513             <a class="code" href="bt_scalar_8h.html#4c4bd8e065ab617f4e37273d76e6d581">btFabs</a>(<a class="code" href="bt_vector3_8h.html#c48c7986f7c3a03cd2450337d985d73e" title="btVector3 can be used to represent 3D points and vectors. It has an un-used w component...">m_floats</a>[2]),
<a name="l00514"></a>00514             <a class="code" href="bt_scalar_8h.html#4c4bd8e065ab617f4e37273d76e6d581">btFabs</a>(<a class="code" href="bt_vector3_8h.html#c48c7986f7c3a03cd2450337d985d73e" title="btVector3 can be used to represent 3D points and vectors. It has an un-used w component...">m_floats</a>[3]));
<a name="l00515"></a>00515     }
<a name="l00516"></a>00516 
<a name="l00517"></a><a class="code" href="classbt_vector4.html#3253ee96c2a48764c27fbfabf4951965">00517</a>     <a class="code" href="bt_scalar_8h.html#1e5824cfc8adbf5a77f2622132d16018" title="The btScalar type abstracts floating point numbers, to easily switch between double...">btScalar</a> <a class="code" href="classbt_vector4.html#3253ee96c2a48764c27fbfabf4951965">getW</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="bt_vector3_8h.html#c48c7986f7c3a03cd2450337d985d73e" title="btVector3 can be used to represent 3D points and vectors. It has an un-used w component...">m_floats</a>[3]; }
<a name="l00518"></a>00518 
<a name="l00519"></a><a class="code" href="classbt_vector4.html#3ed283fbe2a9015cd1d8bdb03978597f">00519</a>     <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> int32_t <a class="code" href="classbt_vector4.html#3ed283fbe2a9015cd1d8bdb03978597f">maxAxis4</a>()<span class="keyword"> const</span>
<a name="l00520"></a>00520 <span class="keyword">    </span>{
<a name="l00521"></a>00521         int32_t maxIndex = -1;
<a name="l00522"></a>00522         <a class="code" href="bt_scalar_8h.html#1e5824cfc8adbf5a77f2622132d16018" title="The btScalar type abstracts floating point numbers, to easily switch between double...">btScalar</a> maxVal = <a class="code" href="bt_scalar_8h.html#1e5824cfc8adbf5a77f2622132d16018" title="The btScalar type abstracts floating point numbers, to easily switch between double...">btScalar</a>(-<a class="code" href="bt_scalar_8h.html#3a24ecdd029d38fef175bee5d965710a">BT_LARGE_FLOAT</a>);
<a name="l00523"></a>00523         <span class="keywordflow">if</span> (<a class="code" href="bt_vector3_8h.html#c48c7986f7c3a03cd2450337d985d73e" title="btVector3 can be used to represent 3D points and vectors. It has an un-used w component...">m_floats</a>[0] &gt; maxVal) {
<a name="l00524"></a>00524             maxIndex = 0;
<a name="l00525"></a>00525             maxVal = <a class="code" href="bt_vector3_8h.html#c48c7986f7c3a03cd2450337d985d73e" title="btVector3 can be used to represent 3D points and vectors. It has an un-used w component...">m_floats</a>[0];
<a name="l00526"></a>00526         }
<a name="l00527"></a>00527         <span class="keywordflow">if</span> (<a class="code" href="bt_vector3_8h.html#c48c7986f7c3a03cd2450337d985d73e" title="btVector3 can be used to represent 3D points and vectors. It has an un-used w component...">m_floats</a>[1] &gt; maxVal) {
<a name="l00528"></a>00528             maxIndex = 1;
<a name="l00529"></a>00529             maxVal = <a class="code" href="bt_vector3_8h.html#c48c7986f7c3a03cd2450337d985d73e" title="btVector3 can be used to represent 3D points and vectors. It has an un-used w component...">m_floats</a>[1];
<a name="l00530"></a>00530         }
<a name="l00531"></a>00531         <span class="keywordflow">if</span> (<a class="code" href="bt_vector3_8h.html#c48c7986f7c3a03cd2450337d985d73e" title="btVector3 can be used to represent 3D points and vectors. It has an un-used w component...">m_floats</a>[2] &gt; maxVal) {
<a name="l00532"></a>00532             maxIndex = 2;
<a name="l00533"></a>00533             maxVal = <a class="code" href="bt_vector3_8h.html#c48c7986f7c3a03cd2450337d985d73e" title="btVector3 can be used to represent 3D points and vectors. It has an un-used w component...">m_floats</a>[2];
<a name="l00534"></a>00534         }
<a name="l00535"></a>00535         <span class="keywordflow">if</span> (<a class="code" href="bt_vector3_8h.html#c48c7986f7c3a03cd2450337d985d73e" title="btVector3 can be used to represent 3D points and vectors. It has an un-used w component...">m_floats</a>[3] &gt; maxVal) {
<a name="l00536"></a>00536             maxIndex = 3;
<a name="l00537"></a>00537         }
<a name="l00538"></a>00538         <span class="keywordflow">return</span> maxIndex;
<a name="l00539"></a>00539     }
<a name="l00540"></a>00540 
<a name="l00541"></a><a class="code" href="classbt_vector4.html#ef5480bbac35d75e8a36f0d237362c8b">00541</a>     <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> int32_t <a class="code" href="classbt_vector4.html#ef5480bbac35d75e8a36f0d237362c8b">minAxis4</a>()<span class="keyword"> const</span>
<a name="l00542"></a>00542 <span class="keyword">    </span>{
<a name="l00543"></a>00543         int32_t minIndex = -1;
<a name="l00544"></a>00544         <a class="code" href="bt_scalar_8h.html#1e5824cfc8adbf5a77f2622132d16018" title="The btScalar type abstracts floating point numbers, to easily switch between double...">btScalar</a> minVal = <a class="code" href="bt_scalar_8h.html#1e5824cfc8adbf5a77f2622132d16018" title="The btScalar type abstracts floating point numbers, to easily switch between double...">btScalar</a>(<a class="code" href="bt_scalar_8h.html#3a24ecdd029d38fef175bee5d965710a">BT_LARGE_FLOAT</a>);
<a name="l00545"></a>00545         <span class="keywordflow">if</span> (<a class="code" href="bt_vector3_8h.html#c48c7986f7c3a03cd2450337d985d73e" title="btVector3 can be used to represent 3D points and vectors. It has an un-used w component...">m_floats</a>[0] &lt; minVal) {
<a name="l00546"></a>00546             minIndex = 0;
<a name="l00547"></a>00547             minVal = <a class="code" href="bt_vector3_8h.html#c48c7986f7c3a03cd2450337d985d73e" title="btVector3 can be used to represent 3D points and vectors. It has an un-used w component...">m_floats</a>[0];
<a name="l00548"></a>00548         }
<a name="l00549"></a>00549         <span class="keywordflow">if</span> (<a class="code" href="bt_vector3_8h.html#c48c7986f7c3a03cd2450337d985d73e" title="btVector3 can be used to represent 3D points and vectors. It has an un-used w component...">m_floats</a>[1] &lt; minVal) {
<a name="l00550"></a>00550             minIndex = 1;
<a name="l00551"></a>00551             minVal = <a class="code" href="bt_vector3_8h.html#c48c7986f7c3a03cd2450337d985d73e" title="btVector3 can be used to represent 3D points and vectors. It has an un-used w component...">m_floats</a>[1];
<a name="l00552"></a>00552         }
<a name="l00553"></a>00553         <span class="keywordflow">if</span> (<a class="code" href="bt_vector3_8h.html#c48c7986f7c3a03cd2450337d985d73e" title="btVector3 can be used to represent 3D points and vectors. It has an un-used w component...">m_floats</a>[2] &lt; minVal) {
<a name="l00554"></a>00554             minIndex = 2;
<a name="l00555"></a>00555             minVal = <a class="code" href="bt_vector3_8h.html#c48c7986f7c3a03cd2450337d985d73e" title="btVector3 can be used to represent 3D points and vectors. It has an un-used w component...">m_floats</a>[2];
<a name="l00556"></a>00556         }
<a name="l00557"></a>00557         <span class="keywordflow">if</span> (<a class="code" href="bt_vector3_8h.html#c48c7986f7c3a03cd2450337d985d73e" title="btVector3 can be used to represent 3D points and vectors. It has an un-used w component...">m_floats</a>[3] &lt; minVal) {
<a name="l00558"></a>00558             minIndex = 3;
<a name="l00559"></a>00559         }
<a name="l00560"></a>00560 
<a name="l00561"></a>00561         <span class="keywordflow">return</span> minIndex;
<a name="l00562"></a>00562     }
<a name="l00563"></a>00563 
<a name="l00564"></a><a class="code" href="classbt_vector4.html#1f462c8ea6b5e8550df89c6414da2eae">00564</a>     <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> int32_t <a class="code" href="classbt_vector4.html#1f462c8ea6b5e8550df89c6414da2eae">closestAxis4</a>()<span class="keyword"> const</span>
<a name="l00565"></a>00565 <span class="keyword">    </span>{
<a name="l00566"></a>00566         <span class="keywordflow">return</span> <a class="code" href="classbt_vector4.html#6f7ae67c24305119c6418fda68cd478a">absolute4</a>().<a class="code" href="classbt_vector4.html#3ed283fbe2a9015cd1d8bdb03978597f">maxAxis4</a>();
<a name="l00567"></a>00567     }
<a name="l00568"></a>00568 
<a name="l00575"></a>00575     <span class="comment">/*      void getValue(btScalar *m) const </span>
<a name="l00576"></a>00576 <span class="comment">        {</span>
<a name="l00577"></a>00577 <span class="comment">            m[0] = m_floats[0];</span>
<a name="l00578"></a>00578 <span class="comment">            m[1] = m_floats[1];</span>
<a name="l00579"></a>00579 <span class="comment">            m[2] =m_floats[2];</span>
<a name="l00580"></a>00580 <span class="comment">        }</span>
<a name="l00581"></a>00581 <span class="comment">*/</span>
<a name="l00588"></a><a class="code" href="classbt_vector4.html#08b401e9e501467c7c8c4f2edbcf3db2">00588</a>     <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> <span class="keywordtype">void</span> <a class="code" href="classbt_vector4.html#08b401e9e501467c7c8c4f2edbcf3db2" title="Set x,y,z and zero w.">setValue</a>(<span class="keyword">const</span> <a class="code" href="bt_scalar_8h.html#1e5824cfc8adbf5a77f2622132d16018" title="The btScalar type abstracts floating point numbers, to easily switch between double...">btScalar</a>&amp; <a class="code" href="bt_vector3_8h.html#0d05bb202a57e1c47ae0eeeec2502c1b" title="Return the x value.">x</a>, <span class="keyword">const</span> <a class="code" href="bt_scalar_8h.html#1e5824cfc8adbf5a77f2622132d16018" title="The btScalar type abstracts floating point numbers, to easily switch between double...">btScalar</a>&amp; <a class="code" href="bt_vector3_8h.html#88617d2888b444b2ad2384b17b0eeadf" title="Return the y value.">y</a>, <span class="keyword">const</span> <a class="code" href="bt_scalar_8h.html#1e5824cfc8adbf5a77f2622132d16018" title="The btScalar type abstracts floating point numbers, to easily switch between double...">btScalar</a>&amp; <a class="code" href="bt_vector3_8h.html#49dd8d4770be4de32dd57f9b926aa396" title="Return the z value.">z</a>, <span class="keyword">const</span> <a class="code" href="bt_scalar_8h.html#1e5824cfc8adbf5a77f2622132d16018" title="The btScalar type abstracts floating point numbers, to easily switch between double...">btScalar</a>&amp; <a class="code" href="bt_vector3_8h.html#c0e6714ccdb1e845d1c5cc79c057331a" title="Return the w value.">w</a>)
<a name="l00589"></a>00589     {
<a name="l00590"></a>00590         <a class="code" href="bt_vector3_8h.html#c48c7986f7c3a03cd2450337d985d73e" title="btVector3 can be used to represent 3D points and vectors. It has an un-used w component...">m_floats</a>[0] = x;
<a name="l00591"></a>00591         <a class="code" href="bt_vector3_8h.html#c48c7986f7c3a03cd2450337d985d73e" title="btVector3 can be used to represent 3D points and vectors. It has an un-used w component...">m_floats</a>[1] = y;
<a name="l00592"></a>00592         <a class="code" href="bt_vector3_8h.html#c48c7986f7c3a03cd2450337d985d73e" title="btVector3 can be used to represent 3D points and vectors. It has an un-used w component...">m_floats</a>[2] = z;
<a name="l00593"></a>00593         <a class="code" href="bt_vector3_8h.html#c48c7986f7c3a03cd2450337d985d73e" title="btVector3 can be used to represent 3D points and vectors. It has an un-used w component...">m_floats</a>[3] = w;
<a name="l00594"></a>00594     }
<a name="l00595"></a>00595 };
<a name="l00596"></a>00596 
<a name="l00598"></a><a class="code" href="bt_vector3_8h.html#73a7b483dcde16e86e28e8c75be3df99">00598</a> <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> <span class="keywordtype">void</span> <a class="code" href="bt_vector3_8h.html#73a7b483dcde16e86e28e8c75be3df99" title="btSwapVector3Endian swaps vector endianness, useful for network and cross-platform...">btSwapScalarEndian</a>(<span class="keyword">const</span> <a class="code" href="bt_scalar_8h.html#1e5824cfc8adbf5a77f2622132d16018" title="The btScalar type abstracts floating point numbers, to easily switch between double...">btScalar</a>&amp; sourceVal, <a class="code" href="bt_scalar_8h.html#1e5824cfc8adbf5a77f2622132d16018" title="The btScalar type abstracts floating point numbers, to easily switch between double...">btScalar</a>&amp; destVal)
<a name="l00599"></a>00599 {
<a name="l00600"></a>00600 <span class="preprocessor">#ifdef BT_USE_DOUBLE_PRECISION</span>
<a name="l00601"></a>00601 <span class="preprocessor"></span>    <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>* dest = (<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>*)&amp;destVal;
<a name="l00602"></a>00602     <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>* src = (<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>*)&amp;sourceVal;
<a name="l00603"></a>00603     dest[0] = src[7];
<a name="l00604"></a>00604     dest[1] = src[6];
<a name="l00605"></a>00605     dest[2] = src[5];
<a name="l00606"></a>00606     dest[3] = src[4];
<a name="l00607"></a>00607     dest[4] = src[3];
<a name="l00608"></a>00608     dest[5] = src[2];
<a name="l00609"></a>00609     dest[6] = src[1];
<a name="l00610"></a>00610     dest[7] = src[0];
<a name="l00611"></a>00611 <span class="preprocessor">#else</span>
<a name="l00612"></a>00612 <span class="preprocessor"></span>    <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>* dest = (<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>*)&amp;destVal;
<a name="l00613"></a>00613     <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>* src = (<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>*)&amp;sourceVal;
<a name="l00614"></a>00614     dest[0] = src[3];
<a name="l00615"></a>00615     dest[1] = src[2];
<a name="l00616"></a>00616     dest[2] = src[1];
<a name="l00617"></a>00617     dest[3] = src[0];
<a name="l00618"></a>00618 <span class="preprocessor">#endif //BT_USE_DOUBLE_PRECISION</span>
<a name="l00619"></a>00619 <span class="preprocessor"></span>}
<a name="l00621"></a><a class="code" href="bt_vector3_8h.html#96dc28c8355164ad9a4736ad2fe99e2c">00621</a> <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> <span class="keywordtype">void</span> <a class="code" href="bt_vector3_8h.html#96dc28c8355164ad9a4736ad2fe99e2c" title="btSwapVector3Endian swaps vector endianness, useful for network and cross-platform...">btSwapVector3Endian</a>(<span class="keyword">const</span> <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a>&amp; sourceVec, <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a>&amp; destVec)
<a name="l00622"></a>00622 {
<a name="l00623"></a>00623     <span class="keywordflow">for</span> (int32_t i = 0; i &lt; 4; i++) {
<a name="l00624"></a>00624         <a class="code" href="bt_vector3_8h.html#73a7b483dcde16e86e28e8c75be3df99" title="btSwapVector3Endian swaps vector endianness, useful for network and cross-platform...">btSwapScalarEndian</a>(sourceVec[i], destVec[i]);
<a name="l00625"></a>00625     }
<a name="l00626"></a>00626 }
<a name="l00627"></a>00627 
<a name="l00629"></a><a class="code" href="bt_vector3_8h.html#111b328c4d76341871adb4712477ad21">00629</a> <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> <span class="keywordtype">void</span> <a class="code" href="bt_vector3_8h.html#111b328c4d76341871adb4712477ad21" title="btUnSwapVector3Endian swaps vector endianness, useful for network and cross-platform...">btUnSwapVector3Endian</a>(<a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a>&amp; vector)
<a name="l00630"></a>00630 {
<a name="l00631"></a>00631 
<a name="l00632"></a>00632     <a class="code" href="bt_vector3_8h.html#3fae008fb245faf41f926174868c1323" title="No initialization constructor.">btVector3</a> swappedVec;
<a name="l00633"></a>00633     <span class="keywordflow">for</span> (int32_t i = 0; i &lt; 4; i++) {
<a name="l00634"></a>00634         <a class="code" href="bt_vector3_8h.html#73a7b483dcde16e86e28e8c75be3df99" title="btSwapVector3Endian swaps vector endianness, useful for network and cross-platform...">btSwapScalarEndian</a>(vector[i], swappedVec[i]);
<a name="l00635"></a>00635     }
<a name="l00636"></a>00636     vector = swappedVec;
<a name="l00637"></a>00637 }
<a name="l00638"></a>00638 
<a name="l00639"></a>00639 <span class="keyword">template</span> &lt;<span class="keyword">class</span> T&gt;
<a name="l00640"></a><a class="code" href="bt_vector3_8h.html#17d43dc0b1e36c2f3dd5b7aeaf930989">00640</a> <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> <span class="keywordtype">void</span> <a class="code" href="bt_vector3_8h.html#17d43dc0b1e36c2f3dd5b7aeaf930989">btPlaneSpace1</a>(<span class="keyword">const</span> T&amp; n, T&amp; p, T&amp; q)
<a name="l00641"></a>00641 {
<a name="l00642"></a>00642     <span class="keywordflow">if</span> (<a class="code" href="bt_scalar_8h.html#4c4bd8e065ab617f4e37273d76e6d581">btFabs</a>(n[2]) &gt; <a class="code" href="bt_scalar_8h.html#568883327ba96f54afed8dfd7ec1c66e">SIMDSQRT12</a>) {
<a name="l00643"></a>00643         <span class="comment">// choose p in y-z plane</span>
<a name="l00644"></a>00644         <a class="code" href="bt_scalar_8h.html#1e5824cfc8adbf5a77f2622132d16018" title="The btScalar type abstracts floating point numbers, to easily switch between double...">btScalar</a> a = n[1] * n[1] + n[2] * n[2];
<a name="l00645"></a>00645         <a class="code" href="bt_scalar_8h.html#1e5824cfc8adbf5a77f2622132d16018" title="The btScalar type abstracts floating point numbers, to easily switch between double...">btScalar</a> k = <a class="code" href="bt_scalar_8h.html#3103b9da34215c512d7fbff3cd94dd60">btRecipSqrt</a>(a);
<a name="l00646"></a>00646         p[0] = 0;
<a name="l00647"></a>00647         p[1] = -n[2] * k;
<a name="l00648"></a>00648         p[2] = n[1] * k;
<a name="l00649"></a>00649         <span class="comment">// set q = n x p</span>
<a name="l00650"></a>00650         q[0] = a * k;
<a name="l00651"></a>00651         q[1] = -n[0] * p[2];
<a name="l00652"></a>00652         q[2] = n[0] * p[1];
<a name="l00653"></a>00653     }
<a name="l00654"></a>00654     <span class="keywordflow">else</span> {
<a name="l00655"></a>00655         <span class="comment">// choose p in x-y plane</span>
<a name="l00656"></a>00656         <a class="code" href="bt_scalar_8h.html#1e5824cfc8adbf5a77f2622132d16018" title="The btScalar type abstracts floating point numbers, to easily switch between double...">btScalar</a> a = n[0] * n[0] + n[1] * n[1];
<a name="l00657"></a>00657         <a class="code" href="bt_scalar_8h.html#1e5824cfc8adbf5a77f2622132d16018" title="The btScalar type abstracts floating point numbers, to easily switch between double...">btScalar</a> k = <a class="code" href="bt_scalar_8h.html#3103b9da34215c512d7fbff3cd94dd60">btRecipSqrt</a>(a);
<a name="l00658"></a>00658         p[0] = -n[1] * k;
<a name="l00659"></a>00659         p[1] = n[0] * k;
<a name="l00660"></a>00660         p[2] = 0;
<a name="l00661"></a>00661         <span class="comment">// set q = n x p</span>
<a name="l00662"></a>00662         q[0] = -n[2] * p[1];
<a name="l00663"></a>00663         q[1] = n[2] * p[0];
<a name="l00664"></a>00664         q[2] = a * k;
<a name="l00665"></a>00665     }
<a name="l00666"></a>00666 }
<a name="l00667"></a>00667 
<a name="l00668"></a><a class="code" href="structbt_vector3_float_data.html">00668</a> <span class="keyword">struct </span><a class="code" href="structbt_vector3_float_data.html">btVector3FloatData</a> {
<a name="l00669"></a><a class="code" href="structbt_vector3_float_data.html#b246fb8dc0af06cfb3260d836591dc46">00669</a>     <span class="keywordtype">float</span> <a class="code" href="structbt_vector3_float_data.html#b246fb8dc0af06cfb3260d836591dc46">m_floats</a>[4];
<a name="l00670"></a>00670 };
<a name="l00671"></a>00671 
<a name="l00672"></a><a class="code" href="structbt_vector3_double_data.html">00672</a> <span class="keyword">struct </span><a class="code" href="structbt_vector3_double_data.html">btVector3DoubleData</a> {
<a name="l00673"></a><a class="code" href="structbt_vector3_double_data.html#69c991016e883f0320d5c646f56d243e">00673</a>     <span class="keywordtype">double</span> <a class="code" href="structbt_vector3_double_data.html#69c991016e883f0320d5c646f56d243e">m_floats</a>[4];
<a name="l00674"></a>00674 };
<a name="l00675"></a>00675 
<a name="l00676"></a><a class="code" href="bt_vector3_8h.html#ef619367f3b7275597ac08176c30fe38">00676</a> <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> <span class="keywordtype">void</span> <a class="code" href="bt_vector3_8h.html#ef619367f3b7275597ac08176c30fe38">btVector3::serializeFloat</a>(<span class="keyword">struct</span> <a class="code" href="structbt_vector3_float_data.html">btVector3FloatData</a>&amp; dataOut)<span class="keyword"> const</span>
<a name="l00677"></a>00677 <span class="keyword"></span>{
<a name="l00679"></a>00679     <span class="keywordflow">for</span> (int32_t i = 0; i &lt; 4; i++)
<a name="l00680"></a>00680         dataOut.<a class="code" href="structbt_vector3_float_data.html#b246fb8dc0af06cfb3260d836591dc46">m_floats</a>[i] = <span class="keywordtype">float</span>(<a class="code" href="bt_vector3_8h.html#c48c7986f7c3a03cd2450337d985d73e" title="btVector3 can be used to represent 3D points and vectors. It has an un-used w component...">m_floats</a>[i]);
<a name="l00681"></a>00681 }
<a name="l00682"></a>00682 
<a name="l00683"></a><a class="code" href="bt_vector3_8h.html#92157a4108a364787eb1b937c7b6d3ce">00683</a> <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> <span class="keywordtype">void</span> <a class="code" href="bt_vector3_8h.html#92157a4108a364787eb1b937c7b6d3ce">btVector3::deSerializeFloat</a>(<span class="keyword">const</span> <span class="keyword">struct</span> <a class="code" href="structbt_vector3_float_data.html">btVector3FloatData</a>&amp; dataIn)
<a name="l00684"></a>00684 {
<a name="l00685"></a>00685     <span class="keywordflow">for</span> (int32_t i = 0; i &lt; 4; i++)
<a name="l00686"></a>00686         <a class="code" href="bt_vector3_8h.html#c48c7986f7c3a03cd2450337d985d73e" title="btVector3 can be used to represent 3D points and vectors. It has an un-used w component...">m_floats</a>[i] = <a class="code" href="bt_scalar_8h.html#1e5824cfc8adbf5a77f2622132d16018" title="The btScalar type abstracts floating point numbers, to easily switch between double...">btScalar</a>(dataIn.<a class="code" href="structbt_vector3_float_data.html#b246fb8dc0af06cfb3260d836591dc46">m_floats</a>[i]);
<a name="l00687"></a>00687 }
<a name="l00688"></a>00688 
<a name="l00689"></a><a class="code" href="bt_vector3_8h.html#eaa3d3bbc4902b5756e2f6ed088522f8">00689</a> <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> <span class="keywordtype">void</span> <a class="code" href="bt_vector3_8h.html#eaa3d3bbc4902b5756e2f6ed088522f8">btVector3::serializeDouble</a>(<span class="keyword">struct</span> <a class="code" href="structbt_vector3_double_data.html">btVector3DoubleData</a>&amp; dataOut)<span class="keyword"> const</span>
<a name="l00690"></a>00690 <span class="keyword"></span>{
<a name="l00692"></a>00692     <span class="keywordflow">for</span> (int32_t i = 0; i &lt; 4; i++)
<a name="l00693"></a>00693         dataOut.<a class="code" href="structbt_vector3_double_data.html#69c991016e883f0320d5c646f56d243e">m_floats</a>[i] = <span class="keywordtype">double</span>(<a class="code" href="bt_vector3_8h.html#c48c7986f7c3a03cd2450337d985d73e" title="btVector3 can be used to represent 3D points and vectors. It has an un-used w component...">m_floats</a>[i]);
<a name="l00694"></a>00694 }
<a name="l00695"></a>00695 
<a name="l00696"></a><a class="code" href="bt_vector3_8h.html#4241fc63918b2364ad15adcf42017554">00696</a> <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> <span class="keywordtype">void</span> <a class="code" href="bt_vector3_8h.html#4241fc63918b2364ad15adcf42017554">btVector3::deSerializeDouble</a>(<span class="keyword">const</span> <span class="keyword">struct</span> <a class="code" href="structbt_vector3_double_data.html">btVector3DoubleData</a>&amp; dataIn)
<a name="l00697"></a>00697 {
<a name="l00698"></a>00698     <span class="keywordflow">for</span> (int32_t i = 0; i &lt; 4; i++)
<a name="l00699"></a>00699         <a class="code" href="bt_vector3_8h.html#c48c7986f7c3a03cd2450337d985d73e" title="btVector3 can be used to represent 3D points and vectors. It has an un-used w component...">m_floats</a>[i] = <a class="code" href="bt_scalar_8h.html#1e5824cfc8adbf5a77f2622132d16018" title="The btScalar type abstracts floating point numbers, to easily switch between double...">btScalar</a>(dataIn.<a class="code" href="structbt_vector3_double_data.html#69c991016e883f0320d5c646f56d243e">m_floats</a>[i]);
<a name="l00700"></a>00700 }
<a name="l00701"></a>00701 
<a name="l00702"></a>00702 <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> <span class="keywordtype">void</span> <a class="code" href="bt_vector3_8h.html#8452b542ab5c406144bb9086b8be1c45">btVector3::serialize</a>(<span class="keyword">struct</span> <a class="code" href="bt_vector3_8h.html#d116b75e5135551c1335437e47fd8a3f">btVector3Data</a>&amp; dataOut)<span class="keyword"> const</span>
<a name="l00703"></a>00703 <span class="keyword"></span>{
<a name="l00705"></a>00705     <span class="keywordflow">for</span> (int32_t i = 0; i &lt; 4; i++)
<a name="l00706"></a>00706         dataOut.m_floats[i] = <a class="code" href="bt_vector3_8h.html#c48c7986f7c3a03cd2450337d985d73e" title="btVector3 can be used to represent 3D points and vectors. It has an un-used w component...">m_floats</a>[i];
<a name="l00707"></a>00707 }
<a name="l00708"></a>00708 
<a name="l00709"></a><a class="code" href="bt_vector3_8h.html#b97452b3ced1f03b405a589ef841e96f">00709</a> <a class="code" href="bt_scalar_8h.html#8a6a3e8b28846a3d7271e376c738ec40">SIMD_FORCE_INLINE</a> <span class="keywordtype">void</span> <a class="code" href="bt_vector3_8h.html#b97452b3ced1f03b405a589ef841e96f">btVector3::deSerialize</a>(<span class="keyword">const</span> <span class="keyword">struct</span> <a class="code" href="bt_vector3_8h.html#d116b75e5135551c1335437e47fd8a3f">btVector3Data</a>&amp; dataIn)
<a name="l00710"></a>00710 {
<a name="l00711"></a>00711     <span class="keywordflow">for</span> (int32_t i = 0; i &lt; 4; i++)
<a name="l00712"></a>00712         <a class="code" href="bt_vector3_8h.html#c48c7986f7c3a03cd2450337d985d73e" title="btVector3 can be used to represent 3D points and vectors. It has an un-used w component...">m_floats</a>[i] = dataIn.m_floats[i];
<a name="l00713"></a>00713 }
<a name="l00714"></a>00714 
<a name="l00715"></a>00715 <span class="preprocessor">#endif //BT_VECTOR3_H</span>
</pre></div></div>
<!-- start footer part -->
<div class="footer">
Copyright &copy; 2015-2017 NVIDIA Corporation, 2701 San Tomas Expressway, Santa Clara, CA 95050 U.S.A. All rights reserved. <a href="http://www.nvidia.com ">www.nvidia.com</a>
</div>
</body>
</html>