[eigen] Cumbersome syntax questions/feedback |

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

*To*: eigen@xxxxxxxxxxxxxxxxxxx*Subject*: [eigen] Cumbersome syntax questions/feedback*From*: Staffan Gimåker <staffan@xxxxxxxxxx>*Date*: Sun, 16 Aug 2009 14:11:34 +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:content-type:date:message-id:mime-version:x-mailer; bh=5gASw0IUJzjL0gIb7BOBH1RifGyPontDkpO5/L3Oh0I=; b=Q+3ShTk3uKYTW6la+ZBV3YX+SVvUWiTPx5jvLSG5SN+3j8rnBpXl0fDqwsS17nW/jT x4o6yxhOCBbiiHLFE9yqv0bw0wMaLVhvgmDRJCAkqW5OGrHB6Pswc3Zd2D4MF5ma+30M E3NPZLOZkC8fm32WnByGTOaX7RB8jL680Pjnc=*Domainkey-signature*: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:subject:from:reply-to:to:content-type:date:message-id :mime-version:x-mailer; b=MYErYZ8TDsficXciuI4nmbiuw1pflRYY6yHBTGDMZ9rjR3ZHRPOhMRDk+vxb6xmOYQ fex0weJkmamc/AyxKk6mroKmrFrpMaMT/SNVPqgta+YTRQx+l8y12I8GnZon3LQkL4Fu MgIhSx9eXUyrtXDBWWDImQUaurt7mhWcIYtU4=

Hi guys, After converting to Eigen in a couple of work projects (mobile robotics stuff), and being very happy with the results (great job! :), I've started to convert an open source project of mine to Eigen as well (http://www.peekabot.org). However I ran into some minor troubles with cumbersome syntax -- some questions/feedback below. First, I dabbled with replacing our own rudimentary Matrix4f class used for affine coordinate system transformations with Eigen::Transform3f. Works wonderfully, but expressions involving inverse() becomes a bit cumbersome (I'm using 2.0.4): Eigen::Transform3f A, B, C; ... C = A.inverse() * // doesn't compile, inverse() returns a matrix type Eigen::Translation3f(...) * Eigen::AngleAxisf(...) * Eigen::Translation3f(...) * B; C = Eigen::Transform3f(A.inverse()) * // works, but a bit cumbersome Eigen::Translation3f(...) * ... What's the reason that Transform3f::inverse() returns a matrix type rather than a transform type? Looking for a less cumbersome syntax I tried to use Eigen::Matrix4f instead, but ran into a similar issue: Eigen::Matrix4f A; ... A = A * Eigen::Translation3f(...).matrix(); // error, no such method A = A * Eigen::Transform3f(Eigen::Translation3f(...)).matrix(); // works, but a bit cumbersome to use Any special reason that Translation3f and friends doesn't have a matrix() method? Or am I doing something plain wrong here? It's nothing I can't cope with, but in an ideal world the syntax would be a bit less cumbersome :) I guess the above "workarounds" might involve some unnecessary temporaries as well. A reason to justify the current syntax would be greatly appreciated (maybe that could be put in the documentation as well). /Staffan

**Attachment:
signature.asc**

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

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

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