IVRRenderModels

extern (C++, vr) abstract
class IVRRenderModels {}

Members

Functions

FreeRenderModel
void FreeRenderModel(RenderModel_t* pRenderModel)

Frees a previously returned render model It is safe to call this on a null ptr.

FreeTexture
void FreeTexture(RenderModel_TextureMap_t* pTexture)

Frees a previously returned texture It is safe to call this on a null ptr.

FreeTextureD3D11
void FreeTextureD3D11(void* pD3D11Texture2D)
Undocumented in source.
GetComponentButtonMask
ulong GetComponentButtonMask(const(char)* pchRenderModelName, const(char)* 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

GetComponentCount
uint GetComponentCount(const(char)* 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. Examples controller components: renderable things such as triggers, buttons non-renderable things which include coordinate systems such as 'tip', 'base', a neutral controller agnostic hand-pose If all controller components are enumerated and rendered, it will be equivalent to drawing the traditional render model Returns 0 if components not supported, >0 otherwise

GetComponentName
uint GetComponentName(const(char)* pchRenderModelName, uint unComponentIndex, char* pchComponentName, uint 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.

GetComponentRenderModelName
uint GetComponentRenderModelName(const(char)* pchRenderModelName, const(char)* pchComponentName, char* pchComponentRenderModelName, uint unComponentRenderModelNameLen)

Use this to get the render model name for the specified rendermode/component combination, to be passed to LoadRenderModel. 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.

GetComponentState
bool GetComponentState(const(char)* pchRenderModelName, const(char)* pchComponentName, const(VRControllerState_t)* pControllerState, const(RenderModel_ControllerMode_State_t)* pState, RenderModel_ComponentState_t* pComponentState)
Undocumented in source.
GetComponentStateForDevicePath
bool GetComponentStateForDevicePath(const(char)* pchRenderModelName, const(char)* pchComponentName, VRInputValueHandle_t devicePath, const(RenderModel_ControllerMode_State_t)* pState, RenderModel_ComponentState_t* pComponentState)

Use this to query information about the component, as a function of the controller state. For dynamic controller components (ex: trigger) values will reflect component motions For static components this will return a consistent value independent of the VRControllerState_t 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 )

GetRenderModelCount
uint GetRenderModelCount()
Undocumented in source.
GetRenderModelErrorNameFromEnum
const(char)* GetRenderModelErrorNameFromEnum(EVRRenderModelError error)
Undocumented in source.
GetRenderModelName
uint GetRenderModelName(uint unRenderModelIndex, char* pchRenderModelName, uint 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.

GetRenderModelOriginalPath
uint GetRenderModelOriginalPath(const(char)* pchRenderModelName, char* pchOriginalPath, uint unOriginalPathLen, EVRRenderModelError* peError)
Undocumented in source.
GetRenderModelThumbnailURL
uint GetRenderModelThumbnailURL(const(char)* pchRenderModelName, char* pchThumbnailURL, uint unThumbnailURLLen, EVRRenderModelError* peError)
Undocumented in source.
LoadIntoTextureD3D11_Async
EVRRenderModelError LoadIntoTextureD3D11_Async(TextureID_t textureId, void* pDstTexture)
Undocumented in source.
LoadRenderModel_Async
EVRRenderModelError LoadRenderModel_Async(const(char)* pchRenderModelName, RenderModel_t** ppRenderModel)

Loads and returns a render model for use in the application. pchRenderModelName should be a render model name from the Prop_RenderModelName_String property or an absolute path name to a render model on disk. The resulting render model is valid until VR_Shutdown() 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. The method returns VRRenderModelError_Loading while the render model is still being loaded. The method returns VRRenderModelError_None once loaded successfully, otherwise will return an error.

LoadTextureD3D11_Async
EVRRenderModelError LoadTextureD3D11_Async(TextureID_t textureId, void* pD3D11Device, void** ppD3D11Texture2D)
Undocumented in source.
LoadTexture_Async
EVRRenderModelError LoadTexture_Async(TextureID_t textureId, RenderModel_TextureMap_t** ppTexture)
Undocumented in source.
RenderModelHasComponent
bool RenderModelHasComponent(const(char)* pchRenderModelName, const(char)* pchComponentName)
Undocumented in source.

Meta