|
Boost : |
Subject: Re: [boost] Review Request: QVM (generic Quaternion, Vector and Matrix operations library)
From: Emil Dotchevski (emildotchevski_at_[hidden])
Date: 2015-05-06 20:25:16
I've updated the QVM documentation, http://www.revergestudios.com/boost-qvm/.
There is a new Motivation page that should make the scope of the library
clearer.
Here are some responses to questions triggered by my initial post:
Q: What is the motivation for Boost QVM? Why not just use
uBLAS/Eigen/CML/GLM/etc?
A: 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 swizzling, e.g. v%ZZXY).
Q: How does the qvm::vec (or qvm::mat, or qvm::quat) template compare to
vector types from other libraries?
A: The qvm::vec 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. D3DVECTOR), while the
qvm::vec 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 deduce_m2 hasn't been specialized, the cross product of a
user-defined type vec3 and a user-defined type float3 returns a qvm::vec.
Q: Why doesn't QVM use [] or () to access vector and matrix elements?
A: 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 operator[] or operator() they are available for
use with other QVM functions, but the generic access defined by QVM uses
operator% instead.
Thanks once again for the valuable feedback,
Emil Dotchevski
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk