MeshKit
1.0
|
00001 #include "meshkit/Transform.hpp" 00002 00003 #include <cassert> 00004 #include <cmath> 00005 00006 namespace MeshKit { 00007 00008 Vector<3> rodrigues(const Vector<3> &pt, const Vector<3> &z, double dtheta) { 00009 Vector<3> x = vector_product(z, pt); 00010 00011 double a = cos(dtheta); 00012 double b = sin(dtheta); 00013 double c = (pt % z)*(1-a); 00014 00015 return a*pt + b*x + c*z; 00016 } 00017 00018 } // namespace MeshKit