Re: [eigen] Re: Rigid transformations in eigen: use of dual quaternions |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] Re: Rigid transformations in eigen: use of dual quaternions
- From: Benoit Jacob <jacob.benoit.1@xxxxxxxxx>
- Date: Sat, 12 Sep 2009 11:09:56 -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=JusWYw0b2pvNDPRx8usLdBumq6N7bCg3EGZ1CcRy3eU=; b=lTgJu1zgW1SPEvgV5V4Hn4fWKz33LUlF/2v6Q1e377VaMLyDndtweO/XZGhZNUvpOo j8vZ5oUhrg5WC8jvnqQJhNDgqHCw7hHWWnoJIXdKIZjaeUsnHiJ2d/tyV6xTLORw+P7o Z2DWUdwa/wlqOfEFnWfk2uXGcvhclMV2XJznM=
- 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=YbwyV/4jiv58QU4VIggg33dS+vyoaCchQiYfJnQVqq1Cq+rCceW0u3Y+kvmgoUPwc9 5KNX0opejt6D/x47wn4GQRIQFBPsqp3PAQThujn2LuTLjWu4phIF2MnUjisu3MXT6KOg l1v3XtHlSqAE8lqF98Fo6Pzd9VhLBNUhq5Fs4=
oops, i meant
Quaternionf result( s1 * q1.coeffs() + s2 * q2.coeffs() );
(otherwise i'm afraid of a redundant copy, i don't know well enough
the c++ rules here)
Benoit
2009/9/12 Benoit Jacob <jacob.benoit.1@xxxxxxxxx>:
> Just one quick note:
>
> if you need efficient operator + * etc... NOW, you can always do this
> on the underlying vector of coefficients:
>
> Quaternionf result = Quaternionf( s1 * q1.coeffs() + s2 * q2.coeffs() );
>
> In this way, you get all the power of expression templates. The only
> drawback is how it's heavy to have to write coeffs() and the
> conversion constructor.
>
> Perhaps that's good enough that we don't have to worry more about
> expression templates for quaternions?
>
> Benoit
>
> 2009/9/12 Benoit Jacob <jacob.benoit.1@xxxxxxxxx>:
>> 2009/9/12 Rohit Garg <rpg.314@xxxxxxxxx>:
>>>> But are you sure that what you're trying to do with s1*q1+s2*q2 isn't
>>>> just the same as slerp() ? because it looks seriously reminiscent of
>>>> it!
>>>
>>> The form is like that, but it is not slerp. That would have made my
>>> job so much easier :|
>>
>> OK so we have several options here.
>>
>> The easiest is to add a method interpolate(q1,q2,s1,s2) to Quaternion,
>> returning a Quaternion.
>> It could even take care of normalizing the result (i guess you want that too?)
>>
>> Would that be enough for you?
>>
>> Otherwise, if we need expression templates in Quaternion, well I think
>> I remember the big issue now: Quaternion already inherits
>> RotationBase, so it would mean multiple inheritance if it also
>> inherited MatrixBase. I didn't think more, so I don't know where to go
>> from here.
>>
>> Benoit (will reply to other email later, have to go now)
>>
>>>
>>> --
>>> Rohit Garg
>>>
>>> http://rpg-314.blogspot.com/
>>>
>>> Senior Undergraduate
>>> Department of Physics
>>> Indian Institute of Technology
>>> Bombay
>>>
>>>
>>>
>>
>