|Re: [eigen] Do we need geometry refactoring?|
[ Thread Index |
| More lists.tuxfamily.org/eigen Archives
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] Do we need geometry refactoring?
- From: Benoit Jacob <jacob.benoit.1@xxxxxxxxx>
- Date: Tue, 3 Aug 2010 09:53:14 -0400
- 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=gfREzgiCqXeHAUVxdh1eytMmLqOZIozGBgBQcx59f0E=; b=D9BhLUdSe+3uYrC+pO7XJQGldY0IujOovZOIlfCkNfZhj7PnlKfwF7jXgrb3gtpTIU t8JAvKRhGpNzYllneYGQnAxaK1Ym1t5lc5z0uL7zr8kWZtPPllzbXFwOMB2ZP1VB+0Zh nXdMinoAmPlhu/ySzmjT1XVB3RWhaWsmNxeyU=
- 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=B4/Mqh3xZb1lSt0jZpse7LaO6+Egs18dtFDIGcR/TDDZFTZmWDiK0MBYq8pJe14m6l 8ve2+KGx/RSZRv+HeRVeCTuYxkgO4BFX9JlL5K+h4b3dueaR7k4cZy2dPXF878EnFQFO 7FpRzpxJyHmpP/qRcZaq2ArzWuRp3ETJeX/2k=
2010/8/3 Hauke Heibel <hauke.heibel@xxxxxxxxxxxxxx>:
> On Tue, Aug 3, 2010 at 2:33 AM, Benoit Jacob <jacob.benoit.1@xxxxxxxxx> wrote:
>> Eeek, a lot of people will be expecting that Transform3f * Vector3f
>> gives a Vector3f, I didn't think about this.
>> This is a really big argument in favor of the old default Affine for
>> Transform. What do you think about reverting to Affine?
> Absolutely nothing. :)
> When outvoted, I am ready to switch back but let's just look at the
> list of pros/cons.
> pros for switching back:
> - Some users are happy because their old code keeps working
Well, it's not just about old code: new users will keep coming,
expecting that Transform3f*Vector3f gives a Vector3f.
> cons against switching back:
> - It is unintuitive that the most generic Transformation is affine
Let's focus on this point because it looks crucial to me. The most
generic transformation is definitely projective, there's no question
about that, the questions discussed here are:
a) what should the default value for Mode be?
b) what should the Transform3f (etc) typedefs stand for?
Obviously, a typedef named "Transform3f" has to use the default mode,
but at the same time that name "Transform3f" does suggest something
generic, whence the confusion in this discussion between "default" and
What do you think about this plan:
- we just remove the Transform3f... typedefs. We just force the user
to use the mode-specific typedefs such as Affine3f, Projective3f, etc.
- we don't give Mode any default value.
- in the tutorials, we focus (at least at the start) on Affine
transforms, Affine3f etc, so that the intuitive idea that 3D-transform
* 3D-vector gives a 3D-vector. Of course we then do explain other
kinds of transform.
> - Some users are unhappy because expectedly correct code like this
> produces wrong results (one of my strongest arguments)
> Transform3f T( some_projective_4x4_matrix );
> Vector3f v;
> "Hmm, and I was sure I read that Transform3f's model non-linear
> - In 90% of the cases, we can be hope (I admit this is not a strong
> argument) that the users will get a compile time error for the example
> in question because the fixed size dims are not fitting (v' = T*v when
> T is projective)
> - Last chance to get things right since Eigen 3 will anyways break
> lots of Eigen 2 code or we are stuck with this forever
> - It is the right thing to do .... ;)
> Ok, I am passing the choice back to you and other people on the list.
> As I said, outvote me and I will revert this change.
> - Hauke