Arcball Rotation at 90 degrees

血红的双手。 提交于 2019-12-22 00:37:31

问题


I have successfully implemented Arcball rotation through quaternions, but am confused at what to do when the direction vector of the camera is parallel to up vector. Currently I am just restricting the rotation along the x-axis (the pitch) when the dot product of the direction vector and the up vector exceeds 0.99. In Maya (or Max, XSI where arcball rotation is used) for example, you can rotate around in a full circle very smoothly. I am hoping for a solution similar to that of Maya's rotation.

Thankyou


回答1:


You need to adjust both the view normal vector (VNV) and the view up vector (VUV) and rotate both of them together so they always remain orthogonal to each other. It is sometimes useful to keep track of a "right" (or "left") vector as well which is just the cross product of the normal and up vectors.



来源:https://stackoverflow.com/questions/3593631/arcball-rotation-at-90-degrees

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!