public static bool GetNodeStatePropertyQuaternion(NodeStatePropertyType propertyType, Plugin.Node ovrpNodeType, Plugin.ProcessingStep stepType, out Quaternion retQuat) { retQuat = Quaternion.Identity; switch (propertyType) { case NodeStatePropertyType.Orientation: if (Manager.loadedXRDevice == Manager.XRDevice.Oculus) { retQuat = Plugin.GetNodePose(ovrpNodeType, stepType).ToOVRPose().Orientation; return(true); } break; } return(false); }
public static bool GetNodeStatePropertyVector3(NodeStatePropertyType propertyType, Plugin.Node ovrpNodeType, Plugin.ProcessingStep stepType, out Vector3 retVec) { retVec = Vector3.Zero; switch (propertyType) { case NodeStatePropertyType.Acceleration: if (Manager.loadedXRDevice == Manager.XRDevice.Oculus) { retVec = Plugin.GetNodeAcceleration(ovrpNodeType, stepType).FromFlippedZVector3f(); return(true); } break; case NodeStatePropertyType.AngularAcceleration: if (Manager.loadedXRDevice == Manager.XRDevice.Oculus) { retVec = Plugin.GetNodeAngularAcceleration(ovrpNodeType, stepType).FromFlippedZVector3f(); return(true); } break; case NodeStatePropertyType.Velocity: if (Manager.loadedXRDevice == Manager.XRDevice.Oculus) { retVec = Plugin.GetNodeVelocity(ovrpNodeType, stepType).FromFlippedZVector3f(); return(true); } break; case NodeStatePropertyType.AngularVelocity: if (Manager.loadedXRDevice == Manager.XRDevice.Oculus) { retVec = Plugin.GetNodeAngularVelocity(ovrpNodeType, stepType).FromFlippedZVector3f(); return(true); } break; case NodeStatePropertyType.Position: if (Manager.loadedXRDevice == Manager.XRDevice.Oculus) { retVec = Plugin.GetNodePose(ovrpNodeType, stepType).ToOVRPose().Position; return(true); } break; } return(false); }