Struct openvr::RenderModels [] [src]

pub struct RenderModels(_);

Methods

impl RenderModels
[src]

[src]

Loads and returns a render model for use in the application. name should be a render model name from the RenderModelName_String property or an absolute path name to a render model on disk.

The method returns Ok(None) while the render model is still being loaded. Call it at regular intervals until it returns Ok(Some(model)).

[src]

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

[src]

Get the names of available components.

component does not correlate to a tracked device index, but is only used for iterating over all available components. If it's out of range, this function will return None.

Important traits for IntoIter<T>
[src]

Gets all component names of a given model

[src]

Use this to get the render model name for the specified rendermodel/component combination, to be passed to load_render_model.

If the component name is out of range, this function will return None. Otherwise, it will return the size of the buffer required for the name.

[src]

Use this to query information about the component, as a function of the controller state.

Returns None if the component is invalid.

Check ComponentState::is_visible() to determine whether the returned component should be rendered.

For dynamic controller components (ex: trigger) values will reflect component motions. For static components this will return a consistent value independent of the ControllerState.

[src]

Loads and returns a texture for use in the application. Texture IDs can be obtained from Model::diffuse_texture_id().

The method returns Ok(None) while the texture is still being loaded. Call it at regular intervals until it returns Ok(Some(texture)).

Trait Implementations

Auto Trait Implementations

impl Send for RenderModels

impl Sync for RenderModels