yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #04785
Re: normalizing quaternions. Rev 2266: 1. Tentative fix for the clumps bug
-
To:
Yade developers <yade-dev@xxxxxxxxxxxxxxxxxxx>
-
From:
Janek Kozicki <janek_listy@xxxxx>
-
Date:
Fri, 4 Jun 2010 22:39:35 +0200
-
Face:
iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAALVBMVEUBAQEtLS1KSkpRUVFXV1dYWFhjY2Nzc3N3d3eHh4eKioqdnZ24uLjLy8vc3NxVIagyAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH2AIVEzgS1fgQtQAAAjRJREFUOMtt1DFv00AUAOAzFQNbjigSyoQaRaBMhKgLUyKXpVNNeUpk9vyDqFJhQ1kiBuaqAwJCqvPtSLY7RlTn5+5IdnYkkt/AOyfxXVLe5vf53Z1875kd34tOEax8djmj6GyjhB5bxz50GdsVZr9fqRjZwAtKOJw5Wqs2MMZ16ALHsaDncF7xAHix1oEFHAB8f+pRjcO4gfZDykcYzbiucRolOLUJ6kjA0xtVt+A6TySlM0RajIpK6DzwKZ/nOYbF/gclHMo1ZOHYY/+Ha+AWuM+3oMS4eeqYzZ8FiCltgUqI8cd2wwAVpJk+8LWYjBtnJdQpHQqJMd4Oxt4bU9ESiFGc5hkqaH74asAX4iabP5I5gZ+qjgGlJCqZa3h3lxhoeVcSE1qLQC4sqKOK9MGW9E3izFqqHokoztLFEgXg31sbZEKnWi2T74A4NxfVQqlkjKtcAWD+zcArFEES01dR0E/nnV0IgugmDd/2L84sOAouRBBHEc7gtc8teDkRlE0iNQPo2w3Xhh/D4TCIQ4LRLoTvgwjj6RRgavdurxYGMaIuGOyAW/PpNlCcU9/93AHenAWYjPoAwa+G3e3to/MgFNTAEKvKDjzuCzHTnY3qqdXtx24VijzQfZ0yewZ5cwRFQaa+mIYr1uI0I76+3W4xhlvoVRwOA0Fdl64HlJnxP6T8YpX/Lga4Wv4A3ErrU5oTfN7Mu/llXMl8RXEPji/lQkN3H7qXqgC2By47EXeU/7PJ/wPxRKMnuZwIeAAAAABJRU5ErkJggg==
-
In-reply-to:
<20100604185144.231cfe33@atak.bl.pg.gda.pl>
I'm replying in this thread to a commit by Vaclav. To get all
discussion centered in single place.
Janek Kozicki said: (by the date of Thu, 3 Jun 2010 02:18:42 +0200)
> Anton Gladky said: (by the date of Wed, 2 Jun 2010 07:32:59 +0200)
>
> > > - state->ori=Quaternionr(R_g2c);
> > > + state->ori=Quaternionr(R_g2c); state->ori.normalize();
a minimum safety, would be performing normalization in the
constructor. and LOG_WARN if constructor had to normalize a
quaternion which was way off 1.0 length.
Such minimum safety would make such commit as that above one to be
unnecessary.
But even adding normalization in the constructor requires changing
eigen's implementation of quaternions. And that's an external
library. So.... either contact the library authors, or derive from it
another class unit_quatenrion.
In fact I wonder - we could ask library authors if they are using
quaternions for anything else than rotations. If not - then they
might be interested in implementing in their library a
unit_quaternion on top of quaternion class.
--
Janek Kozicki http://janek.kozicki.pl/ |
Follow ups
References