All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.oculusvr.capi.OvrLibrary Maven / Gradle / Ivy

There is a newer version: 1.8.0.0
Show newest version
package com.oculusvr.capi;

import java.nio.ByteBuffer;
import java.nio.FloatBuffer;

import com.sun.jna.Library;
import com.sun.jna.Native;
import com.sun.jna.NativeLibrary;
import com.sun.jna.Pointer;
import com.sun.jna.PointerType;

/**
 * JNA Wrapper for library com.oculusvr.capi
* This file was autogenerated by JNAerator,
* a tool written by Olivier Chafik that uses a few * opensource projects..
* For help, please visit NativeLibs4Java , Rococoa, or JNA. */ public interface OvrLibrary extends Library { public static final String JNA_LIBRARY_NAME = "OVR_C"; // public static final String JNA_LIBRARY_NAME = "/Users/bdavis/Git/OculusRiftExamples/build64/output/OVR_Cd.dll"; public static final NativeLibrary JNA_NATIVE_LIB = NativeLibrary.getInstance(OvrLibrary.JNA_LIBRARY_NAME); public static final OvrLibrary INSTANCE = (OvrLibrary) Native.loadLibrary(OvrLibrary.JNA_LIBRARY_NAME, OvrLibrary.class); /** enum values */ public static interface ovrHmdType { /** native declaration : line 154 */ public static final int ovrHmd_None = 0; /** native declaration : line 155 */ public static final int ovrHmd_DK1 = 3; /** native declaration : line 156 */ public static final int ovrHmd_DKHD = 4; /** native declaration : line 157 */ public static final int ovrHmd_DK2 = 6; /** * Some HMD other then the one in the enumeration.
* native declaration : line 158 */ public static final int ovrHmd_Other = 7; }; /** enum values */ public static interface ovrHmdCaps { /** * The HMD is plugged in and detected by the system.
* native declaration : line 165 */ public static final int ovrHmdCap_Present = 0x0001; /** * The HMD and its sensor is available for ownership use.
* native declaration : line 166 */ public static final int ovrHmdCap_Available = 0x0002; /** * Set to 'true' if we captured ownership of this HMD.
* native declaration : line 168 */ public static final int ovrHmdCap_Captured = 0x0004; /** * (read only) Means the display driver is in compatibility mode.
* native declaration : line 171 */ public static final int ovrHmdCap_ExtendDesktop = 0x0008; /** * Disables mirroring of HMD output to the window. This may improve
* native declaration : line 174 */ public static final int ovrHmdCap_NoMirrorToWindow = 0x2000; /** * Turns off HMD screen and output (only if 'ExtendDesktop' is off).
* native declaration : line 176 */ public static final int ovrHmdCap_DisplayOff = 0x0040; /** * HMD supports low persistence mode.
* native declaration : line 178 */ public static final int ovrHmdCap_LowPersistence = 0x0080; /** * Adjust prediction dynamically based on internally measured latency.
* native declaration : line 179 */ public static final int ovrHmdCap_DynamicPrediction = 0x0200; /** native declaration : line 181 */ public static final int ovrHmdCap_NoVSync = 0x1000; /** native declaration : line 184 */ public static final int ovrHmdCap_Writable_Mask = 0x33F0; /** native declaration : line 186 */ public static final int ovrHmdCap_Service_Mask = 0x23F0; }; /** enum values */ public static interface ovrTrackingCaps { /** * Supports orientation tracking (IMU).
* native declaration : line 194 */ public static final int ovrTrackingCap_Orientation = 0x0010; /** * Supports yaw drift correction via a magnetometer or other means.
* native declaration : line 195 */ public static final int ovrTrackingCap_MagYawCorrection = 0x0020; /** * Supports positional tracking.
* native declaration : line 196 */ public static final int ovrTrackingCap_Position = 0x0040; /** native declaration : line 200 */ public static final int ovrTrackingCap_Idle = 0x0100; }; /** enum values */ public static interface ovrDistortionCaps { /** * Supports chromatic aberration correction.
* native declaration : line 207 */ public static final int ovrDistortionCap_Chromatic = 0x01; /** * Supports timewarp.
* native declaration : line 208 */ public static final int ovrDistortionCap_TimeWarp = 0x02; /** * Supports vignetting around the edges of the view.
* native declaration : line 209 */ public static final int ovrDistortionCap_Vignette = 0x08; /** * Do not save and restore the graphics state when rendering distortion.
* native declaration : line 210 */ public static final int ovrDistortionCap_NoRestore = 0x10; /** * Flip the vertical texture coordinate of input images.
* native declaration : line 211 */ public static final int ovrDistortionCap_FlipInput = 0x20; /** * Assume input images are in sRGB gamma-corrected color space.
* native declaration : line 212 */ public static final int ovrDistortionCap_SRGB = 0x40; /** * Overdrive brightness transitions to reduce artifacts on DK2+ displays
* native declaration : line 213 */ public static final int ovrDistortionCap_Overdrive = 0x80; /** * Use when profiling with timewarp to remove false positives
* native declaration : line 215 */ public static final int ovrDistortionCap_ProfileNoTimewarpSpinWaits = 0x10000; }; /** enum values */ public static interface ovrEyeType { /** native declaration : line 224 */ public static final int ovrEye_Left = 0; /** native declaration : line 225 */ public static final int ovrEye_Right = 1; /** native declaration : line 226 */ public static final int ovrEye_Count = 2; }; /** enum values */ public static interface ovrStatusBits { /** * Orientation is currently tracked (connected and in use).
* native declaration : line 299 */ public static final int ovrStatus_OrientationTracked = 0x0001; /** * Position is currently tracked (false if out of range).
* native declaration : line 300 */ public static final int ovrStatus_PositionTracked = 0x0002; /** * Camera pose is currently tracked.
* native declaration : line 301 */ public static final int ovrStatus_CameraPoseTracked = 0x0004; /** * Position tracking hardware is connected.
* native declaration : line 302 */ public static final int ovrStatus_PositionConnected = 0x0020; /** * HMD Display is available and connected.
* native declaration : line 303 */ public static final int ovrStatus_HmdConnected = 0x0080; }; /** enum values */ public static interface ovrRenderAPIType { /** native declaration : line 402 */ public static final int ovrRenderAPI_None = 0; /** native declaration : line 403 */ public static final int ovrRenderAPI_OpenGL = 1; /** native declaration : line 404 */ public static final int ovrRenderAPI_Android_GLES = 2; /** native declaration : line 405 */ public static final int ovrRenderAPI_D3D9 = 3; /** native declaration : line 406 */ public static final int ovrRenderAPI_D3D10 = 4; /** native declaration : line 407 */ public static final int ovrRenderAPI_D3D11 = 5; /** native declaration : line 408 */ public static final int ovrRenderAPI_Count = 6; }; public static final float OVR_DEFAULT_NECK_TO_EYE_VERTICAL = 0.075f; public static final String OVR_KEY_PLAYER_HEIGHT = "PlayerHeight"; public static final float OVR_DEFAULT_PLAYER_HEIGHT = 1.778f; public static final float OVR_DEFAULT_IPD = 0.064f; public static final String OVR_KEY_NECK_TO_EYE_DISTANCE = "NeckEyeDistance"; public static final String OVR_KEY_EYE_HEIGHT = "EyeHeight"; public static final float OVR_DEFAULT_NECK_TO_EYE_HORIZONTAL = 0.0805f; public static final String OVR_KEY_USER = "User"; public static final String OVR_KEY_NAME = "Name"; public static final float OVR_DEFAULT_EYE_HEIGHT = 1.675f; public static final String OVR_DEFAULT_GENDER = "Unknown"; public static final String OVR_KEY_GENDER = "Gender"; public static final String OVR_KEY_IPD = "IPD"; public static final int OVR_DEFAULT_EYE_RELIEF_DIAL = 3; /** * Initializes all Oculus functionality.
* Original signature : ovrBool ovr_Initialize()
* native declaration : line 480 */ byte ovr_Initialize(); /** * Shuts down all Oculus functionality.
* Original signature : void ovr_Shutdown()
* native declaration : line 482 */ void ovr_Shutdown(); /** * string remains valid for app lifespan
* Original signature : char* ovr_GetVersionString()
* native declaration : line 486 */ Pointer ovr_GetVersionString(); /** * Users can get information about each HMD by calling ovrHmd_Create with an * index.
* Original signature : int ovrHmd_Detect()
* native declaration : line 492 */ int ovrHmd_Detect(); /** * If not null, then the returned handle must be freed with ovrHmd_Destroy.
* Original signature : ovrHmd ovrHmd_Create(int)
* native declaration : line 498 */ Hmd ovrHmd_Create(int index); /** * Original signature : void ovrHmd_Destroy(ovrHmd)
* native declaration : line 499 */ void ovrHmd_Destroy(Hmd hmd); /** * but may be used to debug some of the related rendering.
* Original signature : ovrHmd ovrHmd_CreateDebug(ovrHmdType)
* native declaration : line 503 */ Hmd ovrHmd_CreateDebug(int type); /** * Pass null hmd to get global errors (during create etc).
* Original signature : char* ovrHmd_GetLastError(ovrHmd)
* native declaration : line 509 */ String ovrHmd_GetLastError(Hmd hmd); /** * @note Source and dest mirror rects are not yet implemented.
* Original signature : * ovrBool ovrHmd_AttachToWindow(ovrHmd, void*, const ovrRecti*, const ovrRecti*) *
* native declaration : line 518 */ byte ovrHmd_AttachToWindow(Hmd hmd, Pointer window, OvrRecti destMirrorRect, OvrRecti sourceRenderTargetRect); /** * capabilities are available for that HMD.
* Original signature : int ovrHmd_GetEnabledCaps(ovrHmd)
* native declaration : line 527 */ int ovrHmd_GetEnabledCaps(Hmd hmd); /** * such as ovrHmd_LowPersistance.
* Original signature : * void ovrHmd_SetEnabledCaps(ovrHmd, unsigned int)
* native declaration : line 531 */ void ovrHmd_SetEnabledCaps(Hmd hmd, int hmdCaps); /** * - Pass 0 for both supportedTrackingCaps and requiredTrackingCaps to disable * tracking.
* Original signature : * ovrBool ovrHmd_ConfigureTracking(ovrHmd, unsigned int, unsigned int) *
* native declaration : line 549 */ byte ovrHmd_ConfigureTracking(Hmd hmd, int supportedTrackingCaps, int requiredTrackingCaps); /** * component of orientation.
* Original signature : void ovrHmd_RecenterPose(ovrHmd)
* native declaration : line 555 */ void ovrHmd_RecenterPose(Hmd hmd); /** * This may also be used for more refined timing of FrontBuffer rendering * logic, etc.
* Original signature : * ovrTrackingState ovrHmd_GetTrackingState(ovrHmd, double)
* native declaration : line 562 */ com.oculusvr.capi.TrackingState.ByValue ovrHmd_GetTrackingState(Hmd hmd, double absTime); /** * values can improve performance.
* Original signature : * ovrSizei ovrHmd_GetFovTextureSize(ovrHmd, ovrEyeType, ovrFovPort, float) *
* native declaration : line 575 */ OvrSizei.ByValue ovrHmd_GetFovTextureSize(Hmd hmd, int eye, FovPort.ByValue fov, float pixelsPerDisplayPixel); /** * Original signature : * ovrBool ovrHmd_ConfigureRendering(ovrHmd, const ovrRenderAPIConfig*, unsigned int, const ovrFovPort[2], ovrEyeRenderDesc[2]) *
* native declaration : line 614 */ byte ovrHmd_ConfigureRendering(Hmd hmd, RenderAPIConfig apiConfig, int distortionCaps, FovPort eyeFovIn[], EyeRenderDesc eyeRenderDescOut[]); /** * Pass 0 for the frame index if not using ovrHmd_GetFrameTiming.
* Original signature : * ovrFrameTiming ovrHmd_BeginFrame(ovrHmd, unsigned int)
* native declaration : line 624 */ com.oculusvr.capi.FrameTiming.ByValue ovrHmd_BeginFrame(Hmd hmd, int frameIndex); /** * - *** This Function will call Present/SwapBuffers and potentially wait for * GPU Sync ***.
* Original signature : * void ovrHmd_EndFrame(ovrHmd, const ovrPosef[2], const ovrTexture[2]) *
* native declaration : line 634 */ void ovrHmd_EndFrame(Hmd hmd, Posef renderPose[], Texture eyeTexture[]); /** * - If the pose is used for rendering the eye, it should be passed to * ovrHmd_EndFrame.
* Original signature : * ovrPosef ovrHmd_GetEyePose(ovrHmd, ovrEyeType)
* native declaration : line 642 */ Posef.ByValue ovrHmd_GetEyePose(Hmd hmd, int eye); /** * setup for client rendered distortion.
* Original signature : * ovrEyeRenderDesc ovrHmd_GetRenderDesc(ovrHmd, ovrEyeType, ovrFovPort) *
* native declaration : line 668 */ EyeRenderDesc.ByValue ovrHmd_GetRenderDesc(Hmd hmd, int eyeType, FovPort.ByValue fov); /** * or overriden here.
* Original signature : * ovrBool ovrHmd_CreateDistortionMesh(ovrHmd, ovrEyeType, ovrFovPort, unsigned int, ovrDistortionMesh*) *
* native declaration : line 706 */ byte ovrHmd_CreateDistortionMesh(Hmd hmd, int eyeType, FovPort.ByValue fov, int distortionCaps, DistortionMesh meshData); /** * are set to null and zeroes after the call.
* Original signature : * void ovrHmd_DestroyDistortionMesh(ovrDistortionMesh*)
* native declaration : line 713 */ void ovrHmd_DestroyDistortionMesh(DistortionMesh meshData); /** * viewport changes after the fact. This can be used to adjust render size * every frame if desired.
* Original signature : * void ovrHmd_GetRenderScaleAndOffset(ovrFovPort, ovrSizei, ovrRecti, ovrVector2f[2]) *
* native declaration : line 717 */ void ovrHmd_GetRenderScaleAndOffset(FovPort.ByValue fov, OvrSizei.ByValue textureSize, OvrRecti.ByValue renderViewport, OvrVector2f uvScaleOffsetOut[]); /** * rendering thread.
* Original signature : * ovrFrameTiming ovrHmd_GetFrameTiming(ovrHmd, unsigned int)
* native declaration : line 725 */ com.oculusvr.capi.FrameTiming.ByValue ovrHmd_GetFrameTiming(Hmd hmd, int frameIndex); /** * pass the same frame index as was used for GetFrameTiming on the main * thread.
* Original signature : * ovrFrameTiming ovrHmd_BeginFrameTiming(ovrHmd, unsigned int)
* native declaration : line 730 */ com.oculusvr.capi.FrameTiming.ByValue ovrHmd_BeginFrameTiming(Hmd hmd, int frameIndex); /** * important before this call to reduce latency and ensure proper timing.
* Original signature : void ovrHmd_EndFrameTiming(ovrHmd)
* native declaration : line 735 */ void ovrHmd_EndFrameTiming(Hmd hmd); /** * isn't called. Resets internal frame index to the specified number.
* Original signature : * void ovrHmd_ResetFrameTiming(ovrHmd, unsigned int)
* native declaration : line 740 */ void ovrHmd_ResetFrameTiming(Hmd hmd, int frameIndex); /** * Must be called on the same thread as ovrHmd_BeginFrameTiming.
* Original signature : * void ovrHmd_GetEyeTimewarpMatrices(ovrHmd, ovrEyeType, ovrPosef, ovrMatrix4f[2]) *
* native declaration : line 748 */ void ovrHmd_GetEyeTimewarpMatrices(Hmd hmd, int eye, Posef.ByValue renderPose, OvrMatrix4f twmOut[]); /** * Used to generate projection from ovrEyeDesc::Fov.
* Original signature : * ovrMatrix4f ovrMatrix4f_Projection(ovrFovPort, float, float, ovrBool) *
* native declaration : line 756 */ OvrMatrix4f.ByValue ovrMatrix4f_Projection(FovPort.ByValue fov, float znear, float zfar, byte rightHanded); /** * orthoDistance = distance from camera, such as 0.8m
* Original signature : * ovrMatrix4f ovrMatrix4f_OrthoSubProjection(ovrMatrix4f, ovrVector2f, float, float) *
* native declaration : line 762 */ OvrMatrix4f.ByValue ovrMatrix4f_OrthoSubProjection(OvrMatrix4f.ByValue projection, OvrVector2f.ByValue orthoScale, float orthoDistance, float eyeViewAdjustX); /** * value as used in sensor messages.
* Original signature : double ovr_GetTimeInSeconds()
* native declaration : line 767 */ double ovr_GetTimeInSeconds(); /** * Waits until the specified absolute time.
* Original signature : double ovr_WaitTillTime(double)
* native declaration : line 770 */ double ovr_WaitTillTime(double absTime); /** * be used to clear the screen.
* Original signature : * ovrBool ovrHmd_ProcessLatencyTest(ovrHmd, unsigned char[3])
* native declaration : line 779 */ byte ovrHmd_ProcessLatencyTest(Hmd hmd, ByteBuffer rgbColorOut); /** * Buffer is valid until next call.
* Original signature : char* ovrHmd_GetLatencyTestResult(ovrHmd)
* native declaration : line 783 */ Pointer ovrHmd_GetLatencyTestResult(Hmd hmd); /** * }
* Original signature : * void ovrHmd_GetHSWDisplayState(ovrHmd, ovrHSWDisplayState*)
* native declaration : line 819 */ void ovrHmd_GetHSWDisplayState(Hmd hmd, HSWDisplayState hasWarningState); /** * }
* Original signature : ovrBool ovrHmd_DismissHSWDisplay(ovrHmd)
* native declaration : line 839 */ byte ovrHmd_DismissHSWDisplay(Hmd hmd); /** * Returns defaultValue if property doesn't exist.
* Original signature : * ovrBool ovrHmd_GetBool(ovrHmd, const char*, ovrBool)
* native declaration : line 883 */ byte ovrHmd_GetBool(Hmd hmd, String propertyName, byte defaultVal); /** * Modify bool property; false if property doesn't exist or is readonly.
* Original signature : * ovrBool ovrHmd_SetBool(ovrHmd, const char*, ovrBool)
* native declaration : line 886 */ byte ovrHmd_SetBool(Hmd hmd, String propertyName, byte value); /** * Returns defaultValue if property doesn't exist.
* Original signature : * int ovrHmd_GetInt(ovrHmd, const char*, int)
* native declaration : line 890 */ int ovrHmd_GetInt(Hmd hmd, String propertyName, int defaultVal); /** * Modify integer property; false if property doesn't exist or is readonly.
* Original signature : * ovrBool ovrHmd_SetInt(ovrHmd, const char*, int)
* native declaration : line 893 */ byte ovrHmd_SetInt(Hmd hmd, String propertyName, int value); /** * Returns defaultValue if property doesn't exist.
* Original signature : * float ovrHmd_GetFloat(ovrHmd, const char*, float)
* native declaration : line 897 */ float ovrHmd_GetFloat(Hmd hmd, String propertyName, float defaultVal); /** * Modify float property; false if property doesn't exist or is readonly.
* Original signature : * ovrBool ovrHmd_SetFloat(ovrHmd, const char*, float)
* native declaration : line 900 */ byte ovrHmd_SetFloat(Hmd hmd, String propertyName, float value); /** * Maximum of arraySize elements will be written.
* Original signature : * int ovrHmd_GetFloatArray(ovrHmd, const char*, float[], unsigned int) *
* native declaration : line 904 */ int ovrHmd_GetFloatArray(Hmd hmd, String propertyName, FloatBuffer values, int arraySize); /** * Modify float[] property; false if property doesn't exist or is readonly.
* Original signature : * ovrBool ovrHmd_SetFloatArray(ovrHmd, const char*, float[], unsigned int) *
* native declaration : line 908 */ byte ovrHmd_SetFloatArray(Hmd hmd, String propertyName, FloatBuffer values, int arraySize); /** * String memory is guaranteed to exist until next call to GetString or * GetStringArray, or HMD is destroyed.
* Original signature : * char* ovrHmd_GetString(ovrHmd, const char*, const char*)
* native declaration : line 914 */ String ovrHmd_GetString(Hmd hmd, String propertyName, String defaultVal); /** * Set string property
* Original signature : * ovrBool ovrHmd_SetString(ovrHmd, const char*, const char*)
* native declaration : line 918 */ byte ovrHmd_SetString(Hmd hmddesc, String propertyName, String value); public static class ovrHmdStruct extends PointerType { public ovrHmdStruct(Pointer address) { super(address); } public ovrHmdStruct() { super(); } }; }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy