Best way to translate mouse drag motion into 3d rotation of an object

前端 未结 4 2072
孤街浪徒
孤街浪徒 2020-12-28 08:41

I have a 3d object that I wish to be able to rotate around in 3d. The easiest way is to directly translate X and Y mouse motion to rotation about the Y and X axes, but if t

4条回答
  •  盖世英雄少女心
    2020-12-28 09:07

    In my Computer Graphics course, we were given the following code which allowed us not to reinvent the wheel.

    trackball.h

    trackball.c

提交回复
热议问题