2018-05-30 21:12:00 +00:00
|
|
|
|
using System;
|
2018-05-30 17:15:37 +00:00
|
|
|
|
|
2018-05-30 21:12:00 +00:00
|
|
|
|
namespace SpaceNavWrapper
|
|
|
|
|
{
|
|
|
|
|
public class MotionEventArgs : EventArgs
|
2018-05-30 17:15:37 +00:00
|
|
|
|
{
|
2018-05-30 21:12:00 +00:00
|
|
|
|
public readonly int X, Y, Z;
|
|
|
|
|
public readonly int Rx, Ry, Rz;
|
|
|
|
|
|
|
|
|
|
public MotionEventArgs(int x, int y, int z, int rx, int ry, int rz)
|
|
|
|
|
{
|
|
|
|
|
X = x;
|
|
|
|
|
Y = y;
|
|
|
|
|
Z = z;
|
|
|
|
|
Rx = rx;
|
|
|
|
|
Ry = ry;
|
|
|
|
|
Rz = rz;
|
|
|
|
|
}
|
|
|
|
|
|
2018-05-30 17:15:37 +00:00
|
|
|
|
public override string ToString()
|
|
|
|
|
{
|
2018-05-30 21:12:00 +00:00
|
|
|
|
return "x=" + X + " y=" + Y + " z=" + Z +
|
|
|
|
|
" rx=" + Rz + " ry=" + Ry + " rz=" + Rz;
|
2018-05-30 17:15:37 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2018-05-30 21:12:00 +00:00
|
|
|
|
public class ButtonEventArgs : EventArgs
|
2018-05-30 17:15:37 +00:00
|
|
|
|
{
|
2018-05-30 21:12:00 +00:00
|
|
|
|
public readonly int button;
|
|
|
|
|
public readonly bool pressed;
|
|
|
|
|
|
2018-05-30 17:15:37 +00:00
|
|
|
|
public override string ToString()
|
2018-05-30 21:12:00 +00:00
|
|
|
|
{
|
|
|
|
|
return string.Format("[ButtonEventArgs: button={0}, pressed={1}]", button, pressed);
|
|
|
|
|
}
|
2018-05-30 17:15:37 +00:00
|
|
|
|
}
|
|
|
|
|
}
|