|
Boost : |
Subject: Re: [boost] Preliminary review request for (Boost) QVM
From: Vicente Botet (vicente.botet_at_[hidden])
Date: 2011-02-08 15:29:54
Emil Dotchevski-3 wrote:
>
> On Tue, Feb 8, 2011 at 9:47 AM, Vicente Botet <vicente.botet_at_[hidden]>
> wrote:
>> Emil Dotchevski-3 wrote:
>> BTW, I guess that the Dim in quat is 4
>>
>> Â Â Â Â struct quat
>> Â Â Â Â {
>> Â Â Â Â Â Â T a[Dim];
>
> I'm not sure I understand the question, but v_traits<> defines Dim,
> q_traits<> does not.
>
Here is what I see in
http://revergestudios.com/boost-qvm/quaternion_vector_and_matrix_types_reference.html
Best,
Vicente
namespace boost
{
namespace qvm
{
//*** Matrix and vector types ***
template <class T>
struct quat
{
T a[Dim]; /////////////////////////////////////////
template <class R>
operator R() const
{
R r;
assign(r,*this);
return r;
}
};
template <class Quaternion>
struct q_traits;
template <class T>
struct q_traits< quat<T> >
{
typedef T scalar_type;
template <int I> static scalar_type r( quat<T> const & x ) {
return x.a[I]; }
template <int I> static scalar_type & w( quat<T> & x ) { return
x.a[I]; }
};
-- View this message in context: http://boost.2283326.n4.nabble.com/Preliminary-review-request-for-Boost-QVM-tp3263528p3276726.html Sent from the Boost - Dev mailing list archive at Nabble.com.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk