AceVR Library

AceVR Library is a Windows C++ library I created that contains a series of convenience functions Specifically for Virtual Reality projects since it uses OpenVR. Below is a list of the functions currently included with the library.

Requirements

  1. C++ 11
  2. Windows
  3. OpenVR

I implemented all functions to use memory alignment. This is for two reasons, one is because with the advent of C++ 11, it is now much easier to have a more universal way to align memory. The second reason is by the definition of memory alignment; it is always more efficient to have aligned memory then unaligned. This is because modern processors silently handle unaligned memory but it causes a slight performance hit because it has to do two reads instead of one read, and when there are many instructions that can add up fast. Since Ace Library and AceVR Library now uses memory alignment, you must use _aligned_free() to delete/free any output buffers or objects from Ace Library and AceVR Library. Otherwise you will get a “triggered break point error” or a run-time error.

♠Download AceVR Library 1.2♠

XMMATRIX ConvertSteamVRMatrixToXMMATRIX(const HmdMatrix34_t& matPose)
bool GetContainsProximitySensor(IVRSystem* hmd, uint32_t deviceIndex)
bool GetControllerIsButtonPressed(IVRSystem* hmd, EVRButtonId button)
bool GetControllerIsButtonTouched(IVRSystem* hmd, EVRButtonId button)
XMMATRIX GetCurrentViewProjectionMatrix(IVRSystem* hmd, const XMMATRIX& projectionMat, const XMMATRIX& eyePose, const XMMATRIX& hmdPose)
float GetDeviceBatteryPercentage(IVRSystem* hmd, uint32_t deviceIndex)
uint64_t GetDeviceClass(IVRSystem* hmd, uint32_t deviceIndex)
bool GetDeviceIsCharging(IVRSystem* hmd, uint32_t deviceIndex)
bool GetDeviceIsWireless(IVRSystem* hmd, uint32_t deviceIndex)
bool GetDeviceProvidesBatteryStatus(IVRSystem* hmd, uint32_t deviceIndex)
char* GetFirmwareProgrammingTarget(IVRSystem* hmd, uint32_t deviceIndex)
uint64_t GetFirmwareVersion(IVRSystem* hmd, uint32_t deviceIndex)
uint64_t GetFPGAVersion(IVRSystem* hmd, uint32_t deviceIndex)
bool GetHasCamera(IVRSystem* hmd, uint32_t deviceIndex)
uint64_t GetHMDAudioFirmwareVersion(IVRSystem* hmd, uint32_t deviceIndex)
uint64_t GetHMDCameraCompatibilityMode(IVRSystem* hmd, uint32_t deviceIndex)
uint64_t GetHMDCurrentUniverseId(IVRSystem* hmd, uint32_t deviceIndex)
uint64_t GetHMDDisplayBootloaderVersion(IVRSystem* hmd, uint32_t deviceIndex)
uint64_t GetHMDDisplayFirmwareVersion(IVRSystem* hmd, uint32_t deviceIndex)
float GetHMDDisplayFrequency(IVRSystem* hmd, uint32_t deviceIndex)
uint64_t GetHMDDisplayHardwareVersion(IVRSystem* hmd, uint32_t deviceIndex)
XMMATRIX GetHMDEyePoseMatrix(IVRSystem* hmd, Hmd_Eye nEye);
XMMATRIX GetHMDEyeProjectionMatrix(IVRSystem* hmd, Hmd_Eye nEye, float nearClipPlane, float farClipPlane);
uint64_t GetHMDPreviousUniverseId(IVRSystem* hmd, uint32_t deviceIndex)
float GetHMDSecondsFromVsyncToPhotons(IVRSystem* hmd, uint32_t deviceIndex)
float GetHMDUserIpdMeters(IVRSystem* hmd, uint32_t deviceIndex)
bool GetIsFirmwareManualUpdate(IVRSystem* hmd, uint32_t deviceIndex)
bool GetIsFirmwareUpdateAvailable(IVRSystem* hmd, uint32_t deviceIndex)
char* GetManufacturerName(IVRSystem* hmd, uint32_t deviceIndex)
char* GetModelNumber(IVRSystem* hmd, uint32_t deviceIndex)
char* GetRenderModelName(IVRSystem* hmd, uint32_t deviceIndex)
char* GetSerialNumber(IVRSystem* hmd, uint32_t deviceIndex)
char* GetTrackingSystemName(IVRSystem* hmd, uint32_t deviceIndex)
char* SteamVRMatrix34ToString(const HmdMatrix34_t& mat)
char* SteamVRMatrix44ToString(const HmdMatrix44_t& mat)
char* XMMatrixToString(const XMMATRIX& mat)

♠Download AceVR Library 1.2♠

Comments are closed.