Nasyrov Posted August 16, 2008 Share Posted August 16, 2008 Hi. I want to rotate object inside FOR_ALL_GPOINTS in VRAY from one vector to another: UT_Vector3 baseDir(1, 0, 0); UT_Vector3 zDir(0, 0, 1); UT_Matrix3 NRot; UT_Matrix4 xform; FOR_ALL_GPOINTS(gdpa, pointPtr) { ......................................... xform.identity(); NRot.dihedral(baseDir, zDir); xform = NRot; openGeometryObject(); setTransform(xform, 0); ....................................... } But all geos are disappear. Thanks. Quote Link to comment Share on other sites More sharing options...
sibarrick Posted August 17, 2008 Share Posted August 17, 2008 Is it because you are only setting the rotation and removing the transformation? Maybe you need to add back the original transformation data. Quote Link to comment Share on other sites More sharing options...
Nasyrov Posted August 18, 2008 Author Share Posted August 18, 2008 (edited) Hi, Sibarrick! I thinik, no. I want to rotate geometry in the origin. Any other transformation matrixs as translation or scale will be mult after that. Simply rotation. Can you post some samples of right transformation? Ok. The problem is in center of rotation... Geometry are running away with rotation of 0.5 and stay still with 0... Edited August 18, 2008 by Nasyrov Quote Link to comment Share on other sites More sharing options...
Nasyrov Posted August 18, 2008 Author Share Posted August 18, 2008 (edited) One kind of dihedral is dihedral with 3 vectors as args. It works but with strange result Edited August 18, 2008 by Nasyrov Quote Link to comment Share on other sites More sharing options...
atap3d Posted February 16, 2009 Share Posted February 16, 2009 Maybe your problem in setTransform(xform, 0)... In my tests transformation occurs in screen space. Does somebody know how to make the transformation in world space? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.