-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDirection.cs
44 lines (40 loc) · 944 Bytes
/
Direction.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
using System;
using OSVR.ClientKit;
namespace OSVRFreePIE
{
public class Direction
{
private DirectionInterface directionInterface;
private Vec3 value;
public Direction(ClientContext context, String path)
{
directionInterface = context.GetDirectionInterface(path);
directionInterface.StateChanged += DirectionInterface_StateChanged;
}
private void DirectionInterface_StateChanged(object sender, TimeValue timestamp, int sensor, Vec3 report)
{
value = report;
}
public double x
{
get
{
return value.x;
}
}
public double y
{
get
{
return value.y;
}
}
public double z
{
get
{
return value.z;
}
}
}
}