public bool GetComponentState(string pchRenderModelName,string pchComponentName,ref VRControllerState_t pControllerState,ref RenderModel_ControllerMode_State_t pState,ref RenderModel_ComponentState_t pComponentState) { bool result = FnTable.GetComponentState(pchRenderModelName,pchComponentName,ref pControllerState,ref pState,ref pComponentState); return result; }
public abstract bool GetComponentState(string pchRenderModelName,string pchComponentName,ref VRControllerState_t pControllerState,ref RenderModel_ControllerMode_State_t pState,ref RenderModel_ComponentState_t pComponentState);
public void UpdateComponents() { var t = transform; if (t.childCount == 0) return; using (var holder = new RenderModelInterfaceHolder()) { var controllerState = (index != SteamVR_TrackedObject.EIndex.None) ? SteamVR_Controller.Input((int)index).GetState() : new VRControllerState_t(); for (int i = 0; i < t.childCount; i++) { var child = t.GetChild(i); var renderModels = holder.instance; if (renderModels == null) break; var componentState = new RenderModel_ComponentState_t(); var componentModeState = new RenderModel_ControllerMode_State_t(); if (!renderModels.GetComponentState(renderModelName, child.name, ref controllerState, ref componentModeState, ref componentState)) continue; var componentTransform = new SteamVR_Utils.RigidTransform(componentState.mTrackingToComponentRenderModel); child.localPosition = componentTransform.pos; child.localRotation = componentTransform.rot; var attach = child.FindChild(k_localTransformName); if (attach != null) { var attachTransform = new SteamVR_Utils.RigidTransform(componentState.mTrackingToComponentLocal); attach.position = t.TransformPoint(attachTransform.pos); attach.rotation = t.rotation * attachTransform.rot; } bool visible = (componentState.uProperties & (uint)EVRComponentProperty.IsVisible) != 0; if (visible != child.gameObject.activeSelf) { child.gameObject.SetActive(visible); } } } }
internal static extern bool VR_IVRRenderModels_GetComponentState(IntPtr instancePtr, string pchRenderModelName, string pchComponentName, ref VRControllerState_t pControllerState, ref RenderModel_ControllerMode_State_t pState, ref RenderModel_ComponentState_t pComponentState);
public override bool GetComponentState(string pchRenderModelName,string pchComponentName,ref VRControllerState_t pControllerState,ref RenderModel_ControllerMode_State_t pState,ref RenderModel_ComponentState_t pComponentState) { CheckIfUsable(); bool result = VRNativeEntrypoints.VR_IVRRenderModels_GetComponentState(m_pVRRenderModels,pchRenderModelName,pchComponentName,ref pControllerState,ref pState,ref pComponentState); return result; }
public uint GetComponentRenderModelName(string pchRenderModelName, string pchComponentName, StringBuilder pchComponentRenderModelName, uint unComponentRenderModelNameLen) => default; // 0x00000001811DF2F0-0x00000001811DF320 public bool GetComponentState(string pchRenderModelName, string pchComponentName, ref VRControllerState_t pControllerState, ref RenderModel_ControllerMode_State_t pState, ref RenderModel_ComponentState_t pComponentState) => default; // 0x00000001811DF320-0x00000001811DF4C0
public bool GetComponentState(string pchRenderModelName, string pchComponentName, ref VRControllerState_t pControllerState, ref RenderModel_ControllerMode_State_t pState, ref RenderModel_ComponentState_t pComponentState) { return(this.FnTable.GetComponentState(pchRenderModelName, pchComponentName, ref pControllerState, ref pState, ref pComponentState)); }
// Token: 0x06001FDB RID: 8155 RVA: 0x0009E15C File Offset: 0x0009C35C public bool GetComponentState(string pchRenderModelName, string pchComponentName, ref VRControllerState_t pControllerState, ref RenderModel_ControllerMode_State_t pState, ref RenderModel_ComponentState_t pComponentState) { if (Environment.OSVersion.Platform == PlatformID.MacOSX || Environment.OSVersion.Platform == PlatformID.Unix) { VRControllerState_t_Packed vrcontrollerState_t_Packed = new VRControllerState_t_Packed(pControllerState); CVRRenderModels.GetComponentStateUnion getComponentStateUnion; getComponentStateUnion.pGetComponentStatePacked = null; getComponentStateUnion.pGetComponentState = this.FnTable.GetComponentState; bool result = getComponentStateUnion.pGetComponentStatePacked(pchRenderModelName, pchComponentName, ref vrcontrollerState_t_Packed, ref pState, ref pComponentState); vrcontrollerState_t_Packed.Unpack(ref pControllerState); return(result); } return(this.FnTable.GetComponentState(pchRenderModelName, pchComponentName, ref pControllerState, ref pState, ref pComponentState)); }