Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
29 lines (22 sloc) 629 Bytes
import ffi, api
ovr = api.open("LibOVRRT32_0_8")
print(ovr)
result = ovr.Initialize(null)
if result < ovr.Success
assert false, "ovr initialize failed"
session = ffi.automem(ovr.Session)
luid = ffi.automem(ovr.GraphicsLuid)
result = ovr.Create(session, luid)
print(result)
if result < ovr.Success
assert false, "ovr failure"
print("trying to track")
x = 0
while x < 100
state = ovr.GetTrackingState(session.to, 0.0, 0)
pose = state.HeadPose.ThePose
print(pose.Orientation.x, pose.Orientation.y, pose.Orientation.z, pose.Orientation.w)
sleep(0.1)
x = x + 1
ovr.Destroy(session.to)
ovr.Shutdown()