From Mikkel Gjøl, addition of paramter set/get methods to osgGA::*Manipulators,
change of ' ' to GUIEventAdapter::KEY_Space, fix to url in Matrix_implementation.cpp. Syntax fixes by Robert Osfield to above submission fix inconsistencies with normal OSG coding style.
This commit is contained in:
@@ -74,7 +74,7 @@ void Matrix_implementation::set(const Quat& q_in)
|
||||
|
||||
// Source: Gamasutra, Rotating Objects Using Quaternions
|
||||
//
|
||||
//http://www.gamasutra.com/features/programming/19980703/quaternions_01.htm
|
||||
//http://www.gamasutra.com/features/19980703/quaternions_01.htm
|
||||
|
||||
double wx, wy, wz, xx, yy, yz, xy, xz, zz, x2, y2, z2;
|
||||
|
||||
|
||||
@@ -341,7 +341,7 @@ bool DriveManipulator::handle(const GUIEventAdapter& ea,GUIActionAdapter& us)
|
||||
|
||||
case(GUIEventAdapter::KEYDOWN):
|
||||
{
|
||||
if (ea.getKey()==' ')
|
||||
if (ea.getKey()==GUIEventAdapter::KEY_Space)
|
||||
{
|
||||
flushMouseEventStack();
|
||||
home(ea,us);
|
||||
|
||||
@@ -131,7 +131,8 @@ bool FlightManipulator::handle(const GUIEventAdapter& ea,GUIActionAdapter& us)
|
||||
}
|
||||
|
||||
case(GUIEventAdapter::KEYDOWN):
|
||||
if (ea.getKey()==' ')
|
||||
{
|
||||
if (ea.getKey()==GUIEventAdapter::KEY_Space)
|
||||
{
|
||||
flushMouseEventStack();
|
||||
home(ea,us);
|
||||
@@ -150,7 +151,7 @@ bool FlightManipulator::handle(const GUIEventAdapter& ea,GUIActionAdapter& us)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
}
|
||||
case(GUIEventAdapter::FRAME):
|
||||
addMouseEvent(ea);
|
||||
if (calcMovement()) us.requestRedraw();
|
||||
|
||||
@@ -158,7 +158,7 @@ bool TerrainManipulator::handle(const GUIEventAdapter& ea,GUIActionAdapter& us)
|
||||
}
|
||||
|
||||
case(GUIEventAdapter::KEYDOWN):
|
||||
if (ea.getKey()==' ')
|
||||
if (ea.getKey()== GUIEventAdapter::KEY_Space)
|
||||
{
|
||||
flushMouseEventStack();
|
||||
_thrown = false;
|
||||
|
||||
@@ -136,7 +136,7 @@ bool TrackballManipulator::handle(const GUIEventAdapter& ea,GUIActionAdapter& us
|
||||
}
|
||||
|
||||
case(GUIEventAdapter::KEYDOWN):
|
||||
if (ea.getKey()==' ')
|
||||
if (ea.getKey()== GUIEventAdapter::KEY_Space)
|
||||
{
|
||||
flushMouseEventStack();
|
||||
_thrown = false;
|
||||
|
||||
Reference in New Issue
Block a user