[eigen] Patch for quaternion normalization and cross product for Vector4f |

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

*To*: eigen@xxxxxxxxxxxxxxxxxxx*Subject*: [eigen] Patch for quaternion normalization and cross product for Vector4f*From*: Rohit Garg <rpg.314@xxxxxxxxx>*Date*: Tue, 10 Mar 2009 10:48:17 +0530*Dkim-signature*: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=l2YX6Z/h8nOb0exrmY20G09Lvo0IXvNGCQ/ec4qeNU4=; b=OjJ3GjMzbDX/6DCBB2wZHEIjPMo1Mcz5b2+y4b2nJzzCJF+overWC+sSaABd6xKjpr w2PpM63Lg2fgpJKXurtcNZP0CL8hdgLeIw+Cnkz0rFa2bbfoqU+s4GdzOzL3qVRmLiOK GK9ISUQHBUJ6eCm2fgR7ZdaQFDZMkDIzoCiA4=*Domainkey-signature*: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=paQ+2I4aFfEFgtbn4aMPluVra3RyvTj4ClmwAs2hPovt19tV+JwSOcCNTqQunq3dtn NP/dFxrmK7UhRYKeindZxjE9Jj41OLifHLDbCF44IhEb/KgzksVIa2gcWnjaz2LnF/Ob Z1JNS/457O9dPzVl2eahJw3EiXf0k0UFL7S2k=

Hi, Please find attached a ptch which implements quaternion normalization and cross products for Vector4f. Now obviously, it isn't defined for 4d vectors, but this one crosses it assuming it as a 3 component vector. The w component can be anything but will be set to zero after the product. As the patch mentions, It is mainly meant for those ppl who use vector4f instead of vector3f to use vectorization. I think this can be helpful to those as earlier cross product has to be done using vec3f. Quaternion normalization is obviously useful. and it is now vectorized. The patches are somewhat incomplete in the sense that I am not familiar with the C++ and the intrinsics bridge so much. I am just beginning to understand the guts of eigen and templates are even more confusing for me. You may have to write (small hopefully) pieces of glue code. On the intrinsics side, it should be complete, however. So, please indulge me for a while. I promise to send more complete patches in the future. Here's how it was generated. ~/eigen2@rpg-lab> svn update At revision 937616. ~/eigen2@rpg-lab> svn diff > rpg_patch ~/eigen2@rpg-lab> ls bench cmake CMakeLists.txt COPYING COPYING.LESSER CTestConfig.cmake demos disabled doc Doxyfile Eigen Mainpage.dox rpg_patch test unsupported ~/eigen2@rpg-lab> I hope that is the correct way to generate patches. If it isn't please tell me what is. Regards, -- Rohit Garg http://rpg-314.blogspot.com/ Senior Undergraduate Department of Physics Indian Institute of Technology Bombay

**Attachment:
rpg_patch**

**Follow-Ups**:**Re: [eigen] Patch for quaternion normalization and cross product for Vector4f***From:*Gael Guennebaud

**Messages sorted by:**[ date | thread ]- Prev by Date:
**[eigen] Problem to compile trunk with MSVC** - Next by Date:
**Re: [eigen] Patch for quaternion normalization and cross product for Vector4f** - Previous by thread:
**Re: [eigen] Problem to compile trunk with MSVC** - Next by thread:
**Re: [eigen] Patch for quaternion normalization and cross product for Vector4f**

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