Class reference
OpenXRRenderModelExtension
Inherits OpenXRExtensionWrapper
This class implements the OpenXR Render Model Extension.
Description
This class implements the OpenXR Render Model Extension, if enabled it will maintain a list of active render models and provides an interface to the render model data.
Methods
bool is_active() const
bool is_active() constReturns true if OpenXR's render model extension is supported and enabled. Note: This only returns a valid value after OpenXR has been initialized.
RID render_model_create(int render_model_id)
RID render_model_create(int render_model_id)Creates a render model object within OpenXR using a render model id. Note: This function is exposed for dependent OpenXR extensions that provide render model ids to be used with the render model extension.
void render_model_destroy(RID render_model)
RID render_model)Destroys a render model object within OpenXR that was previously created with render_model_create(). Note: This function is exposed for dependent OpenXR extensions that provide render model ids to be used with the render model extension.
RID[] render_model_get_all()
Returns an array of all currently active render models registered with this extension.
int render_model_get_animatable_node_count(RID render_model) const
int render_model_get_animatable_node_count(RID render_model) constReturns the number of animatable nodes this render model has.
String render_model_get_animatable_node_name(RID render_model, int index) const
String render_model_get_animatable_node_name(RID render_model, int index) constReturns the name of the given animatable node.
Transform3D render_model_get_animatable_node_transform(RID render_model, int index) const
Transform3D render_model_get_animatable_node_transform(RID render_model, int index) constReturns the current local transform for an animatable node. This is updated every frame.
int render_model_get_confidence(RID render_model) const
int render_model_get_confidence(RID render_model) constReturns the tracking confidence of the tracking data for the render model.
Transform3D render_model_get_root_transform(RID render_model) const
Transform3D render_model_get_root_transform(RID render_model) constReturns the root transform of a render model. This is the tracked position relative to our XROrigin3D node.
PackedStringArray render_model_get_subaction_paths(RID render_model)
PackedStringArray render_model_get_subaction_paths(RID render_model)Returns a list of active subaction paths for this render_model. Note: If different devices are bound to your actions than available in suggested interaction bindings, this information shows paths related to the interaction bindings being mimicked by that device.
String render_model_get_top_level_path(RID render_model) const
String render_model_get_top_level_path(RID render_model) constReturns the top level path associated with this render_model. If provided this identifies whether the render model is associated with the player's hands or other body part.
bool render_model_is_animatable_node_visible(RID render_model, int index) const
bool render_model_is_animatable_node_visible(RID render_model, int index) constReturns true if this animatable node should be visible.
Node3D render_model_new_scene_instance(RID render_model) const
Node3D render_model_new_scene_instance(RID render_model) constReturns an instance of a subscene that contains all MeshInstance3D nodes that allow you to visualize the render model.