Commit 7c482f68 authored by CHARRAS's avatar CHARRAS

Added Jonas Diemer's patch (3D display: enhanced movings from mouse and tools)

parent 56ef4d3b
......@@ -282,6 +282,8 @@ void Pcb3D_GLCanvas::OnMouseEvent( wxMouseEvent& event )
}
if( event.Dragging() )
{
if( event.LeftIsDown() )
{
/* drag in progress, simulate trackball */
trackball( spin_quat,
......@@ -291,6 +293,15 @@ void Pcb3D_GLCanvas::OnMouseEvent( wxMouseEvent& event )
( size.y - 2.0 * event.GetY() ) / size.y );
add_quats( spin_quat, g_Parm_3D_Visu.m_Quat, g_Parm_3D_Visu.m_Quat );
}
else if( event.MiddleIsDown() )
{
/* middle button drag -> pan */
/* Current zoom and an additional factor are taken into account for the amount of panning. */
const float PAN_FACTOR = 8.0 * g_Parm_3D_Visu.m_Zoom;
g_Draw3d_dx -= PAN_FACTOR * ( g_Parm_3D_Visu.m_Beginx - event.GetX() ) / size.x;
g_Draw3d_dy -= PAN_FACTOR * (event.GetY() - g_Parm_3D_Visu.m_Beginy) / size.y;
}
/* orientation has changed, redraw mesh */
DisplayStatus();
......
This diff is collapsed.
......@@ -5,6 +5,12 @@ Started 2007-June-11
Please add newer entries at the top, list the date and your name with
email address.
2008-mars-03 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
================================================================================
3d display:
Added Jonas Diemer's patch (enhanced movings from mouse and tools)
2008-Mar-1 UPDATE Dick Hollenbeck <dick@softplc.com>
================================================================================
+pcbnew
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment