spnav-csharp-wrapper/SpaceNavEvent.cs

38 lines
788 B
C#
Raw Normal View History

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