Re: [eigen] Sum of quaternions |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] Sum of quaternions
- From: Benoit Jacob <jacob.benoit.1@xxxxxxxxx>
- Date: Wed, 8 Dec 2010 08:24:17 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type; bh=sRZbDzyON8ttbJCTCMe3+DfyARTHR5kfP0YBeZNqsTA=; b=ZNaIfUwjckuSSiail8KI7rhjGvJ9aTF9KQT4eqhEcnu0WMKQU9k76I65pP1X0RwdfA vpFROFGgrUPvMoYNtpQJUUMH8o1jxZodwcA92iH282mLtk3MUnRtxS2nXlW/zXlPy98C sdlYVAInl2mz+ijTxGrtGc3FPJxCpDgQ1ZTO4=
- 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=o4Yx7bWPlzK5Bo1d6cWlCkWo0fztFDDDljoXBT3+iW459cliwex9bpxHVKo5SY1XoS EmiaWsXGPmKfkE121wBb1w0n5R2XIUnIvL1uKN+qrizY/a+3RoYgl769YedRJ8DWdauK cPeXQj+1tFcqAeTp4nIVJAvKDKxVSabbUhf4w=
Originally we wanted the Quaternion class to be only for unit
quaternions. Then we changed our mind especially as we would need
general quaternions for implementing dual quaternions, but the
discussion got stuck in the question of how to make operator+
efficient regardless of the compiler.
It would be OK as a temporary solution to have a trivial operator+
just returning the result by value. Feel free to make a patch, but for
good measure it should have substraction, and mul/div by a scalar.
Then the real solution is quaternion expression templates, we
discussed this and found that that should be doable by doing
QuaternionBase<SomeExpressionType>.
Benoit
2010/12/7 Andrea Arteaga <yo.eres@xxxxxxxxx>:
> It seems that the operator+ between two quaternions is (still) undefined. Am
> I right? I'm not an expert, but I think it is a basic feature for such a
> class... Is there a reason for this unimplemented function? I need it and I
> could write a very simple version of the sum, but I'd like to be sure I'm
> not doing something wrong.
> Cheers.
> Andrea Arteaga