Added Jonas Diemer's patch (3D display: enhanced movings from mouse and tools)
This commit is contained in:
parent
56ef4d3b44
commit
7c482f68b3
|
@ -283,14 +283,25 @@ void Pcb3D_GLCanvas::OnMouseEvent( wxMouseEvent& event )
|
|||
|
||||
if( event.Dragging() )
|
||||
{
|
||||
/* drag in progress, simulate trackball */
|
||||
trackball( spin_quat,
|
||||
(2.0 * g_Parm_3D_Visu.m_Beginx - size.x) / size.x,
|
||||
(size.y - 2.0 * g_Parm_3D_Visu.m_Beginy) / size.y,
|
||||
( 2.0 * event.GetX() - size.x) / size.x,
|
||||
( size.y - 2.0 * event.GetY() ) / size.y );
|
||||
if( event.LeftIsDown() )
|
||||
{
|
||||
/* drag in progress, simulate trackball */
|
||||
trackball( spin_quat,
|
||||
(2.0 * g_Parm_3D_Visu.m_Beginx - size.x) / size.x,
|
||||
(size.y - 2.0 * g_Parm_3D_Visu.m_Beginy) / size.y,
|
||||
( 2.0 * event.GetX() - size.x) / size.x,
|
||||
( size.y - 2.0 * event.GetY() ) / size.y );
|
||||
|
||||
add_quats( spin_quat, g_Parm_3D_Visu.m_Quat, g_Parm_3D_Visu.m_Quat );
|
||||
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();
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue