高级会员
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
|
【转帖】dolly and pan
dolly and pan
dolly and pan
hi!
i抦 trying to pan using the dolly function, so fare no luck.
code:
void cdxfdocview::dolly(int x, int y)
{
odgevector3d vec( -x, -y , 0.0);
vec.transformby((pview->screenmatrix() * pview->projectionmatrix()).inverse());
pview->dolly(vec);
}i抳e used it for zooming in a window and for the plus- and minus- zoom as well, no problems. i would like to have a function one could feed with mouse coordinates on the fly, when moving the mouse around.
using above i get a slow, and very insensitive movement on the screen. the ratio between the drawing and the screen coords is also wrong. i get a unproportionally shorter movment (distance) for the drawing compaired to my mouse movement.
maybe someone can point me a more productive direction.
thanks in advance.
|