本文整理汇总了C#中Valve.VR.TrackedDevicePose_t类的典型用法代码示例。如果您正苦于以下问题:C# TrackedDevicePose_t类的具体用法?C# TrackedDevicePose_t怎么用?C# TrackedDevicePose_t使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TrackedDevicePose_t类属于Valve.VR命名空间,在下文中一共展示了TrackedDevicePose_t类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Connect
public bool Connect(IMoCapClient_ConnectionInfo connectionInfo)
{
connected = VRDevice.isPresent;
if (connected)
{
system = OpenVR.System;
if (system == null)
{
connected = false;
Debug.LogWarning("Could not find OpenVR System instance.");
}
compositor = OpenVR.Compositor;
if (compositor == null)
{
connected = false;
Debug.LogWarning("Could not find OpenVR Compositor instance.");
}
}
if (connected)
{
poses = new TrackedDevicePose_t[OpenVR.k_unMaxTrackedDeviceCount];
gamePoses = new TrackedDevicePose_t[0];
FindControllerIndices();
scene.actors = new Actor[controllerIndices.Length];
scene.devices = new Device[controllerIndices.Length];
states = new VRControllerState_t[controllerIndices.Length];
for (int idx = 0; idx < controllerIndices.Length; idx++)
{
string name = "Controller" + (idx + 1);
Actor actor = new Actor(scene, name, idx);
actor.bones = new Bone[1];
actor.bones[0] = new Bone(actor, "root", 0);
scene.actors[idx] = actor;
Device device = new Device(scene, name, idx);
device.channels = new Channel[7];
device.channels[0] = new Channel(device, "button1"); // fire
device.channels[1] = new Channel(device, "button2"); // menu
device.channels[2] = new Channel(device, "button3"); // grip
device.channels[3] = new Channel(device, "axis1"); // touchpad + press
device.channels[4] = new Channel(device, "axis2");
device.channels[5] = new Channel(device, "axis1raw"); // touchpad touch
device.channels[6] = new Channel(device, "axis2raw");
scene.devices[idx] = device;
}
}
return connected;
}
示例2: GetControllerStateWithPose
public abstract bool GetControllerStateWithPose(ETrackingUniverseOrigin eOrigin,uint unControllerDeviceIndex,ref VRControllerState_t pControllerState,ref TrackedDevicePose_t pTrackedDevicePose);
示例3: PollNextEventWithPose
public abstract bool PollNextEventWithPose(ETrackingUniverseOrigin eOrigin,ref VREvent_t pEvent,ref TrackedDevicePose_t pTrackedDevicePose);
示例4: ApplyTransform
public abstract void ApplyTransform(ref TrackedDevicePose_t pOutputPose,ref TrackedDevicePose_t pTrackedDevicePose,ref HmdMatrix34_t pTransform);
示例5: GetDeviceToAbsoluteTrackingPose
public override void GetDeviceToAbsoluteTrackingPose(ETrackingUniverseOrigin eOrigin,float fPredictedSecondsToPhotonsFromNow,TrackedDevicePose_t [] pTrackedDevicePoseArray)
{
CheckIfUsable();
VRNativeEntrypoints.VR_IVRSystem_GetDeviceToAbsoluteTrackingPose(m_pVRSystem,eOrigin,fPredictedSecondsToPhotonsFromNow,pTrackedDevicePoseArray,(uint) pTrackedDevicePoseArray.Length);
}
示例6: GetControllerStateWithPose
public bool GetControllerStateWithPose(ETrackingUniverseOrigin eOrigin,uint unControllerDeviceIndex,ref VRControllerState_t pControllerState,ref TrackedDevicePose_t pTrackedDevicePose)
{
bool result = FnTable.GetControllerStateWithPose(eOrigin,unControllerDeviceIndex,ref pControllerState,ref pTrackedDevicePose);
return result;
}
示例7: VR_IVRSystem_PollNextEventWithPose
internal static extern bool VR_IVRSystem_PollNextEventWithPose(IntPtr instancePtr, ETrackingUniverseOrigin eOrigin, ref VREvent_t pEvent, ref TrackedDevicePose_t pTrackedDevicePose);
示例8: ApplyTransform
public void ApplyTransform(ref TrackedDevicePose_t pOutputPose,ref TrackedDevicePose_t pTrackedDevicePose,ref HmdMatrix34_t pTransform)
{
FnTable.ApplyTransform(ref pOutputPose,ref pTrackedDevicePose,ref pTransform);
}
示例9: PollNextEventWithPose
public bool PollNextEventWithPose(ETrackingUniverseOrigin eOrigin,ref VREvent_t pEvent,uint uncbVREvent,ref TrackedDevicePose_t pTrackedDevicePose)
{
bool result = FnTable.PollNextEventWithPose(eOrigin,ref pEvent,uncbVREvent,ref pTrackedDevicePose);
return result;
}
示例10: GetDeviceToAbsoluteTrackingPose
public void GetDeviceToAbsoluteTrackingPose(ETrackingUniverseOrigin eOrigin,float fPredictedSecondsToPhotonsFromNow,TrackedDevicePose_t [] pTrackedDevicePoseArray)
{
FnTable.GetDeviceToAbsoluteTrackingPose(eOrigin,fPredictedSecondsToPhotonsFromNow,pTrackedDevicePoseArray,(uint) pTrackedDevicePoseArray.Length);
}
示例11: GetLastPoseForTrackedDeviceIndex
public EVRCompositorError GetLastPoseForTrackedDeviceIndex(uint unDeviceIndex, ref TrackedDevicePose_t pOutputPose, ref TrackedDevicePose_t pOutputGamePose)
{
return this.FnTable.GetLastPoseForTrackedDeviceIndex(unDeviceIndex, ref pOutputPose, ref pOutputGamePose);
}
示例12: WaitGetPoses
public EVRCompositorError WaitGetPoses(TrackedDevicePose_t[] pRenderPoseArray, TrackedDevicePose_t[] pGamePoseArray)
{
return this.FnTable.WaitGetPoses(pRenderPoseArray, (uint)pRenderPoseArray.Length, pGamePoseArray, (uint)pGamePoseArray.Length);
}
示例13: VR_IVRSystem_ApplyTransform
internal static extern void VR_IVRSystem_ApplyTransform(IntPtr instancePtr, ref TrackedDevicePose_t pOutputPose, ref TrackedDevicePose_t pTrackedDevicePose, ref HmdMatrix34_t pTransform);
示例14: GetLastPoses
public EVRCompositorError GetLastPoses(TrackedDevicePose_t [] pRenderPoseArray,TrackedDevicePose_t [] pGamePoseArray)
{
EVRCompositorError result = FnTable.GetLastPoses(pRenderPoseArray,(uint) pRenderPoseArray.Length,pGamePoseArray,(uint) pGamePoseArray.Length);
return result;
}
示例15: GetLastPoses
public abstract EVRCompositorError GetLastPoses(TrackedDevicePose_t [] pRenderPoseArray,TrackedDevicePose_t [] pGamePoseArray);