04.01.2015, 20:20
Quote:
Another thing dude you should add some functions to get the objectids then you could easily add rotation to your include.
|
rotation processing is the most difficult part in my plugin/tool.
Код:
double up[3] = {sin(ra[1])*cos(ra[2]) + sin(ra[0])*sin(ra[2])*cos(ra[1]), sin(ra[2])*sin(ra[1]) - sin(ra[0])*cos(ra[1])*cos(ra[2]), -cos(ra[0])*cos(ra[1])}; double right[3] = {-sin(ra[2])*cos(ra[0]), cos(ra[0])*cos(ra[2]), -sin(ra[0])}; double forward[3] = {cos(ra[1])*cos(ra[2]) - sin(ra[0])*sin(ra[2])*sin(ra[1]), sin(ra[2])*cos(ra[1]) + sin(ra[0])*sin(ra[1])*cos(ra[2]), cos(ra[0])*sin(ra[1])};
SA math engine uses non-standart Z-X-Y rotation (ffs, wasted few hours until understood that), so my python tool process rotations in a wrong way. I've fixed that in plugin. But you can see what happens with bad alignment, just set angles like 15 - 45 - 75 using that tool