GameApi 28
Library used by GameApi Builder tool
Loading...
Searching...
No Matches
vr::IVRRenderModels Class Reference

#include <openvr_mingw.h>

Public Member Functions

EVRRenderModelError LoadRenderModel_Async (const char *pchRenderModelName, RenderModel_t **ppRenderModel)
void FreeRenderModel (RenderModel_t *pRenderModel)
EVRRenderModelError LoadTexture_Async (TextureID_t textureId, RenderModel_TextureMap_t **ppTexture)
void FreeTexture (RenderModel_TextureMap_t *pTexture)
EVRRenderModelError LoadTextureD3D11_Async (TextureID_t textureId, void *pD3D11Device, void **ppD3D11Texture2D)
EVRRenderModelError LoadIntoTextureD3D11_Async (TextureID_t textureId, void *pDstTexture)
void FreeTextureD3D11 (void *pD3D11Texture2D)
uint32_t GetRenderModelName (uint32_t unRenderModelIndex, VR_OUT_STRING() char *pchRenderModelName, uint32_t unRenderModelNameLen)
uint32_t GetRenderModelCount ()
uint32_t GetComponentCount (const char *pchRenderModelName)
uint32_t GetComponentName (const char *pchRenderModelName, uint32_t unComponentIndex, VR_OUT_STRING() char *pchComponentName, uint32_t unComponentNameLen)
uint64_t GetComponentButtonMask (const char *pchRenderModelName, const char *pchComponentName)
uint32_t GetComponentRenderModelName (const char *pchRenderModelName, const char *pchComponentName, VR_OUT_STRING() char *pchComponentRenderModelName, uint32_t unComponentRenderModelNameLen)
bool GetComponentState (const char *pchRenderModelName, const char *pchComponentName, const vr::VRControllerState_t *pControllerState, const RenderModel_ControllerMode_State_t *pState, RenderModel_ComponentState_t *pComponentState)
bool RenderModelHasComponent (const char *pchRenderModelName, const char *pchComponentName)
uint32_t GetRenderModelThumbnailURL (const char *pchRenderModelName, VR_OUT_STRING() char *pchThumbnailURL, uint32_t unThumbnailURLLen, vr::EVRRenderModelError *peError)
uint32_t GetRenderModelOriginalPath (const char *pchRenderModelName, VR_OUT_STRING() char *pchOriginalPath, uint32_t unOriginalPathLen, vr::EVRRenderModelError *peError)
const char * GetRenderModelErrorNameFromEnum (vr::EVRRenderModelError error)

Member Function Documentation

◆ FreeRenderModel()

void vr::IVRRenderModels::FreeRenderModel ( RenderModel_t * pRenderModel)
inline

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

◆ FreeTexture()

void vr::IVRRenderModels::FreeTexture ( RenderModel_TextureMap_t * pTexture)
inline

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

◆ FreeTextureD3D11()

void vr::IVRRenderModels::FreeTextureD3D11 ( void * pD3D11Texture2D)
inline

Use this to free textures created with LoadTextureD3D11_Async instead of calling Release on them.

◆ GetComponentButtonMask()

uint64_t vr::IVRRenderModels::GetComponentButtonMask ( const char * pchRenderModelName,
const char * pchComponentName )
inline

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()

uint32_t vr::IVRRenderModels::GetComponentCount ( const char * pchRenderModelName)
inline

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()

uint32_t vr::IVRRenderModels::GetComponentName ( const char * pchRenderModelName,
uint32_t unComponentIndex,
VR_OUT_STRING() char * pchComponentName,
uint32_t unComponentNameLen )
inline

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()

uint32_t vr::IVRRenderModels::GetComponentRenderModelName ( const char * pchRenderModelName,
const char * pchComponentName,
VR_OUT_STRING() char * pchComponentRenderModelName,
uint32_t unComponentRenderModelNameLen )
inline

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 vr::IVRRenderModels::GetComponentState ( const char * pchRenderModelName,
const char * pchComponentName,
const vr::VRControllerState_t * pControllerState,
const RenderModel_ControllerMode_State_t * pState,
RenderModel_ComponentState_t * pComponentState )
inline

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()

uint32_t vr::IVRRenderModels::GetRenderModelCount ( )
inline

Returns the number of available render models.

◆ GetRenderModelErrorNameFromEnum()

const char * vr::IVRRenderModels::GetRenderModelErrorNameFromEnum ( vr::EVRRenderModelError error)
inline

Returns a string for a render model error

◆ GetRenderModelName()

uint32_t vr::IVRRenderModels::GetRenderModelName ( uint32_t unRenderModelIndex,
VR_OUT_STRING() char * pchRenderModelName,
uint32_t unRenderModelNameLen )
inline

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()

uint32_t vr::IVRRenderModels::GetRenderModelOriginalPath ( const char * pchRenderModelName,
VR_OUT_STRING() char * pchOriginalPath,
uint32_t unOriginalPathLen,
vr::EVRRenderModelError * peError )
inline

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.

◆ GetRenderModelThumbnailURL()

uint32_t vr::IVRRenderModels::GetRenderModelThumbnailURL ( const char * pchRenderModelName,
VR_OUT_STRING() char * pchThumbnailURL,
uint32_t unThumbnailURLLen,
vr::EVRRenderModelError * peError )
inline

Returns the URL of the thumbnail image for this rendermodel

◆ LoadIntoTextureD3D11_Async()

EVRRenderModelError vr::IVRRenderModels::LoadIntoTextureD3D11_Async ( TextureID_t textureId,
void * pDstTexture )
inline

Helper function to copy the bits into an existing texture.

◆ LoadRenderModel_Async()

EVRRenderModelError vr::IVRRenderModels::LoadRenderModel_Async ( const char * pchRenderModelName,
RenderModel_t ** ppRenderModel )
inline

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.

◆ LoadTexture_Async()

EVRRenderModelError vr::IVRRenderModels::LoadTexture_Async ( TextureID_t textureId,
RenderModel_TextureMap_t ** ppTexture )
inline

Loads and returns a texture for use in the application.

◆ LoadTextureD3D11_Async()

EVRRenderModelError vr::IVRRenderModels::LoadTextureD3D11_Async ( TextureID_t textureId,
void * pD3D11Device,
void ** ppD3D11Texture2D )
inline

Creates a D3D11 texture and loads data into it.

◆ RenderModelHasComponent()

bool vr::IVRRenderModels::RenderModelHasComponent ( const char * pchRenderModelName,
const char * pchComponentName )
inline

Returns true if the render model has a component with the specified name


The documentation for this class was generated from the following file: