AeroSujan
10-09-2011, 07:10 AM
Dear Friends
I am doing pan on my 3D model. its panning but also its rotating.
I am using perspective projection. and for panning I am doing like this in
mouse move
int dx = oldP.x - newP.x;
int dy = newP.y - oldP.y;
case PAN:
{
trans[0] -= dx;
trans[1] -= dy;
Invalidate();
}
break;
Just this much....
In OnLButtonDown I am capturing the mouse event and putting oldP = point
then newP is coming in mousemove...
Can u tell me what am I doing wrong why its rotating also....
Any help would be highly appreciated. Thanks Sujan
I am doing pan on my 3D model. its panning but also its rotating.
I am using perspective projection. and for panning I am doing like this in
mouse move
int dx = oldP.x - newP.x;
int dy = newP.y - oldP.y;
case PAN:
{
trans[0] -= dx;
trans[1] -= dy;
Invalidate();
}
break;
Just this much....
In OnLButtonDown I am capturing the mouse event and putting oldP = point
then newP is coming in mousemove...
Can u tell me what am I doing wrong why its rotating also....
Any help would be highly appreciated. Thanks Sujan