Re: [eigen] Rigid transformations in eigen: use of dual quaternions |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] Rigid transformations in eigen: use of dual quaternions
- From: Benoit Jacob <jacob.benoit.1@xxxxxxxxx>
- Date: Sun, 13 Sep 2009 04:58:17 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=eh7APiUmBJY/BhPwEjwx1XWserkil8tZ0it3/nFwUME=; b=tA74dw+sTBzvE2QFJrYGo7eFA1wByK8iCQeE8yXjGA6PC1zKKBbjWnxIXDI8q3tcBa Vra/nNW9S7xt8ihGVhKK3d7ExZEseekjS4LU++H6QXYO3iWG4WHYj8ZCkjljACnjtmBe exuuoeW9oCqbtgO7QMeDZCI2H0FOzuZIioDh0=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=RQbbLrcDSgDKaeICafcEfht/yqW2Q3Ii8nToncCFRd9cJi9eClKz5McPktkR+pDFS/ zw0qwKvJ1fb1TqBizaApL/6pGP53OVWoOkmFP0A10N3+RBy4PoxS2c/SjsJVaTYkdyFq FnG4yPC9QqIw5Hvgw7dTEoM4QVJKva855mpbY=
2009/9/13 Hauke Heibel <hauke.heibel@xxxxxxxxxxxxxx>:
> On Sat, Sep 12, 2009 at 8:22 PM, Benoit Jacob <jacob.benoit.1@xxxxxxxxx> wrote:
>> float data[4];
>> reinterpret_cast<Quaternionf*>(data)->slerp(....);
>
> Why can you not do this?
>
> float data[4];
> Quaternionf( Map<Vector4f>(data,4) ).slerp(...);
>
> For me the code seems to vectorize - at least the slerp() part. Even
> when the code would not be vectorizing don't you think it is a bit
> hard-core to pre-emptively optimize via a reinterpret_cast?
You can do this, but what it does is to copy the data into the new
Quaternionf's coeffs.
Rohit was trying to avoid paying for that copying.
Benoit