Got Penguin sample running under Windows.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1362 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
1999-01-10 12:04:02 +00:00
parent b669a48e12
commit 45b5751fb4
11 changed files with 148 additions and 23 deletions

View File

@@ -183,15 +183,16 @@ void TestGLCanvas::LoadLWO(const wxString &filename)
void TestGLCanvas::OnMouse( wxMouseEvent& event )
{
wxSize sz(GetClientSize());
if (event.Dragging())
{
/* drag in progress, simulate trackball */
float spin_quat[4];
trackball(spin_quat,
(2.0*info.beginx - m_width) / m_width,
( m_height - 2.0*info.beginy) / m_height,
( 2.0*event.GetX() - m_width) / m_width,
( m_height - 2.0*event.GetY()) / m_height);
(2.0*info.beginx - sz.x) / sz.x,
( sz.y - 2.0*info.beginy) / sz.y,
( 2.0*event.GetX() - sz.x) / sz.x,
( sz.y - 2.0*event.GetY()) / sz.y);
add_quats( spin_quat, info.quat, info.quat );