Re: [eigen] Re: proposal: call the Geometry module experimental |

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]

*To*: eigen@xxxxxxxxxxxxxxxxxxx*Subject*: Re: [eigen] Re: proposal: call the Geometry module experimental*From*: Gael Guennebaud <gael.guennebaud@xxxxxxxxx>*Date*: Fri, 23 Jan 2009 14:16:21 +0100*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 :content-transfer-encoding; bh=mEg9XHscSQfgqmCOHlp1v7sO9+xvkr3VPTf6qg0yl7I=; b=BIu0tgUU0dkt+AFJ6C6GaBT52zXqskfHNXfgSyCE3SFQS1Dlsl0h2v6yLzvkH1v/Q9 ZSOHfIIvrws2MfgiINV2HFXP14y0eQha+3vY1XQkrQ48Q33OjV2Umc7N7u9pL13Kegm3 9Trq+QFb7LHxJby2QMCJCpRCzYcycGrm8c/IA=*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:content-transfer-encoding; b=rQVHbaWhSDNMiU/z/1IorXsQc/0jo7rr2r19KlogmA2xtIyq6LIDte2/y0BDS/+9ax 6xMmyyYu1prKZUWzmlWiJNta1KQjsvKiQk5fDV0NNUPhdeyPwhyCTwVfBognwL2Ha3Se 2eS+ZLBBWjbLnhPgK73D82JW1/Sau5KCTCA14=

yes I agree the current Scaling is somewhat limited. What about the following proposal: 1 - rename Translation TranslationProxy and slit Scaling in UniformScaling, AxisAlignedScaling and GenericScaling. 2 - Add the global functions Translation and Scaling which would auto-magically instanciate the correct proxy type. Then you can directly use Translation and Scaling without bothering about the scalar type and dimensions (unless you want to declare a proxy object or reuse). Here is an example: Scaling(2) would return: class UniformScaling<int> { template<typename OtherScalar, int Dim> Transform<OtherScalar,Dim> operator * (const Transform<OtherScalar,Dim>& t) { Transform<OtherScalar,Dim> res(t); res.linear() *= m_factor; return res; } // plus all other supported products Scalar m_factor; }; or something like that. It's just an idea. Gael. On Fri, Jan 23, 2009 at 1:37 PM, Benoit Jacob <jacob.benoit.1@xxxxxxxxx> wrote: > 2009/1/22 Gael Guennebaud <gael.guennebaud@xxxxxxxxx>: >> the current situation have at least 4 advantages: >> - it is consistent with AngleAxis, Rotation2D, Quaternion, etc. >> - it allows nicer ctor: Translation(1,2,3) versus Vector3f(1, 2, >> 3).asTranslation() >> - it allows ctor from scalar: Scaling3f(2); >> - it allows for storage if someone want (think about the current >> issues with DiagonalMatrix) >> >> (ok ok the 2nd and 3th could count for 1) >> >> and they are already very simple classes. The proxy you propose would >> not be simpler, just replace the storage Matrix by a reference and add >> the respective MatrixBase functions and you're done. >> >> This is my current opinion, but as you know I changed my mind several >> times by the past, so if you have good arguments who knows ! > > OK, good points. In Eigen I tend to have this idea that we should > avoid introducing new types when possible, but here indeed it makes > sense. > > I think my only remaining real concern is about the naming. > > For rotations we have EulerAngles, AngleAxis, Quaternion, but not Rotation. > Likewise for scaling we should have a specific, explicit name for this > kind of scaling, not Scaling. > > How about: > - ScalingFactors > - StandardScaling > - StdScaling > - ScalingAlongAxes > > Notice that a general scaling is just a selfadjoint matrix, it's the > same thing! So a general scaling is a very very general notion. > > Cheers, > Benoit > > >

**Follow-Ups**:**Re: [eigen] Re: proposal: call the Geometry module experimental***From:*Benoit Jacob

**References**:**[eigen] proposal: call the Geometry module experimental***From:*Benoit Jacob

**[eigen] Re: proposal: call the Geometry module experimental***From:*Benoit Jacob

**Re: [eigen] Re: proposal: call the Geometry module experimental***From:*Gael Guennebaud

**Re: [eigen] Re: proposal: call the Geometry module experimental***From:*Benoit Jacob

**Messages sorted by:**[ date | thread ]- Prev by Date:
**Re: [eigen] Re: proposal: call the Geometry module experimental** - Next by Date:
**Re: [eigen] Feeback to Rev #914777. (pre RC1)** - Previous by thread:
**Re: [eigen] Re: proposal: call the Geometry module experimental** - Next by thread:
**Re: [eigen] Re: proposal: call the Geometry module experimental**

Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |