Re: [eigen] Cumbersome syntax questions/feedback |

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

*To*: eigen@xxxxxxxxxxxxxxxxxxx*Subject*: Re: [eigen] Cumbersome syntax questions/feedback*From*: Staffan Gimåker <staffan@xxxxxxxxxx>*Date*: Sun, 16 Aug 2009 15:26:51 +0200*Dkim-signature*: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:subject:from:reply-to :to:in-reply-to:references:content-type:date:message-id:mime-version :x-mailer; bh=mncFhpv9tIbYPtVEvlbS6mdfex018NUM63GQcIovEZg=; b=CPn9TQ7b+X1bQNGwlyw1FA00eUVtYAm/IfUFx6JfFID3NhOwMS6MAKUNeHY03+lM9n lYBGrcKuhkla8H/6hIplscm102Ce2BjUyXHnnujuvF7hZkj6/9MPpoD4Q0SjY61L6uIL ru3A6m/nQ/yGwHsYIrDp0K9xJmPOzj7UeQrZk=*Domainkey-signature*: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:subject:from:reply-to:to:in-reply-to:references:content-type :date:message-id:mime-version:x-mailer; b=ZhFO34nrTnb3f0R+T6Fk32OeQptn40ofmD5DINJMAhj1bo9smuX+bewECMpu1WormB jSneK5FIK5I50E/diNPUPuToIgohBjeWGhHme+mhiRi8yUB3e2mCvHO3exQc369E7R+Q 0SpJNJ2jgL5FWFuSWNbtmkWGy9P6pg9b7LS08=

Hi Gael, On Sun, 2009-08-16 at 14:35 +0200, Gael Guennebaud wrote: > > What's the reason that Transform3f::inverse() returns a matrix type > > rather than a transform type? > > yes, that's weird that Transform::inverse() returns a Matrix and not a > Transform. This also surprised myself recently while it is probably me > who right it. Unless someone can refresh why it should return a > Matrix, I'm willing to change that (in both branches) Good news. I guess you might want to leave it as it is in the 2.0.x branch though, as returning a Transform type breaks existing code. > > Any special reason that Translation3f and friends doesn't have a > > matrix() method? Or am I doing something plain wrong here? > > hm, here you should really use the Transform class. We cannot have a > .matrix() class because we don't know what the user want. E.g, for > Translation shall we return a Dim+1 x Dim+1 matrix, or a compact Dim x > Dim+1 matrix ? For Scaling we could also return a Dim x Dim matrix. > Furthermore, Transform internally stores a Matrix, so the matrix() > function is free, while converting a Translation to a Matrix is not > free and costly to use. For instance, Transform3f * Translation3f is > compiled as a Matrix33 * Vector3 product that is something the > compiler cannot do by itself. Makes sense, thanks for the explanation. /Staffan

**Attachment:
signature.asc**

**References**:**[eigen] Cumbersome syntax questions/feedback***From:*Staffan Gimåker

**Re: [eigen] Cumbersome syntax questions/feedback***From:*Gael Guennebaud

**Messages sorted by:**[ date | thread ]- Prev by Date:
**Re: [eigen] Cumbersome syntax questions/feedback** - Next by Date:
**Re: [eigen] Cumbersome syntax questions/feedback** - Previous by thread:
**Re: [eigen] Cumbersome syntax questions/feedback** - Next by thread:
**Re: [eigen] Cumbersome syntax questions/feedback**

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