Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

OpenVR SDK

License

NotificationsYou must be signed in to change notification settings

kotlin-graphics/openvr

Repository files navigation

Build StatuslicenseReleaseSizeGithub All Releases

OpenVR SDK

This is a kotlin wrapper ofOpenVR, which is an API and runtime that allows access to VR hardware from multiplevendors without requiring that applications have specific knowledge of thehardware they are targeting. This repository is an SDK that contains the APIand samples. The runtime is under SteamVR in Tools on Steam.

Documentation

Documentation for the API is available on theGithub Wiki

More information on OpenVR and SteamVR can be found onhttp://steamvr.com

Binding Features:

  • original comments preserved and properly formatted
  • direct fields, e.g:var TrackedDevicePose.poseIsValid: Boolean
  • enumerators for type safety, e.g:var Texture.type: TextureType
  • every struct method is offered also much more user friendly offering also full interoperability with glm,getProjectionMatrix returns, for example, directly a glmMat4
vrSystem.getProjectionMatrix(eye:VREye, nearZ:Float, farZ:Float, res:Mat4=Mat4()):Mat4

that expects anEVREye enumerator type foreEye and returns directly aglmMat4.instead of:

VRSystem.VRSystem_GetProjectionMatrix(eEye: Int, fNearZ: Float, fNear: Float, __result: HmdMatrix44): HmdMatrix44

Or for example:

GetStringTrackedDeviceProperty.invoke(..):Int

where you are supposed to call it one first time to get the right size for the buffer to accommodate the char array for the string and then a second time to actually retrieve the string.You have the possibility to call directly

getStringTrackedDeviceProperty(..):String

that returns directly the resulting string, bringing down a lot of boilerplate code

  • array classes[] operator, includedRenderModel_Vertex
  • concise enumerators, e.g.EVRComponentProperty.VRComponentProperty_IsStatic isVRComponentProperty.IsStatic-SteamVRListener for event listener. Instantiate a class extending it, call.poll() on it at the begin of each frame and override the corresponding methods you are looking for, such asbuttonPress(left: Boolean, button: EVRButtonId) TO CHECK

Sample:

You can find the OpenGL samplehere

Contributions:

Don't hesitate to contribute to the project by submittingissues orpull requests for bugs and features. Any feedback is welcome atelect86@gmail.com.


[8]ページ先頭

©2009-2025 Movatter.jp