|Re: [eigen] Avoid SVD in rotation() for Isometry|
[ Thread Index |
| More lists.tuxfamily.org/eigen Archives
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] Avoid SVD in rotation() for Isometry
- From: Greg Coombe <greg.coombe@xxxxxxxxx>
- Date: Wed, 16 Jan 2019 13:26:30 -0800
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=6KZJhU1JAfgj6HHEy97jmBlVsT9TBVMi5mr1x4oxuZk=; b=o1pQCivKf5LW38TLBsjtIqJMdUd6RwDb/67xMHcoEf0qtunA2xiNyW6MtWzcqYFbka ZsvS5NonxmudE2EIiVpgteZcQsTij85SKjqXsLekLumjEgjJCdg7cH2TFfTQk3o0BvDv huvIcxWNUHYRFDQz88gfzSzvtZ2Uo2zixE1DrJZS6STpCO0wwbmk0qTFCwvVDnwqUCci gAJ5ezKaZpkqeheiyoqSQePnvUUP+tBw+kwajM70WnTQTQ4lkH1By5XJy8cBsMXCZGUQ JIVE5mMLDPAXFa2r1jEzp4ASmkZ0e7rvpXXdiYGCxfYocbskdLaqHrdH+QKujUekKhTt kMVg==
lol, yeah, just a little bit more painful than my attempt!
makes sense to me, but I'd even go a step further by making rotation() an alias to linear() in the Isometry case. A bit more tricky to implement though.
You mean like some sort of partial template specialization/alias? Not sure I know how to accomplish that. Can you sketch out how this would work?
With c++17 it's as simple as returning "auto" and using a "if constexpr" , in c++98 it's more painful: