Class VRRenderModels


  • public class VRRenderModels
    extends java.lang.Object
    • Method Detail

      • nVRRenderModels_LoadRenderModel_Async

        public static int nVRRenderModels_LoadRenderModel_Async​(long pchRenderModelName,
                                                                long ppRenderModel)
        Unsafe version of: LoadRenderModel_Async
      • VRRenderModels_LoadRenderModel_Async

        public static int VRRenderModels_LoadRenderModel_Async​(java.nio.ByteBuffer pchRenderModelName,
                                                               PointerBuffer ppRenderModel)
        
        public static int VRRenderModels_LoadRenderModel_Async​(java.lang.CharSequence pchRenderModelName,
                                                               PointerBuffer ppRenderModel)
        
        Loads and returns a render model for use in the application. pchRenderModelName should be a render model name from the VR.ETrackedDeviceProperty_Prop_RenderModelName_String property or an absolute path name to a render model on disk.

        The resulting render model is valid until ShutdownInternal is called or until FreeRenderModel is called. When the application is finished with the render model it should call FreeRenderModel to free the memory associated with the model.

      • nVRRenderModels_FreeRenderModel

        public static void nVRRenderModels_FreeRenderModel​(long pRenderModel)
        Unsafe version of: FreeRenderModel
      • VRRenderModels_FreeRenderModel

        public static void VRRenderModels_FreeRenderModel​(@Nullable
                                                          RenderModel pRenderModel)
        Frees a previously returned render model It is safe to call this on a null ptr.
      • nVRRenderModels_LoadTexture_Async

        public static int nVRRenderModels_LoadTexture_Async​(int textureId,
                                                            long ppTexture)
        Unsafe version of: LoadTexture_Async
      • VRRenderModels_LoadTexture_Async

        public static int VRRenderModels_LoadTexture_Async​(int textureId,
                                                           PointerBuffer ppTexture)
        Loads and returns a texture for use in the application.
      • nVRRenderModels_FreeTexture

        public static void nVRRenderModels_FreeTexture​(long pTexture)
        Unsafe version of: FreeTexture
      • VRRenderModels_FreeTexture

        public static void VRRenderModels_FreeTexture​(@Nullable
                                                      RenderModelTextureMap pTexture)
        Frees a previously returned texture. It is safe to call this on a null ptr.
      • nVRRenderModels_LoadTextureD3D11_Async

        public static int nVRRenderModels_LoadTextureD3D11_Async​(int textureId,
                                                                 long pD3D11Device,
                                                                 long ppD3D11Texture2D)
        Unsafe version of: LoadTextureD3D11_Async
      • VRRenderModels_LoadTextureD3D11_Async

        public static int VRRenderModels_LoadTextureD3D11_Async​(int textureId,
                                                                long pD3D11Device,
                                                                PointerBuffer ppD3D11Texture2D)
        Creates a D3D11 texture and loads data into it.
      • VRRenderModels_LoadIntoTextureD3D11_Async

        public static int VRRenderModels_LoadIntoTextureD3D11_Async​(int textureId,
                                                                    long pDstTexture)
        Helper function to copy the bits into an existing texture.
      • VRRenderModels_FreeTextureD3D11

        public static void VRRenderModels_FreeTextureD3D11​(long pD3D11Texture2D)
        Use this to free textures created with LoadTextureD3D11_Async instead of calling Release on them.
      • nVRRenderModels_GetRenderModelName

        public static int nVRRenderModels_GetRenderModelName​(int unRenderModelIndex,
                                                             long pchRenderModelName,
                                                             int unRenderModelNameLen)
        Unsafe version of: GetRenderModelName
      • VRRenderModels_GetRenderModelName

        public static int VRRenderModels_GetRenderModelName​(int unRenderModelIndex,
                                                            @Nullable
                                                            java.nio.ByteBuffer pchRenderModelName)
        
        public static java.lang.String VRRenderModels_GetRenderModelName​(int unRenderModelIndex,
                                                                         int unRenderModelNameLen)
        
        Use this to get the names of available render models. Index does not correlate to a tracked device index, but is only used for iterating over all available render models. If the index is out of range, this function will return 0. Otherwise, it will return the size of the buffer required for the name.
      • VRRenderModels_GetRenderModelCount

        public static int VRRenderModels_GetRenderModelCount()
        Returns the number of available render models.
      • nVRRenderModels_GetComponentCount

        public static int nVRRenderModels_GetComponentCount​(long pchRenderModelName)
        Unsafe version of: GetComponentCount
      • VRRenderModels_GetComponentCount

        public static int VRRenderModels_GetComponentCount​(java.nio.ByteBuffer pchRenderModelName)
        
        public static int VRRenderModels_GetComponentCount​(java.lang.CharSequence pchRenderModelName)
        
        Returns the number of components of the specified render model.

        Components are useful when client application wish to draw, label, or otherwise interact with components of tracked objects.

      • nVRRenderModels_GetComponentName

        public static int nVRRenderModels_GetComponentName​(long pchRenderModelName,
                                                           int unComponentIndex,
                                                           long pchComponentName,
                                                           int unComponentNameLen)
        Unsafe version of: GetComponentName
      • VRRenderModels_GetComponentName

        public static int VRRenderModels_GetComponentName​(java.nio.ByteBuffer pchRenderModelName,
                                                          int unComponentIndex,
                                                          @Nullable
                                                          java.nio.ByteBuffer pchComponentName)
        
        public static int VRRenderModels_GetComponentName​(java.lang.CharSequence pchRenderModelName,
                                                          int unComponentIndex,
                                                          @Nullable
                                                          java.nio.ByteBuffer pchComponentName)
        
        public static java.lang.String VRRenderModels_GetComponentName​(java.lang.CharSequence pchRenderModelName,
                                                                       int unComponentIndex,
                                                                       int unComponentNameLen)
        
        Use this to get the names of available components. Index does not correlate to a tracked device index, but is only used for iterating over all available components. If the index is out of range, this function will return 0. Otherwise, it will return the size of the buffer required for the name.
      • nVRRenderModels_GetComponentButtonMask

        public static long nVRRenderModels_GetComponentButtonMask​(long pchRenderModelName,
                                                                  long pchComponentName)
        Unsafe version of: GetComponentButtonMask
      • VRRenderModels_GetComponentButtonMask

        public static long VRRenderModels_GetComponentButtonMask​(java.nio.ByteBuffer pchRenderModelName,
                                                                 java.nio.ByteBuffer pchComponentName)
        
        public static long VRRenderModels_GetComponentButtonMask​(java.lang.CharSequence pchRenderModelName,
                                                                 java.lang.CharSequence pchComponentName)
        
        Get the button mask for all buttons associated with this component.

        If no buttons (or axes) are associated with this component, return 0

        Note

        multiple components may be associated with the same button. Ex: two grip buttons on a single controller.

        Note

        A single component may be associated with multiple buttons. Ex: A trackpad which also provides "D-pad" functionality

      • nVRRenderModels_GetComponentRenderModelName

        public static int nVRRenderModels_GetComponentRenderModelName​(long pchRenderModelName,
                                                                      long pchComponentName,
                                                                      long pchComponentRenderModelName,
                                                                      int unComponentRenderModelNameLen)
        Unsafe version of: GetComponentRenderModelName
      • VRRenderModels_GetComponentRenderModelName

        public static int VRRenderModels_GetComponentRenderModelName​(java.nio.ByteBuffer pchRenderModelName,
                                                                     java.nio.ByteBuffer pchComponentName,
                                                                     @Nullable
                                                                     java.nio.ByteBuffer pchComponentRenderModelName)
        
        public static int VRRenderModels_GetComponentRenderModelName​(java.lang.CharSequence pchRenderModelName,
                                                                     java.lang.CharSequence pchComponentName,
                                                                     @Nullable
                                                                     java.nio.ByteBuffer pchComponentRenderModelName)
        
        public static java.lang.String VRRenderModels_GetComponentRenderModelName​(java.lang.CharSequence pchRenderModelName,
                                                                                  java.lang.CharSequence pchComponentName,
                                                                                  int unComponentRenderModelNameLen)
        
        Use this to get the render model name for the specified rendermode/component combination, to be passed to LoadRenderModel_Async. If the component name is out of range, this function will return 0. Otherwise, it will return the size of the buffer required for the name.
      • nVRRenderModels_GetComponentStateForDevicePath

        public static int nVRRenderModels_GetComponentStateForDevicePath​(long pchRenderModelName,
                                                                         long pchComponentName,
                                                                         long devicePath,
                                                                         long pState,
                                                                         long pComponentState)
      • VRRenderModels_GetComponentStateForDevicePath

        public static int VRRenderModels_GetComponentStateForDevicePath​(java.nio.ByteBuffer pchRenderModelName,
                                                                        java.nio.ByteBuffer pchComponentName,
                                                                        long devicePath,
                                                                        RenderModelControllerModeState pState,
                                                                        RenderModelComponentState pComponentState)
        
        public static int VRRenderModels_GetComponentStateForDevicePath​(java.lang.CharSequence pchRenderModelName,
                                                                        java.lang.CharSequence pchComponentName,
                                                                        long devicePath,
                                                                        RenderModelControllerModeState pState,
                                                                        RenderModelComponentState pComponentState)
        
        Returns:
        if the pchRenderModelName or pchComponentName is invalid, this will return false (and transforms will be set to identity). Otherwise, return true Note: For dynamic objects, visibility may be dynamic. (I.e., true/false will be returned based on controller state and controller mode state).
      • nVRRenderModels_GetComponentState

        public static boolean nVRRenderModels_GetComponentState​(long pchRenderModelName,
                                                                long pchComponentName,
                                                                long pControllerState,
                                                                long pState,
                                                                long pComponentState)
        Unsafe version of: GetComponentState
      • nVRRenderModels_RenderModelHasComponent

        public static boolean nVRRenderModels_RenderModelHasComponent​(long pchRenderModelName,
                                                                      long pchComponentName)
        Unsafe version of: RenderModelHasComponent
      • VRRenderModels_RenderModelHasComponent

        public static boolean VRRenderModels_RenderModelHasComponent​(java.nio.ByteBuffer pchRenderModelName,
                                                                     java.nio.ByteBuffer pchComponentName)
        
        public static boolean VRRenderModels_RenderModelHasComponent​(java.lang.CharSequence pchRenderModelName,
                                                                     java.lang.CharSequence pchComponentName)
        
        Returns true if the render model has a component with the specified name.
      • nVRRenderModels_GetRenderModelThumbnailURL

        public static int nVRRenderModels_GetRenderModelThumbnailURL​(long pchRenderModelName,
                                                                     long pchThumbnailURL,
                                                                     int unThumbnailURLLen,
                                                                     long peError)
        Unsafe version of: GetRenderModelThumbnailURL
      • VRRenderModels_GetRenderModelThumbnailURL

        public static int VRRenderModels_GetRenderModelThumbnailURL​(java.nio.ByteBuffer pchRenderModelName,
                                                                    @Nullable
                                                                    java.nio.ByteBuffer pchThumbnailURL,
                                                                    java.nio.IntBuffer peError)
        
        public static int VRRenderModels_GetRenderModelThumbnailURL​(java.lang.CharSequence pchRenderModelName,
                                                                    @Nullable
                                                                    java.nio.ByteBuffer pchThumbnailURL,
                                                                    java.nio.IntBuffer peError)
        
        public static java.lang.String VRRenderModels_GetRenderModelThumbnailURL​(java.lang.CharSequence pchRenderModelName,
                                                                                 int unThumbnailURLLen,
                                                                                 java.nio.IntBuffer peError)
        
        Returns the URL of the thumbnail image for this rendermodel.
      • nVRRenderModels_GetRenderModelOriginalPath

        public static int nVRRenderModels_GetRenderModelOriginalPath​(long pchRenderModelName,
                                                                     long pchOriginalPath,
                                                                     int unOriginalPathLen,
                                                                     long peError)
        Unsafe version of: GetRenderModelOriginalPath
      • VRRenderModels_GetRenderModelOriginalPath

        public static int VRRenderModels_GetRenderModelOriginalPath​(java.nio.ByteBuffer pchRenderModelName,
                                                                    @Nullable
                                                                    java.nio.ByteBuffer pchOriginalPath,
                                                                    java.nio.IntBuffer peError)
        
        public static int VRRenderModels_GetRenderModelOriginalPath​(java.lang.CharSequence pchRenderModelName,
                                                                    @Nullable
                                                                    java.nio.ByteBuffer pchOriginalPath,
                                                                    java.nio.IntBuffer peError)
        
        public static java.lang.String VRRenderModels_GetRenderModelOriginalPath​(java.lang.CharSequence pchRenderModelName,
                                                                                 int unOriginalPathLen,
                                                                                 java.nio.IntBuffer peError)
        
        Provides a render model path that will load the unskinned model if the model name provided has been replace by the user. If the model hasn't been replaced the path value will still be a valid path to load the model. Pass this to LoadRenderModel_Async, etc. to load the model.
      • nVRRenderModels_GetRenderModelErrorNameFromEnum

        public static long nVRRenderModels_GetRenderModelErrorNameFromEnum​(int error)
      • VRRenderModels_GetRenderModelErrorNameFromEnum

        @Nullable
        public static java.lang.String VRRenderModels_GetRenderModelErrorNameFromEnum​(int error)
        Returns a string for a render model error.