查看单个帖子
旧 2009-05-04, 08:02 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】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.
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)