]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/qvm/doc/questions_and_answers.html
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / qvm / doc / questions_and_answers.html
1 <!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN'
2 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
3 <html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en' lang='en'>
4 <head>
5 <meta http-equiv='Content-Type' content='text/html; charset=utf-8'/>
6 <title>questions and answers</title>
7 <link href='reno.css' type='text/css' rel='stylesheet'/>
8 </head>
9 <body>
10 <div class="body-0">
11 <div class="body-1">
12 <div class="body-2">
13 <div>
14 <h1>QVM: Quaternions, Vectors, Matrices</h1>
15 </div>
16 <!-- Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc. -->
17 <!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
18 <!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
19 <div class="RenoIncludeDIV"><div class="RenoAutoDIV"><h3>Questions and Answers</h3>
20 </div>
21 <p><b>Q:</b> What is the motivation behind Boost QVM? Why not just use uBLAS/Eigen/CML/GLM/etc?</p>
22 <blockquote><p><b>A:</b> The primary domain of Boost QVM is realtime graphics and simulation applications, so it is not a complete linear algebra library. While (naturally) there is some overlap with such libraries, QVM puts the emphasis on 2, 3 and 4 dimensional zero-overhead operations (hence domain-specific features like <span class="RenoLink"><a href="Swizzling.html">Swizzling</a></span>).</p></blockquote>
23 <p><b>Q:</b> How does the <i>qvm::<span class="RenoLink"><a href="vec.html">vec</a></span></i> (or <i>qvm::<span class="RenoLink"><a href="mat.html">mat</a></span></i>, or <i>qvm::<span class="RenoLink"><a href="quat.html">quat</a></span></i>) template compare to vector types from other libraries?</p>
24 <blockquote><p><b>A:</b> The <i>qvm::<span class="RenoLink"><a href="vec.html">vec</a></span></i> template is not in any way central to the vector operations defined by QVM. The operations are designed to work with any user-defined vector type or with 3rd-party vector types (e.g. <i><span class="RenoLink"><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/bb172627%28v=vs.85%29.aspx">D3DVECTOR</a></span></i>), while the <i>qvm::<span class="RenoLink"><a href="vec.html">vec</a></span></i> template is simply a default return type for expressions that use arguments of different types that would be incompatible outside of QVM. For example, if the <i><span class="RenoLink"><a href="deduce_mat2.html">deduce_mat2</a></span></i> hasn't been specialized, calling <i><span class="RenoLink"><a href="cross.html">cross</a></span></i> with a user-defined type <i>vec3</i> and a user-defined type <i>float3</i> returns a <i>qvm::<span class="RenoLink"><a href="vec.html">vec</a></span></i>.</p></blockquote>
25 <p><b>Q:</b> Why doesn't QVM use [] or () to access vector and matrix elements?</p>
26 <blockquote><p><b>A:</b> Because it's designed to work with user-defined types, and the C++ standard requires these operators to be members. Of course if a user-defined type defines <i>operator[]</i> or <i>operator()</i> they are available for use with other QVM functions, but QVM defines its own mechanism for <span class="RenoLink"><a href="accessing_vector_elements.html">accessing vector elements</a></span>, as well as <span class="RenoLink"><a href="Swizzling.html">Swizzling</a></span> support.</p></blockquote>
27 </div><div class="RenoAutoDIV"><div class="RenoHR"><hr/></div>
28 See also: <span class="RenoPageList"><a href="index.html">Boost QVM</a></span>
29 </div>
30 <!-- Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc. -->
31 <!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
32 <!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
33 <div id="footer">
34 <p>
35 <a class="logo" href="http://jigsaw.w3.org/css-validator/check/referer"><img class="logo_pic" src="valid-css.png" alt="Valid CSS" height="31" width="88"/></a>
36 <a class="logo" href="http://validator.w3.org/check?uri=referer"><img class="logo_pic" src="valid-xhtml.png" alt="Valid XHTML 1.0" height="31" width="88"/></a>
37 <small>Copyright (c) 2008-2016 by Emil Dotchevski and Reverge Studios, Inc.<br/>
38 Distributed under the <a href="http://www.boost.org/LICENSE_1_0.txt">Boost Software License, Version 1.0</a>.</small>
39 </p>
40 </div>
41 </div>
42 </div>
43 </div>
44 </body>
45 </html>