• p320305
    了解作者
  • Python
    开发工具
  • 8.3MB
    文件大小
  • zip
    文件格式
  • 0
    收藏次数
  • 1 积分
    下载积分
  • 1
    下载次数
  • 2018-08-08 15:33
    上传日期
Valve的OpenVR虚拟现实SDK的Python绑定
pyopenvr-master.zip
内容介绍
# pyopenvr ### Python bindings for Valve's OpenVR virtual reality SDK ## Installation - [ ] Install Python 2.7+ or 3.5+ https://www.python.org/download/ - [ ] Install HTC Vive SteamVR - [ ] ``pip install openvr`` OR download the installer at https://github.com/cmbruns/pyopenvr/releases ## Use ```python import sys import time import openvr openvr.init(openvr.VRApplication_Scene) poses_t = openvr.TrackedDevicePose_t * openvr.k_unMaxTrackedDeviceCount poses = poses_t() for i in range(100): openvr.VRCompositor().waitGetPoses(poses, len(poses), None, 0) hmd_pose = poses[openvr.k_unTrackedDeviceIndex_Hmd] print(hmd_pose.mDeviceToAbsoluteTracking) sys.stdout.flush() time.sleep(0.2) openvr.shutdown() ```
评论
    相关推荐